igniteui-webcomponents 7.0.1 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components/combo/themes/shared/combo.common.css.js +1 -1
  3. package/components/combo/themes/shared/combo.common.css.js.map +1 -1
  4. package/components/combo/types.js.map +1 -1
  5. package/components/common/definitions/defineAllComponents.js +4 -0
  6. package/components/common/definitions/defineAllComponents.js.map +1 -1
  7. package/components/common/mixins/forms/form-transformers.js.map +1 -1
  8. package/components/common/util.d.ts +11 -1
  9. package/components/common/util.js +3 -0
  10. package/components/common/util.js.map +1 -1
  11. package/components/date-picker/date-picker.js.map +1 -1
  12. package/components/file-input/file-input.js.map +1 -1
  13. package/components/highlight/highlight.d.ts +130 -0
  14. package/components/highlight/highlight.js +77 -0
  15. package/components/highlight/highlight.js.map +1 -0
  16. package/components/highlight/service.d.ts +58 -0
  17. package/components/highlight/service.js +132 -0
  18. package/components/highlight/service.js.map +1 -0
  19. package/components/highlight/themes/dark/highlight.bootstrap.css.js +3 -0
  20. package/components/highlight/themes/dark/highlight.bootstrap.css.js.map +1 -0
  21. package/components/highlight/themes/dark/highlight.fluent.css.d.ts +1 -0
  22. package/components/highlight/themes/dark/highlight.fluent.css.js +3 -0
  23. package/components/highlight/themes/dark/highlight.fluent.css.js.map +1 -0
  24. package/components/highlight/themes/dark/highlight.indigo.css.d.ts +1 -0
  25. package/components/highlight/themes/dark/highlight.indigo.css.js +3 -0
  26. package/components/highlight/themes/dark/highlight.indigo.css.js.map +1 -0
  27. package/components/highlight/themes/dark/highlight.material.css.d.ts +1 -0
  28. package/components/highlight/themes/dark/highlight.material.css.js +3 -0
  29. package/components/highlight/themes/dark/highlight.material.css.js.map +1 -0
  30. package/components/highlight/themes/dark/highlight.shared.css.d.ts +1 -0
  31. package/components/highlight/themes/dark/highlight.shared.css.js +3 -0
  32. package/components/highlight/themes/dark/highlight.shared.css.js.map +1 -0
  33. package/components/highlight/themes/light/highlight.bootstrap.css.d.ts +1 -0
  34. package/components/highlight/themes/light/highlight.bootstrap.css.js +3 -0
  35. package/components/highlight/themes/light/highlight.bootstrap.css.js.map +1 -0
  36. package/components/highlight/themes/light/highlight.fluent.css.d.ts +1 -0
  37. package/components/highlight/themes/light/highlight.fluent.css.js +3 -0
  38. package/components/highlight/themes/light/highlight.fluent.css.js.map +1 -0
  39. package/components/highlight/themes/light/highlight.indigo.css.d.ts +1 -0
  40. package/components/highlight/themes/light/highlight.indigo.css.js +3 -0
  41. package/components/highlight/themes/light/highlight.indigo.css.js.map +1 -0
  42. package/components/highlight/themes/light/highlight.material.css.d.ts +1 -0
  43. package/components/highlight/themes/light/highlight.material.css.js +3 -0
  44. package/components/highlight/themes/light/highlight.material.css.js.map +1 -0
  45. package/components/highlight/themes/light/highlight.shared.css.d.ts +1 -0
  46. package/components/highlight/themes/light/highlight.shared.css.js +3 -0
  47. package/components/highlight/themes/light/highlight.shared.css.js.map +1 -0
  48. package/components/highlight/themes/shared/highlight.common.css.d.ts +1 -0
  49. package/components/highlight/themes/shared/highlight.common.css.js +3 -0
  50. package/components/highlight/themes/shared/highlight.common.css.js.map +1 -0
  51. package/components/highlight/themes/themes.d.ts +2 -0
  52. package/components/highlight/themes/themes.js +47 -0
  53. package/components/highlight/themes/themes.js.map +1 -0
  54. package/components/splitter/splitter.d.ts +240 -0
  55. package/components/splitter/splitter.js +608 -0
  56. package/components/splitter/splitter.js.map +1 -0
  57. package/components/splitter/themes/dark/splitter.bootstrap.css.d.ts +1 -0
  58. package/components/splitter/themes/dark/splitter.bootstrap.css.js +3 -0
  59. package/components/splitter/themes/dark/splitter.bootstrap.css.js.map +1 -0
  60. package/components/splitter/themes/dark/splitter.fluent.css.d.ts +1 -0
  61. package/components/splitter/themes/dark/splitter.fluent.css.js +3 -0
  62. package/components/splitter/themes/dark/splitter.fluent.css.js.map +1 -0
  63. package/components/splitter/themes/dark/splitter.indigo.css.d.ts +1 -0
  64. package/components/splitter/themes/dark/splitter.indigo.css.js +3 -0
  65. package/components/splitter/themes/dark/splitter.indigo.css.js.map +1 -0
  66. package/components/splitter/themes/dark/splitter.material.css.d.ts +1 -0
  67. package/components/splitter/themes/dark/splitter.material.css.js +3 -0
  68. package/components/splitter/themes/dark/splitter.material.css.js.map +1 -0
  69. package/components/splitter/themes/dark/splitter.shared.css.d.ts +1 -0
  70. package/components/splitter/themes/dark/splitter.shared.css.js +3 -0
  71. package/components/splitter/themes/dark/splitter.shared.css.js.map +1 -0
  72. package/components/splitter/themes/light/splitter.bootstrap.css.d.ts +1 -0
  73. package/components/splitter/themes/light/splitter.bootstrap.css.js +3 -0
  74. package/components/splitter/themes/light/splitter.bootstrap.css.js.map +1 -0
  75. package/components/splitter/themes/light/splitter.fluent.css.d.ts +1 -0
  76. package/components/splitter/themes/light/splitter.fluent.css.js +3 -0
  77. package/components/splitter/themes/light/splitter.fluent.css.js.map +1 -0
  78. package/components/splitter/themes/light/splitter.indigo.css.d.ts +1 -0
  79. package/components/splitter/themes/light/splitter.indigo.css.js +3 -0
  80. package/components/splitter/themes/light/splitter.indigo.css.js.map +1 -0
  81. package/components/splitter/themes/light/splitter.material.css.d.ts +1 -0
  82. package/components/splitter/themes/light/splitter.material.css.js +3 -0
  83. package/components/splitter/themes/light/splitter.material.css.js.map +1 -0
  84. package/components/splitter/themes/light/splitter.shared.css.d.ts +1 -0
  85. package/components/splitter/themes/light/splitter.shared.css.js +3 -0
  86. package/components/splitter/themes/light/splitter.shared.css.js.map +1 -0
  87. package/components/splitter/themes/shared/splitter.common.css.d.ts +1 -0
  88. package/components/splitter/themes/shared/splitter.common.css.js +3 -0
  89. package/components/splitter/themes/shared/splitter.common.css.js.map +1 -0
  90. package/components/splitter/themes/shared/splitter.indigo.css.d.ts +1 -0
  91. package/components/splitter/themes/shared/splitter.indigo.css.js +3 -0
  92. package/components/splitter/themes/shared/splitter.indigo.css.js.map +1 -0
  93. package/components/splitter/themes/splitter.base.css.d.ts +1 -0
  94. package/components/splitter/themes/splitter.base.css.js +3 -0
  95. package/components/splitter/themes/splitter.base.css.js.map +1 -0
  96. package/components/splitter/themes/themes.d.ts +2 -0
  97. package/components/splitter/themes/themes.js +48 -0
  98. package/components/splitter/themes/themes.js.map +1 -0
  99. package/components/splitter/types.d.ts +39 -0
  100. package/components/splitter/types.js +2 -0
  101. package/components/splitter/types.js.map +1 -0
  102. package/components/stepper/{animations.d.ts → common/animations.d.ts} +2 -2
  103. package/components/stepper/{animations.js → common/animations.js} +2 -2
  104. package/components/stepper/common/animations.js.map +1 -0
  105. package/components/stepper/common/context.d.ts +9 -0
  106. package/components/stepper/common/context.js +3 -0
  107. package/components/stepper/common/context.js.map +1 -0
  108. package/components/stepper/common/state.d.ts +67 -0
  109. package/components/stepper/common/state.js +134 -0
  110. package/components/stepper/common/state.js.map +1 -0
  111. package/components/stepper/common/types.js +2 -0
  112. package/components/stepper/common/types.js.map +1 -0
  113. package/components/stepper/step.d.ts +101 -55
  114. package/components/stepper/step.js +145 -160
  115. package/components/stepper/step.js.map +1 -1
  116. package/components/stepper/stepper.d.ts +98 -53
  117. package/components/stepper/stepper.js +168 -308
  118. package/components/stepper/stepper.js.map +1 -1
  119. package/components/stepper/themes/step/shared/step.bootstrap.css.js +1 -1
  120. package/components/stepper/themes/step/shared/step.bootstrap.css.js.map +1 -1
  121. package/components/stepper/themes/step/shared/step.common.css.js +1 -1
  122. package/components/stepper/themes/step/shared/step.common.css.js.map +1 -1
  123. package/components/stepper/themes/step/shared/step.indigo.css.js +1 -1
  124. package/components/stepper/themes/step/shared/step.indigo.css.js.map +1 -1
  125. package/components/stepper/themes/step/themes.js +2 -3
  126. package/components/stepper/themes/step/themes.js.map +1 -1
  127. package/components/tabs/themes/tabs.base.css.js +1 -1
  128. package/components/tabs/themes/tabs.base.css.js.map +1 -1
  129. package/components/textarea/textarea.js.map +1 -1
  130. package/components/types.d.ts +1 -0
  131. package/components/types.js.map +1 -1
  132. package/components/visually-hidden/visually-hidden.d.ts +49 -0
  133. package/components/visually-hidden/visually-hidden.js +26 -0
  134. package/components/visually-hidden/visually-hidden.js.map +1 -0
  135. package/custom-elements.json +2681 -379
  136. package/igniteui-webcomponents.css-data.json +2 -2
  137. package/igniteui-webcomponents.html-data.json +1 -1
  138. package/index.d.ts +6 -2
  139. package/index.js +2 -0
  140. package/index.js.map +1 -1
  141. package/package.json +3 -1
  142. package/web-types.json +3 -3
  143. package/components/stepper/animations.js.map +0 -1
  144. package/components/stepper/stepper.common.js +0 -2
  145. package/components/stepper/stepper.common.js.map +0 -1
  146. package/components/stepper/themes/step/shared/step.fluent.css.js +0 -3
  147. package/components/stepper/themes/step/shared/step.fluent.css.js.map +0 -1
  148. /package/components/{stepper/themes/step/shared/step.fluent.css.d.ts → highlight/themes/dark/highlight.bootstrap.css.d.ts} +0 -0
  149. /package/components/stepper/{stepper.common.d.ts → common/types.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,oBAAoB,EAAE,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAM9E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EA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C;yDACA;AAO5B;IADT,KAAK,CAAC,MAAM,CAAC;yDAMb;AA9TkB,sBAAsB;IAJ1C,4BAA4B,CAC3B,uFAAuF,CACxF;IACA,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,sBAAsB,CAwsB1C;eAxsBoB,sBAAsB","sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport { convertToDate, createDateConstraints } from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '../common/controllers/key-bindings.js';\nimport { addRootClickController } from '../common/controllers/root-click.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from '../common/i18n/EN/calendar.resources.js';\nimport {\n addI18nController,\n getDateTimeFormat,\n} from '../common/i18n/i18n-controller.js';\nimport { IgcBaseComboBoxLikeComponent } from '../common/mixins/combo-box.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { FormValueDateTimeTransformers } from '../common/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport {\n addSafeEventListener,\n bindIf,\n equal,\n findElementFromEventPath,\n} from '../common/util.js';\nimport type { DatePart } from '../date-time-input/date-part.js';\nimport IgcDateTimeInputComponent from '../date-time-input/date-time-input.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 PickerMode,\n RangeTextSelectMode,\n SelectionRangeDirection,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/date-picker.base.css.js';\nimport { styles as shared } from './themes/shared/date-picker.common.css.js';\nimport { all } from './themes/themes.js';\nimport { datePickerValidators } from './validators.js';\n\nexport interface IgcDatePickerComponentEventMap {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<Date | null>;\n igcInput: CustomEvent<Date | null>;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'bad-input',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid',\n 'title',\n 'header-date',\n 'clear-icon',\n 'calendar-icon',\n 'calendar-icon-open',\n 'actions'\n);\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/**\n * igc-date-picker is a feature rich component used for entering a date through manual text input or\n * choosing date values from a calendar dialog that pops up.\n *\n * @element igc-date-picker\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after the input.\n * @slot helper-text - Renders content below the input.\n * @slot bad-input - Renders content when the value is in the disabledDates ranges.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot range-overflow - Renders content when the max validation fails.\n * @slot range-underflow - Renders content when the min 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 * @slot title - Renders content in the calendar title.\n * @slot header-date - Renders content instead of the current date/range in the calendar header.\n * @slot clear-icon - Renders a clear icon template.\n * @slot calendar-icon - Renders the icon/content for the calendar picker.\n * @slot calendar-icon-open - Renders the icon/content for the picker in open state.\n * @slot actions - Renders content in the action part of the picker in open state.\n *\n * @fires igcOpening - Emitted just before the calendar dropdown is shown.\n * @fires igcOpened - Emitted after the calendar dropdown is shown.\n * @fires igcClosing - Emitted just before the calendar dropdown is hidden.\n * @fires igcClosed - Emitted after the calendar dropdown is hidden.\n * @fires igcChange - Emitted when the user modifies and commits the elements's value.\n * @fires igcInput - Emitted when when the user types in the element.\n *\n * @csspart label - The label wrapper that renders content above the target input.\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart calendar-icon - The calendar icon wrapper for closed state.\n * @csspart calendar-icon-open - The calendar icon wrapper for opened state.\n * @csspart clear-icon - The clear icon wrapper.\n * @csspart actions - The actions wrapper.\n * @csspart helper-text - The helper-text wrapper that renders content below the target input.\n * @csspart header - The calendar header element.\n * @csspart header-title - The calendar header title element.\n * @csspart header-date - The calendar header date element.\n * @csspart calendar-content - The calendar content element which contains the views and navigation elements.\n * @csspart navigation - The calendar navigation container element.\n * @csspart months-navigation - The calendar months navigation button element.\n * @csspart years-navigation - The calendar years navigation button element.\n * @csspart years-range - The calendar years range element.\n * @csspart navigation-buttons - The calendar navigation buttons container.\n * @csspart navigation-button - The calendar previous/next navigation button.\n * @csspart days-view-container - The calendar days view container element.\n * @csspart days-view - The calendar days view element.\n * @csspart months-view - The calendar months view element.\n * @csspart years-view - The calendar years view element.\n * @csspart days-row - The calendar days row element.\n * @csspart calendar-label - The calendar week header label element.\n * @csspart week-number - The calendar week number element.\n * @csspart week-number-inner - The calendar week number inner element.\n * @csspart date - The calendar date element.\n * @csspart date-inner - The calendar date inner element.\n * @csspart first - The calendar first selected date element in range selection.\n * @csspart last - The calendar last selected date element in range selection.\n * @csspart inactive - The calendar inactive date element.\n * @csspart hidden - The calendar hidden date element.\n * @csspart weekend - The calendar weekend date element.\n * @csspart range - The calendar range selected element.\n * @csspart special - The calendar special date element.\n * @csspart disabled - The calendar disabled date element.\n * @csspart single - The calendar single selected date element.\n * @csspart preview - The calendar range selection preview date element.\n * @csspart month - The calendar month element.\n * @csspart month-inner - The calendar month inner element.\n * @csspart year - The calendar year element.\n * @csspart year-inner - The calendar year inner element.\n * @csspart selected - The calendar selected state for element(s). Applies to date, month and year elements.\n * @csspart current - The calendar current state for element(s). Applies to date, month and year elements.\n */\n@blazorAdditionalDependencies(\n 'IgcCalendarComponent, IgcDateTimeInputComponent, IgcDialogComponent, IgcIconComponent'\n)\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcDatePickerComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcDatePickerComponentEventMap,\n AbstractConstructor<IgcBaseComboBoxLikeComponent>\n >(IgcBaseComboBoxLikeComponent)\n) {\n public static readonly tagName = 'igc-date-picker';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcDatePickerComponent,\n IgcCalendarComponent,\n IgcDateTimeInputComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcDialogComponent,\n IgcValidationContainerComponent\n );\n }\n\n //#region Private properties and state\n\n protected override get __validators() {\n return datePickerValidators;\n }\n\n private readonly _inputId = `date-picker-${nextId++}`;\n private readonly _themes = addThemingController(this, all);\n private readonly _slots = addSlotController(this, { slots: Slots });\n\n /**\n * For now we use the core validation strings internally only, to avoid mixing with old resources by users.\n * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings\n */\n protected readonly _i18nController =\n addI18nController<IgcCalendarResourceStrings>(this, {\n defaultEN: IgcCalendarResourceStringEN,\n });\n\n private _oldValue: Date | null = null;\n private _activeDate: Date | null = null;\n private _min: Date | null = null;\n private _max: Date | null = null;\n private _disabledDates?: DateRangeDescriptor[];\n private _dateConstraints?: DateRangeDescriptor[];\n private _inputFormat?: string;\n private _displayFormat?: string;\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueDateTimeTransformers,\n });\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n {\n onHide: this._handleClosing,\n }\n );\n\n @query(IgcDateTimeInputComponent.tagName)\n private readonly _input!: IgcDateTimeInputComponent;\n\n @query(IgcCalendarComponent.tagName)\n private readonly _calendar!: IgcCalendarComponent;\n\n private get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n private get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Sets the state of the datepicker dropdown.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public override open = false;\n\n /**\n * The label of the datepicker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog\n * @attr mode\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the picker\n * @attr\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._formValue.setValueAndFormState(value as Date | null);\n }\n\n public get value(): Date | null {\n return this._formValue.value;\n }\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 minimum value required for the date 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 date 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 /**\n * The orientation of the calendar header.\n * @attr header-orientation\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 */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\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 */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n public set disabledDates(dates: DateRangeDescriptor[]) {\n this._disabledDates = dates;\n this._setDateConstraints();\n this._validate();\n }\n\n public get disabledDates() {\n return this._disabledDates as DateRangeDescriptor[];\n }\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n */\n @property({ type: Number, attribute: 'visible-months' })\n public visibleMonths = 1;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\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._input?.displayFormat;\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._input?.inputFormat;\n }\n\n /** The prompt symbol to use for unfilled parts of the mask.\n * @attr\n */\n @property()\n public prompt = '_';\n\n /**\n * Gets/Sets the locale used for formatting the display value.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale() {\n return this._i18nController.locale;\n }\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IgcCalendarResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IgcCalendarResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /** Sets the start day of the week for the calendar. */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n //#endregion\n\n //#region Watchers\n\n @watch('open')\n protected _openChange(): void {\n this._rootClickController.update();\n if (this.open) {\n this._oldValue = this.value;\n }\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\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 //#endregion\n\n //#region Private methods\n\n private _setDateConstraints(): void {\n this._dateConstraints = createDateConstraints(\n this.min,\n this.max,\n this.disabledDates\n );\n }\n\n private async _shouldCloseCalendarDropdown(): Promise<void> {\n if (!this.keepOpenOnSelect && (await this._hide(true))) {\n this._input.focus();\n this._input.select();\n }\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._input.focus();\n }\n }\n\n protected _handleFocusOut({ relatedTarget }: FocusEvent): void {\n if (!this.contains(relatedTarget as Node)) {\n this._handleBlur();\n\n const readOnly = !this._isDropDown || this.readOnly || this.nonEditable;\n if (readOnly && !equal(this.value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this.value });\n this._oldValue = this.value;\n }\n }\n }\n\n protected _handlerCalendarIconSlotPointerDown(event: PointerEvent) {\n // This is where the delegateFocus of the underlying input is a chore.\n // If we have a required validator we don't want the input to enter an invalid\n // state right off the bat when opening the picker which will happen since focus is transferred to the calendar element.\n // So we call preventDefault on the event in order to not focus the input and trigger its validation logic on blur.\n event.preventDefault();\n }\n\n protected _handleInputClick(event: Event): void {\n if (findElementFromEventPath('input', event)) {\n // Open only if the click originates from the underlying input\n this.handleAnchorClick();\n }\n }\n\n protected override async handleAnchorClick(): Promise<void> {\n this._calendar.activeDate = this.value ?? this._calendar.activeDate;\n\n super.handleAnchorClick();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputChangeEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n this.value = (event.target as IgcDateTimeInputComponent).value!;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date>\n ): Promise<void> {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.readOnly) {\n // Wait till the calendar finishes updating and then restore the current value from the date-picker.\n await this._calendar.updateComplete;\n this._calendar.value = this.value;\n return;\n }\n\n this.value = (event.target as IgcCalendarComponent).value!;\n this.emitEvent('igcChange', { detail: this.value });\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleInputEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.nonEditable) {\n event.preventDefault();\n return;\n }\n\n this.value = (event.target as IgcDateTimeInputComponent).value!;\n this._calendar.activeDate = this.value ?? this._calendar.activeDate;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._oldValue = this.value;\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the input part of the component of any user input */\n public clear(): void {\n this._oldValue = this.value;\n this.value = null;\n this._input?.clear();\n }\n\n /** Increments the passed in date part */\n public stepUp(datePart?: DatePart, delta?: number): void {\n this._input.stepUp(datePart, delta);\n }\n\n /** Decrements the passed in date part */\n public stepDown(datePart?: DatePart, delta?: number): void {\n this._input.stepDown(datePart, delta);\n }\n\n /** Selects the text in the input of the component */\n public select(): void {\n this._input.select();\n }\n\n /** Sets the text selection range in the input of the component */\n public setSelectionRange(\n start: number,\n end: number,\n direction?: SelectionRangeDirection\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* Replaces the selected text in the input and re-applies the mask */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n mode?: RangeTextSelectMode\n ): void {\n this._input.setRangeText(replacement, start, end, mode);\n this.value = this._input.value;\n }\n\n //#endregion\n\n //#region Render methods\n\n private _renderClearIcon() {\n return this.value\n ? html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n <slot name=\"clear-icon\">\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `\n : nothing;\n }\n\n private _renderCalendarIcon() {\n const defaultIcon = html`\n <igc-icon name=\"today\" collection=\"default\" aria-hidden=\"true\"></igc-icon>\n `;\n\n const state = this.open ? 'calendar-icon-open' : 'calendar-icon';\n\n return html`\n <span\n slot=\"prefix\"\n part=${state}\n @pointerdown=${this._handlerCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this.handleAnchorClick)}\n >\n <slot name=${state}>${defaultIcon}</slot>\n </span>\n `;\n }\n\n private _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\">\n ${this.resourceStrings.selectDate}\n </slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n private _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 .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this.value}\n .value=${this.value}\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=\"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, label: calendar-label, 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\"\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 protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover ?open=${this.open} anchor=${id} flip shift>\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderCalendar(id)}${this._renderActions()}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this.resourceStrings.selectDate)}\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._renderCalendar(id)}${this._renderActions()}\n </igc-dialog>\n `;\n }\n\n private _renderLabel(id: string) {\n const isDisabled = this._isDropDown || this.readOnly;\n\n return this.label\n ? html`\n <label\n part=\"label\"\n for=${id}\n @click=${bindIf(!isDisabled, this.handleAnchorClick)}\n >\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n private _renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected _renderInput(id: string) {\n const format = getDateTimeFormat(this._displayFormat);\n\n // Dialog mode is always readonly, rest depends on configuration\n const readOnly = !this._isDropDown || this.readOnly || this.nonEditable;\n\n const hasPrefix = this._slots.hasAssignedElements('prefix');\n const hasSuffix = this._slots.hasAssignedElements('suffix');\n const hasClickHandler = !(this._isDropDown || this.readOnly);\n\n return html`\n <igc-date-time-input\n id=${id}\n aria-haspopup=\"dialog\"\n label=${bindIf(this._isMaterial, this.label)}\n input-format=${ifDefined(this._inputFormat)}\n display-format=${ifDefined(format)}\n ?disabled=${this.disabled}\n ?readonly=${readOnly}\n ?required=${this.required}\n .value=${this.value}\n .locale=${this.locale}\n .prompt=${this.prompt}\n .outlined=${this.outlined}\n .placeholder=${this.placeholder}\n .min=${this.min}\n .max=${this.max}\n .invalid=${this.invalid}\n @igcChange=${this._handleInputChangeEvent}\n @igcInput=${this._handleInputEvent}\n @click=${bindIf(hasClickHandler, this._handleInputClick)}\n exportparts=\"input, label, prefix, suffix\"\n >\n ${this._renderCalendarIcon()}\n <slot name=\"prefix\" slot=${bindIf(hasPrefix, 'prefix')}></slot>\n ${this._renderClearIcon()}\n <slot name=\"suffix\" slot=${bindIf(hasSuffix, 'suffix')}></slot>\n </igc-date-time-input>\n `;\n }\n\n protected override render() {\n const id = this.id || this._inputId;\n\n return html`\n ${this._isMaterial ? nothing : this._renderLabel(id)}\n ${this._renderInput(id)} ${this._renderPicker(id)}\n ${this._renderHelperText()}\n `;\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-date-picker': IgcDatePickerComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,oBAAoB,EAAE,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAM9E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,2BAA2B,GAE5B,MAAM,yCAAyC,CAAC;AACjD,OAAO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0DAC3C;AAOnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;+DAC5C;AAI/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DAK9B;AAQM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACa;AAOrC;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDACnB;AAOjB;IADN,QAAQ,EAAE;2DACiB;AAOrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;6DAC/B;AAOlB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;+DAC5C;AAQ/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;2DAGzC;AAYD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;yDAGvC;AAUM;IADN,QAAQ,EAAE;sDACS;AAOpB;IADC,QAAQ,EAAE;oDAGV;AAUD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DAG9B;AAQM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;yDACA;AAO5B;IADT,KAAK,CAAC,MAAM,CAAC;yDAMb;AA9TkB,sBAAsB;IAJ1C,4BAA4B,CAC3B,uFAAuF,CACxF;IACA,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,sBAAsB,CA0sB1C;eA1sBoB,sBAAsB","sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport { convertToDate, createDateConstraints } from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '../common/controllers/key-bindings.js';\nimport { addRootClickController } from '../common/controllers/root-click.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from '../common/i18n/EN/calendar.resources.js';\nimport {\n addI18nController,\n getDateTimeFormat,\n} from '../common/i18n/i18n-controller.js';\nimport { IgcBaseComboBoxLikeComponent } from '../common/mixins/combo-box.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { FormValueDateTimeTransformers } from '../common/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport {\n addSafeEventListener,\n bindIf,\n equal,\n findElementFromEventPath,\n} from '../common/util.js';\nimport type { DatePart } from '../date-time-input/date-part.js';\nimport IgcDateTimeInputComponent from '../date-time-input/date-time-input.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 PickerMode,\n RangeTextSelectMode,\n SelectionRangeDirection,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/date-picker.base.css.js';\nimport { styles as shared } from './themes/shared/date-picker.common.css.js';\nimport { all } from './themes/themes.js';\nimport { datePickerValidators } from './validators.js';\n\nexport interface IgcDatePickerComponentEventMap {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<Date | null>;\n igcInput: CustomEvent<Date | null>;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'bad-input',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid',\n 'title',\n 'header-date',\n 'clear-icon',\n 'calendar-icon',\n 'calendar-icon-open',\n 'actions'\n);\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/**\n * igc-date-picker is a feature rich component used for entering a date through manual text input or\n * choosing date values from a calendar dialog that pops up.\n *\n * @element igc-date-picker\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after the input.\n * @slot helper-text - Renders content below the input.\n * @slot bad-input - Renders content when the value is in the disabledDates ranges.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot range-overflow - Renders content when the max validation fails.\n * @slot range-underflow - Renders content when the min 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 * @slot title - Renders content in the calendar title.\n * @slot header-date - Renders content instead of the current date/range in the calendar header.\n * @slot clear-icon - Renders a clear icon template.\n * @slot calendar-icon - Renders the icon/content for the calendar picker.\n * @slot calendar-icon-open - Renders the icon/content for the picker in open state.\n * @slot actions - Renders content in the action part of the picker in open state.\n *\n * @fires igcOpening - Emitted just before the calendar dropdown is shown.\n * @fires igcOpened - Emitted after the calendar dropdown is shown.\n * @fires igcClosing - Emitted just before the calendar dropdown is hidden.\n * @fires igcClosed - Emitted after the calendar dropdown is hidden.\n * @fires igcChange - Emitted when the user modifies and commits the elements's value.\n * @fires igcInput - Emitted when when the user types in the element.\n *\n * @csspart label - The label wrapper that renders content above the target input.\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart calendar-icon - The calendar icon wrapper for closed state.\n * @csspart calendar-icon-open - The calendar icon wrapper for opened state.\n * @csspart clear-icon - The clear icon wrapper.\n * @csspart actions - The actions wrapper.\n * @csspart helper-text - The helper-text wrapper that renders content below the target input.\n * @csspart header - The calendar header element.\n * @csspart header-title - The calendar header title element.\n * @csspart header-date - The calendar header date element.\n * @csspart calendar-content - The calendar content element which contains the views and navigation elements.\n * @csspart navigation - The calendar navigation container element.\n * @csspart months-navigation - The calendar months navigation button element.\n * @csspart years-navigation - The calendar years navigation button element.\n * @csspart years-range - The calendar years range element.\n * @csspart navigation-buttons - The calendar navigation buttons container.\n * @csspart navigation-button - The calendar previous/next navigation button.\n * @csspart days-view-container - The calendar days view container element.\n * @csspart days-view - The calendar days view element.\n * @csspart months-view - The calendar months view element.\n * @csspart years-view - The calendar years view element.\n * @csspart days-row - The calendar days row element.\n * @csspart calendar-label - The calendar week header label element.\n * @csspart week-number - The calendar week number element.\n * @csspart week-number-inner - The calendar week number inner element.\n * @csspart date - The calendar date element.\n * @csspart date-inner - The calendar date inner element.\n * @csspart first - The calendar first selected date element in range selection.\n * @csspart last - The calendar last selected date element in range selection.\n * @csspart inactive - The calendar inactive date element.\n * @csspart hidden - The calendar hidden date element.\n * @csspart weekend - The calendar weekend date element.\n * @csspart range - The calendar range selected element.\n * @csspart special - The calendar special date element.\n * @csspart disabled - The calendar disabled date element.\n * @csspart single - The calendar single selected date element.\n * @csspart preview - The calendar range selection preview date element.\n * @csspart month - The calendar month element.\n * @csspart month-inner - The calendar month inner element.\n * @csspart year - The calendar year element.\n * @csspart year-inner - The calendar year inner element.\n * @csspart selected - The calendar selected state for element(s). Applies to date, month and year elements.\n * @csspart current - The calendar current state for element(s). Applies to date, month and year elements.\n */\n@blazorAdditionalDependencies(\n 'IgcCalendarComponent, IgcDateTimeInputComponent, IgcDialogComponent, IgcIconComponent'\n)\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcDatePickerComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcDatePickerComponentEventMap,\n AbstractConstructor<IgcBaseComboBoxLikeComponent>\n >(IgcBaseComboBoxLikeComponent)\n) {\n public static readonly tagName = 'igc-date-picker';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcDatePickerComponent,\n IgcCalendarComponent,\n IgcDateTimeInputComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcDialogComponent,\n IgcValidationContainerComponent\n );\n }\n\n //#region Private properties and state\n\n protected override get __validators() {\n return datePickerValidators;\n }\n\n private readonly _inputId = `date-picker-${nextId++}`;\n private readonly _themes = addThemingController(this, all);\n private readonly _slots = addSlotController(this, { slots: Slots });\n\n /**\n * For now we use the core validation strings internally only, to avoid mixing with old resources by users.\n * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings\n */\n protected readonly _i18nController =\n addI18nController<IgcCalendarResourceStrings>(this, {\n defaultEN: IgcCalendarResourceStringEN,\n });\n\n private _oldValue: Date | null = null;\n private _activeDate: Date | null = null;\n private _min: Date | null = null;\n private _max: Date | null = null;\n private _disabledDates?: DateRangeDescriptor[];\n private _dateConstraints?: DateRangeDescriptor[];\n private _inputFormat?: string;\n private _displayFormat?: string;\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueDateTimeTransformers,\n });\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n {\n onHide: this._handleClosing,\n }\n );\n\n @query(IgcDateTimeInputComponent.tagName)\n private readonly _input!: IgcDateTimeInputComponent;\n\n @query(IgcCalendarComponent.tagName)\n private readonly _calendar!: IgcCalendarComponent;\n\n private get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n private get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Sets the state of the datepicker dropdown.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public override open = false;\n\n /**\n * The label of the datepicker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog\n * @attr mode\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the picker\n * @attr\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._formValue.setValueAndFormState(value as Date | null);\n }\n\n public get value(): Date | null {\n return this._formValue.value;\n }\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 minimum value required for the date 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 date 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 /**\n * The orientation of the calendar header.\n * @attr header-orientation\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 */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\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 */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n public set disabledDates(dates: DateRangeDescriptor[]) {\n this._disabledDates = dates;\n this._setDateConstraints();\n this._validate();\n }\n\n public get disabledDates() {\n return this._disabledDates as DateRangeDescriptor[];\n }\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n */\n @property({ type: Number, attribute: 'visible-months' })\n public visibleMonths = 1;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\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._input?.displayFormat;\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._input?.inputFormat;\n }\n\n /** The prompt symbol to use for unfilled parts of the mask.\n * @attr\n */\n @property()\n public prompt = '_';\n\n /**\n * Gets/Sets the locale used for formatting the display value.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale() {\n return this._i18nController.locale;\n }\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IgcCalendarResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IgcCalendarResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /** Sets the start day of the week for the calendar. */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n //#endregion\n\n //#region Watchers\n\n @watch('open')\n protected _openChange(): void {\n this._rootClickController.update();\n if (this.open) {\n this._oldValue = this.value;\n }\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\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 //#endregion\n\n //#region Private methods\n\n private _setDateConstraints(): void {\n this._dateConstraints = createDateConstraints(\n this.min,\n this.max,\n this.disabledDates\n );\n }\n\n private async _shouldCloseCalendarDropdown(): Promise<void> {\n if (!this.keepOpenOnSelect && (await this._hide(true))) {\n this._input.focus();\n this._input.select();\n }\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._input.focus();\n }\n }\n\n protected _handleFocusOut({ relatedTarget }: FocusEvent): void {\n if (!this.contains(relatedTarget as Node)) {\n this._handleBlur();\n\n const readOnly = !this._isDropDown || this.readOnly || this.nonEditable;\n if (readOnly && !equal(this.value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this.value });\n this._oldValue = this.value;\n }\n }\n }\n\n protected _handlerCalendarIconSlotPointerDown(event: PointerEvent) {\n // This is where the delegateFocus of the underlying input is a chore.\n // If we have a required validator we don't want the input to enter an invalid\n // state right off the bat when opening the picker which will happen since focus is transferred to the calendar element.\n // So we call preventDefault on the event in order to not focus the input and trigger its validation logic on blur.\n event.preventDefault();\n }\n\n protected _handleInputClick(event: Event): void {\n if (findElementFromEventPath('input', event)) {\n // Open only if the click originates from the underlying input\n this.handleAnchorClick();\n }\n }\n\n protected override async handleAnchorClick(): Promise<void> {\n this._calendar.activeDate = this.value ?? this._calendar.activeDate;\n\n super.handleAnchorClick();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputChangeEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n this.value = (event.target as IgcDateTimeInputComponent).value!;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date>\n ): Promise<void> {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.readOnly) {\n // Wait till the calendar finishes updating and then restore the current value from the date-picker.\n await this._calendar.updateComplete;\n this._calendar.value = this.value;\n return;\n }\n\n this.value = (event.target as IgcCalendarComponent).value!;\n this.emitEvent('igcChange', { detail: this.value });\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleInputEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.nonEditable) {\n event.preventDefault();\n return;\n }\n\n this.value = (event.target as IgcDateTimeInputComponent).value!;\n this._calendar.activeDate = this.value ?? this._calendar.activeDate;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._oldValue = this.value;\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the input part of the component of any user input */\n public clear(): void {\n this._oldValue = this.value;\n this.value = null;\n this._input?.clear();\n }\n\n /** Increments the passed in date part */\n public stepUp(datePart?: DatePart, delta?: number): void {\n this._input.stepUp(datePart, delta);\n }\n\n /** Decrements the passed in date part */\n public stepDown(datePart?: DatePart, delta?: number): void {\n this._input.stepDown(datePart, delta);\n }\n\n /** Selects the text in the input of the component */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range in the input of the component */\n public setSelectionRange(\n start: number,\n end: number,\n direction?: SelectionRangeDirection\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /* Replaces the selected text in the input and re-applies the mask */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n mode?: RangeTextSelectMode\n ): void {\n this._input.setRangeText(replacement, start, end, mode);\n this.value = this._input.value;\n }\n\n //#endregion\n\n //#region Render methods\n\n private _renderClearIcon() {\n return this.value\n ? html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n <slot name=\"clear-icon\">\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `\n : nothing;\n }\n\n private _renderCalendarIcon() {\n const defaultIcon = html`\n <igc-icon name=\"today\" collection=\"default\" aria-hidden=\"true\"></igc-icon>\n `;\n\n const state = this.open ? 'calendar-icon-open' : 'calendar-icon';\n\n return html`\n <span\n slot=\"prefix\"\n part=${state}\n @pointerdown=${this._handlerCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this.handleAnchorClick)}\n >\n <slot name=${state}>${defaultIcon}</slot>\n </span>\n `;\n }\n\n private _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\">\n ${this.resourceStrings.selectDate}\n </slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n private _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 .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this.value}\n .value=${this.value}\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=\"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, label: calendar-label, 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\"\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 protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover ?open=${this.open} anchor=${id} flip shift>\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderCalendar(id)}${this._renderActions()}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this.resourceStrings.selectDate)}\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._renderCalendar(id)}${this._renderActions()}\n </igc-dialog>\n `;\n }\n\n private _renderLabel(id: string) {\n const isDisabled = this._isDropDown || this.readOnly;\n\n return this.label\n ? html`\n <label\n part=\"label\"\n for=${id}\n @click=${bindIf(!isDisabled, this.handleAnchorClick)}\n >\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n private _renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected _renderInput(id: string) {\n const format = getDateTimeFormat(this._displayFormat);\n\n // Dialog mode is always readonly, rest depends on configuration\n const readOnly = !this._isDropDown || this.readOnly || this.nonEditable;\n\n const hasPrefix = this._slots.hasAssignedElements('prefix');\n const hasSuffix = this._slots.hasAssignedElements('suffix');\n const hasClickHandler = !(this._isDropDown || this.readOnly);\n\n return html`\n <igc-date-time-input\n id=${id}\n aria-haspopup=\"dialog\"\n label=${bindIf(this._isMaterial, this.label)}\n input-format=${ifDefined(this._inputFormat)}\n display-format=${ifDefined(format)}\n ?disabled=${this.disabled}\n ?readonly=${readOnly}\n ?required=${this.required}\n .value=${this.value}\n .locale=${this.locale}\n .prompt=${this.prompt}\n .outlined=${this.outlined}\n .placeholder=${this.placeholder}\n .min=${this.min}\n .max=${this.max}\n .invalid=${this.invalid}\n @igcChange=${this._handleInputChangeEvent}\n @igcInput=${this._handleInputEvent}\n @click=${bindIf(hasClickHandler, this._handleInputClick)}\n exportparts=\"input, label, prefix, suffix\"\n >\n ${this._renderCalendarIcon()}\n <slot name=\"prefix\" slot=${bindIf(hasPrefix, 'prefix')}></slot>\n ${this._renderClearIcon()}\n <slot name=\"suffix\" slot=${bindIf(hasSuffix, 'suffix')}></slot>\n </igc-date-time-input>\n `;\n }\n\n protected override render() {\n const id = this.id || this._inputId;\n\n return html`\n ${this._isMaterial ? nothing : this._renderLabel(id)}\n ${this._renderInput(id)} ${this._renderPicker(id)}\n ${this._renderHelperText()}\n `;\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-date-picker': IgcDatePickerComponent;\n }\n}\n"]}
@@ -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,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,qBAAqB,GAEtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,+BAA+B,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAUjD,MAAM,KAAK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IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;2BACtB,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;iBAC9C,IAAI,CAAC,YAAY;kBAChB,IAAI,CAAC,aAAa;kBAClB,IAAI,CAAC,aAAa;gBACpB,IAAI,CAAC,WAAW;;KAE3B,CAAC;IACJ,CAAC;;AAtKO;IADP,KAAK,EAAE;gEAC0B;AAalC;IADC,QAAQ,EAAE;kDAKV;AAUD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DAG9B;AAWD;IADC,QAAQ,EAAE;mDAGV;AAcM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACnB;AAQjB;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 { addThemingController } from '../../theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { addI18nController } from '../common/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '../common/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { bindIf, hasFiles } from '../common/util.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\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\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 control's checked state 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 EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n>(IgcInputBaseComponent) {\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 readonly _i18nController = addI18nController(this, {\n defaultEN: FileInputResourceStringsEN,\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 * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IFileInputResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IFileInputResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /**\n * Gets/Sets the locale used for getting language, affecting resource strings.\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 multiple attribute of the control.\n * Used to indicate that a file input 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 accept attribute of the control.\n * Defines the file types as a list of comma-separated values that the file input should accept.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * The autofocus attribute of the control.\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 protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n super._restoreDefaultValue();\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 ${this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`}\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n const hasHelperText = this._slots.hasAssignedElements('helper-text');\n\n return html`\n <input\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 aria-describedby=${bindIf(hasHelperText, 'helper-text')}\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,0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ClB,IAAI,CAAC,aAAa;gBACpB,IAAI,CAAC,WAAW;;KAE3B,CAAC;IACJ,CAAC;;AAtKO;IADP,KAAK,EAAE;gEAC0B;AAalC;IADC,QAAQ,EAAE;kDAKV;AAUD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DAG9B;AAWD;IADC,QAAQ,EAAE;mDAGV;AAcM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACnB;AAQjB;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 { addThemingController } from '../../theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { addI18nController } from '../common/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '../common/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { bindIf, hasFiles } from '../common/util.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\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 control's checked state 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 EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n>(IgcInputBaseComponent) {\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 readonly _i18nController = addI18nController(this, {\n defaultEN: FileInputResourceStringsEN,\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 * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IFileInputResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IFileInputResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /**\n * Gets/Sets the locale used for getting language, affecting resource strings.\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 multiple attribute of the control.\n * Used to indicate that a file input 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 accept attribute of the control.\n * Defines the file types as a list of comma-separated values that the file input should accept.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * The autofocus attribute of the control.\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 protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n super._restoreDefaultValue();\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 ${this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`}\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n const hasHelperText = this._slots.hasAssignedElements('helper-text');\n\n return html`\n <input\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 aria-describedby=${bindIf(hasHelperText, 'helper-text')}\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"]}
@@ -0,0 +1,130 @@
1
+ import { LitElement } from 'lit';
2
+ import { type HighlightNavigation } from './service.js';
3
+ /**
4
+ * The highlight component provides efficient searching and highlighting of text
5
+ * projected into it via its default slot. It uses the native CSS Custom Highlight API
6
+ * to apply highlight styles to matched text nodes without modifying the DOM.
7
+ *
8
+ * The component supports case-sensitive matching, programmatic navigation between
9
+ * matches, and automatic scroll-into-view of the active match.
10
+ *
11
+ * @element igc-highlight
12
+ *
13
+ * @slot - The default slot. Place the text content you want to search and highlight here.
14
+ *
15
+ * @cssproperty --foreground - The text color for a highlighted text node.
16
+ * @cssproperty --background - The background color for a highlighted text node.
17
+ * @cssproperty --foreground-active - The text color for the active highlighted text node.
18
+ * @cssproperty --background-active - The background color for the active highlighted text node.
19
+ *
20
+ * @example
21
+ * Basic usage — wrap your text and set the `search-text` attribute:
22
+ * ```html
23
+ * <igc-highlight search-text="world">
24
+ * <p>Hello, world! The world is a wonderful place.</p>
25
+ * </igc-highlight>
26
+ * ```
27
+ *
28
+ * @example
29
+ * Case-sensitive search:
30
+ * ```html
31
+ * <igc-highlight search-text="Hello" case-sensitive>
32
+ * <p>Hello hello HELLO — only the first one matches.</p>
33
+ * </igc-highlight>
34
+ * ```
35
+ *
36
+ * @example
37
+ * Navigating between matches programmatically:
38
+ * ```typescript
39
+ * const highlight = document.querySelector('igc-highlight');
40
+ *
41
+ * highlight.searchText = 'world';
42
+ * console.log(highlight.size); // total number of matches
43
+ * console.log(highlight.current); // index of the active match (0-based)
44
+ *
45
+ * highlight.next(); // move to the next match
46
+ * highlight.previous(); // move to the previous match
47
+ * highlight.setActive(2); // jump to a specific match by index
48
+ * ```
49
+ *
50
+ * @example
51
+ * Prevent scroll-into-view when navigating:
52
+ * ```typescript
53
+ * const highlight = document.querySelector('igc-highlight');
54
+ * highlight.next({ preventScroll: true });
55
+ * ```
56
+ *
57
+ * @example
58
+ * Re-run search after dynamic content changes (e.g. lazy-loaded text):
59
+ * ```typescript
60
+ * const highlight = document.querySelector('igc-highlight');
61
+ * // After slotted content has been updated:
62
+ * highlight.search();
63
+ * ```
64
+ */
65
+ export default class IgcHighlightComponent extends LitElement {
66
+ static readonly tagName = "igc-highlight";
67
+ static styles: import("lit").CSSResult[];
68
+ static register(): void;
69
+ private readonly _service;
70
+ private _caseSensitive;
71
+ private _searchText;
72
+ /**
73
+ * Whether to match the searched text with case sensitivity in mind.
74
+ * When `true`, only exact-case occurrences of `searchText` are highlighted.
75
+ *
76
+ * @attr case-sensitive
77
+ * @default false
78
+ */
79
+ set caseSensitive(value: boolean);
80
+ get caseSensitive(): boolean;
81
+ /**
82
+ * The string to search and highlight in the DOM content of the component.
83
+ * Setting this property triggers a new search automatically.
84
+ * An empty string clears all highlights.
85
+ *
86
+ * @attr search-text
87
+ */
88
+ set searchText(value: string);
89
+ get searchText(): string;
90
+ /** The total number of matches found for the current `searchText`. Returns `0` when there are no matches or `searchText` is empty. */
91
+ get size(): number;
92
+ /** The zero-based index of the currently active (focused) match. Returns `0` when there are no matches. */
93
+ get current(): number;
94
+ constructor();
95
+ private _addStylesheet;
96
+ /**
97
+ * Moves the active highlight to the next match.
98
+ * Wraps around to the first match after the last one.
99
+ *
100
+ * @param options - Optional navigation options (e.g. `preventScroll`).
101
+ */
102
+ next(options?: HighlightNavigation): void;
103
+ /**
104
+ * Moves the active highlight to the previous match.
105
+ * Wraps around to the last match when going back from the first one.
106
+ *
107
+ * @param options - Optional navigation options (e.g. `preventScroll`).
108
+ */
109
+ previous(options?: HighlightNavigation): void;
110
+ /**
111
+ * Moves the active highlight to the match at the specified zero-based index.
112
+ *
113
+ * @param index - The zero-based index of the match to activate.
114
+ * @param options - Optional navigation options (e.g. `preventScroll`).
115
+ */
116
+ setActive(index: number, options?: HighlightNavigation): void;
117
+ /**
118
+ * Re-runs the highlight search based on the current `searchText` and `caseSensitive` values.
119
+ *
120
+ * Call this method after the slotted content changes dynamically (e.g. after lazy loading
121
+ * or programmatic DOM mutations) to ensure all matches are up to date.
122
+ */
123
+ search(): void;
124
+ protected render(): import("lit-html").TemplateResult<1>;
125
+ }
126
+ declare global {
127
+ interface HTMLElementTagNameMap {
128
+ 'igc-highlight': IgcHighlightComponent;
129
+ }
130
+ }
@@ -0,0 +1,77 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, LitElement } from 'lit';
8
+ import { property } from 'lit/decorators.js';
9
+ import { addThemingController } from '../../theming/theming-controller.js';
10
+ import { registerComponent } from '../common/definitions/register.js';
11
+ import { createHighlightController, } from './service.js';
12
+ import { styles as shared } from './themes/shared/highlight.common.css.js';
13
+ import { all } from './themes/themes.js';
14
+ export default class IgcHighlightComponent extends LitElement {
15
+ static { this.tagName = 'igc-highlight'; }
16
+ static { this.styles = [shared]; }
17
+ static register() {
18
+ registerComponent(IgcHighlightComponent);
19
+ }
20
+ set caseSensitive(value) {
21
+ this._caseSensitive = value;
22
+ this.search();
23
+ }
24
+ get caseSensitive() {
25
+ return this._caseSensitive;
26
+ }
27
+ set searchText(value) {
28
+ this._searchText = value;
29
+ this.search();
30
+ }
31
+ get searchText() {
32
+ return this._searchText;
33
+ }
34
+ get size() {
35
+ return this._service.size;
36
+ }
37
+ get current() {
38
+ return this._service.current;
39
+ }
40
+ constructor() {
41
+ super();
42
+ this._service = createHighlightController(this);
43
+ this._caseSensitive = false;
44
+ this._searchText = '';
45
+ addThemingController(this, all, {
46
+ themeChange: this._addStylesheet,
47
+ });
48
+ }
49
+ _addStylesheet() {
50
+ this._service.attachStylesheet();
51
+ }
52
+ next(options) {
53
+ this._service.next(options);
54
+ }
55
+ previous(options) {
56
+ this._service.previous(options);
57
+ }
58
+ setActive(index, options) {
59
+ this._service.setActive(index, options);
60
+ }
61
+ search() {
62
+ if (this.hasUpdated) {
63
+ this._service.clear();
64
+ this._service.find(this.searchText);
65
+ }
66
+ }
67
+ render() {
68
+ return html `<slot></slot>`;
69
+ }
70
+ }
71
+ __decorate([
72
+ property({ type: Boolean, reflect: true, attribute: 'case-sensitive' })
73
+ ], IgcHighlightComponent.prototype, "caseSensitive", null);
74
+ __decorate([
75
+ property({ attribute: 'search-text' })
76
+ ], IgcHighlightComponent.prototype, "searchText", null);
77
+ //# sourceMappingURL=highlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/components/highlight/highlight.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,yBAAyB,GAE1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAgEzC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU;aACpC,YAAO,GAAG,eAAe,AAAlB,CAAmB;aAC1B,WAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;IAGlC,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;IAC3C,CAAC;IAqBD,IAAW,aAAa,CAAC,KAAc;QACrC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAUD,IAAW,UAAU,CAAC,KAAa;QACjC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,IAAW,UAAU;QACnB,OAAO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;0DAIvE;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;uDAItC","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport {\n createHighlightController,\n type HighlightNavigation,\n} from './service.js';\nimport { styles as shared } from './themes/shared/highlight.common.css.js';\nimport { all } from './themes/themes.js';\n\n/**\n * The highlight component provides efficient searching and highlighting of text\n * projected into it via its default slot. It uses the native CSS Custom Highlight API\n * to apply highlight styles to matched text nodes without modifying the DOM.\n *\n * The component supports case-sensitive matching, programmatic navigation between\n * matches, and automatic scroll-into-view of the active match.\n *\n * @element igc-highlight\n *\n * @slot - The default slot. Place the text content you want to search and highlight here.\n *\n * @cssproperty --foreground - The text color for a highlighted text node.\n * @cssproperty --background - The background color for a highlighted text node.\n * @cssproperty --foreground-active - The text color for the active highlighted text node.\n * @cssproperty --background-active - The background color for the active highlighted text node.\n *\n * @example\n * Basic usage — wrap your text and set the `search-text` attribute:\n * ```html\n * <igc-highlight search-text=\"world\">\n * <p>Hello, world! The world is a wonderful place.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Case-sensitive search:\n * ```html\n * <igc-highlight search-text=\"Hello\" case-sensitive>\n * <p>Hello hello HELLO — only the first one matches.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Navigating between matches programmatically:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n *\n * highlight.searchText = 'world';\n * console.log(highlight.size); // total number of matches\n * console.log(highlight.current); // index of the active match (0-based)\n *\n * highlight.next(); // move to the next match\n * highlight.previous(); // move to the previous match\n * highlight.setActive(2); // jump to a specific match by index\n * ```\n *\n * @example\n * Prevent scroll-into-view when navigating:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * highlight.next({ preventScroll: true });\n * ```\n *\n * @example\n * Re-run search after dynamic content changes (e.g. lazy-loaded text):\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * // After slotted content has been updated:\n * highlight.search();\n * ```\n */\nexport default class IgcHighlightComponent extends LitElement {\n public static readonly tagName = 'igc-highlight';\n public static override styles = [shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcHighlightComponent);\n }\n\n //#region Internal properties and state\n\n private readonly _service = createHighlightController(this);\n\n private _caseSensitive = false;\n private _searchText = '';\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Whether to match the searched text with case sensitivity in mind.\n * When `true`, only exact-case occurrences of `searchText` are highlighted.\n *\n * @attr case-sensitive\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'case-sensitive' })\n public set caseSensitive(value: boolean) {\n this._caseSensitive = value;\n this.search();\n }\n\n public get caseSensitive(): boolean {\n return this._caseSensitive;\n }\n\n /**\n * The string to search and highlight in the DOM content of the component.\n * Setting this property triggers a new search automatically.\n * An empty string clears all highlights.\n *\n * @attr search-text\n */\n @property({ attribute: 'search-text' })\n public set searchText(value: string) {\n this._searchText = value;\n this.search();\n }\n\n public get searchText(): string {\n return this._searchText;\n }\n\n /** The total number of matches found for the current `searchText`. Returns `0` when there are no matches or `searchText` is empty. */\n public get size(): number {\n return this._service.size;\n }\n\n /** The zero-based index of the currently active (focused) match. Returns `0` when there are no matches. */\n public get current(): number {\n return this._service.current;\n }\n\n //#endregion\n\n constructor() {\n super();\n\n addThemingController(this, all, {\n themeChange: this._addStylesheet,\n });\n }\n\n //#region Internal methods\n\n private _addStylesheet(): void {\n this._service.attachStylesheet();\n }\n\n //#endregion\n\n //#region Public methods\n\n /**\n * Moves the active highlight to the next match.\n * Wraps around to the first match after the last one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public next(options?: HighlightNavigation): void {\n this._service.next(options);\n }\n\n /**\n * Moves the active highlight to the previous match.\n * Wraps around to the last match when going back from the first one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public previous(options?: HighlightNavigation): void {\n this._service.previous(options);\n }\n\n /**\n * Moves the active highlight to the match at the specified zero-based index.\n *\n * @param index - The zero-based index of the match to activate.\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public setActive(index: number, options?: HighlightNavigation): void {\n this._service.setActive(index, options);\n }\n\n /**\n * Re-runs the highlight search based on the current `searchText` and `caseSensitive` values.\n *\n * Call this method after the slotted content changes dynamically (e.g. after lazy loading\n * or programmatic DOM mutations) to ensure all matches are up to date.\n */\n public search(): void {\n if (this.hasUpdated) {\n this._service.clear();\n this._service.find(this.searchText);\n }\n }\n\n //#endregion\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-highlight': IgcHighlightComponent;\n }\n}\n"]}
@@ -0,0 +1,58 @@
1
+ import { type ReactiveController } from 'lit';
2
+ import type IgcHighlightComponent from './highlight.js';
3
+ /**
4
+ * Options for controlling navigation behavior when moving the active highlight.
5
+ */
6
+ export type HighlightNavigation = {
7
+ /** If true, prevents the component from scrolling the new active match into view. */
8
+ preventScroll?: boolean;
9
+ };
10
+ declare class HighlightService implements ReactiveController {
11
+ private readonly _host;
12
+ private readonly _id;
13
+ private readonly _activeId;
14
+ private readonly _styles;
15
+ private readonly _styleSheet?;
16
+ private _highlight;
17
+ private _activeHighlight;
18
+ private _ranges;
19
+ private _current;
20
+ /**
21
+ * The total number of matches found in the component's content.
22
+ */
23
+ get size(): number;
24
+ /**
25
+ * The index of the currently active match. Returns 0 if there are no matches.
26
+ */
27
+ get current(): number;
28
+ constructor(host: IgcHighlightComponent);
29
+ /** @internal */
30
+ hostConnected(): void;
31
+ /** @internal */
32
+ hostDisconnected(): void;
33
+ private _removeStyleSheet;
34
+ private _createHighlightEntries;
35
+ private _removeHighlightEntries;
36
+ private _createRegex;
37
+ private _updateActiveHighlight;
38
+ private _goTo;
39
+ /**
40
+ * Attaches the service's stylesheet to the render root.
41
+ * Necessary for the component to apply highlight styles to its content.
42
+ */
43
+ attachStylesheet(): void;
44
+ /**
45
+ * Finds matches for the given search text in the component's content and creates highlight ranges for them.
46
+ */
47
+ find(value: string): void;
48
+ /** Moves the active state to the next match. */
49
+ next(options?: HighlightNavigation): void;
50
+ /** Moves the active state to the previous match. */
51
+ previous(options?: HighlightNavigation): void;
52
+ /** Moves the active state to the given index. */
53
+ setActive(index: number, options?: HighlightNavigation): void;
54
+ /** Clears highlight collections. */
55
+ clear(): void;
56
+ }
57
+ export declare function createHighlightController(host: IgcHighlightComponent): HighlightService;
58
+ export {};