igniteui-webcomponents 7.2.3 → 7.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -0
- package/animations/player.d.ts +4 -11
- package/animations/player.js +4 -10
- package/animations/player.js.map +1 -1
- package/animations/view-transition.d.ts +44 -0
- package/animations/view-transition.js +81 -0
- package/animations/view-transition.js.map +1 -0
- package/components/accordion/accordion.d.ts +1 -1
- package/components/accordion/accordion.js +7 -6
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.js +10 -10
- package/components/avatar/avatar.js.map +1 -1
- package/components/avatar/themes/themes.d.ts +1 -1
- package/components/avatar/themes/themes.js.map +1 -1
- package/components/badge/badge.d.ts +1 -1
- package/components/badge/badge.js +5 -5
- package/components/badge/badge.js.map +1 -1
- package/components/badge/themes/themes.d.ts +1 -1
- package/components/badge/themes/themes.js.map +1 -1
- package/components/banner/banner.d.ts +2 -2
- package/components/banner/banner.js +8 -8
- package/components/banner/banner.js.map +1 -1
- package/components/banner/themes/themes.d.ts +1 -1
- package/components/banner/themes/themes.js.map +1 -1
- package/components/button/button-base.d.ts +2 -2
- package/components/button/button-base.js +15 -12
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.d.ts +3 -3
- package/components/button/button.js +2 -2
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.js +12 -12
- package/components/button/icon-button.js.map +1 -1
- package/components/button/themes/button/themes.d.ts +1 -1
- package/components/button/themes/button/themes.js.map +1 -1
- package/components/button/themes/icon-button/themes.d.ts +1 -1
- package/components/button/themes/icon-button/themes.js.map +1 -1
- package/components/button-group/button-group.d.ts +42 -21
- package/components/button-group/button-group.js +101 -106
- package/components/button-group/button-group.js.map +1 -1
- package/components/button-group/themes/button.d.ts +1 -1
- package/components/button-group/themes/button.js.map +1 -1
- package/components/button-group/themes/group.d.ts +1 -1
- package/components/button-group/themes/group.js.map +1 -1
- package/components/button-group/toggle-button.d.ts +17 -10
- package/components/button-group/toggle-button.js +28 -13
- package/components/button-group/toggle-button.js.map +1 -1
- package/components/calendar/base.d.ts +29 -10
- package/components/calendar/base.js +12 -15
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +39 -8
- package/components/calendar/calendar.js +96 -85
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +49 -22
- package/components/calendar/days-view/days-view.js +102 -163
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +3 -62
- package/components/calendar/helpers.js +6 -110
- package/components/calendar/helpers.js.map +1 -1
- package/components/calendar/months-view/months-view.d.ts +7 -21
- package/components/calendar/months-view/months-view.js +30 -83
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/selection.d.ts +21 -0
- package/components/calendar/selection.js +42 -0
- package/components/calendar/selection.js.map +1 -0
- package/components/calendar/themes/calendar.d.ts +1 -1
- package/components/calendar/themes/calendar.js.map +1 -1
- package/components/calendar/themes/days.d.ts +1 -1
- package/components/calendar/themes/days.js.map +1 -1
- package/components/calendar/themes/year-month.d.ts +1 -1
- package/components/calendar/themes/year-month.js.map +1 -1
- package/components/calendar/types.d.ts +18 -0
- package/components/calendar/types.js.map +1 -1
- package/components/calendar/year-month-view.base.d.ts +44 -0
- package/components/calendar/year-month-view.base.js +89 -0
- package/components/calendar/year-month-view.base.js.map +1 -0
- package/components/calendar/years-view/years-view.d.ts +7 -20
- package/components/calendar/years-view/years-view.js +25 -79
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.js +2 -2
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.d.ts +1 -1
- package/components/card/card.content.js +2 -2
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.d.ts +1 -1
- package/components/card/card.header.js +2 -2
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +2 -2
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.d.ts +1 -1
- package/components/card/card.media.js +1 -1
- package/components/card/card.media.js.map +1 -1
- package/components/card/themes/actions.d.ts +1 -1
- package/components/card/themes/actions.js.map +1 -1
- package/components/card/themes/container.d.ts +1 -1
- package/components/card/themes/container.js.map +1 -1
- package/components/card/themes/content.d.ts +1 -1
- package/components/card/themes/content.js.map +1 -1
- package/components/card/themes/header.d.ts +1 -1
- package/components/card/themes/header.js.map +1 -1
- package/components/carousel/animations.d.ts +1 -1
- package/components/carousel/animations.js +2 -2
- package/components/carousel/animations.js.map +1 -1
- package/components/carousel/carousel-indicator-container.js +4 -4
- package/components/carousel/carousel-indicator-container.js.map +1 -1
- package/components/carousel/carousel-indicator.d.ts +1 -1
- package/components/carousel/carousel-indicator.js +5 -5
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.d.ts +1 -1
- package/components/carousel/carousel-slide.js +9 -9
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.d.ts +7 -7
- package/components/carousel/carousel.js +40 -30
- package/components/carousel/carousel.js.map +1 -1
- package/components/carousel/themes/container.d.ts +1 -1
- package/components/carousel/themes/container.js.map +1 -1
- package/components/carousel/themes/indicator-container.d.ts +1 -1
- package/components/carousel/themes/indicator-container.js.map +1 -1
- package/components/chat/chat-input.d.ts +4 -4
- package/components/chat/chat-input.js +13 -12
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat-message.d.ts +1 -1
- package/components/chat/chat-message.js +7 -6
- package/components/chat/chat-message.js.map +1 -1
- package/components/chat/chat-state.d.ts +2 -2
- package/components/chat/chat-state.js +2 -1
- package/components/chat/chat-state.js.map +1 -1
- package/components/chat/chat.d.ts +4 -4
- package/components/chat/chat.js +13 -13
- package/components/chat/chat.js.map +1 -1
- package/components/chat/message-attachments.js +5 -5
- package/components/chat/message-attachments.js.map +1 -1
- package/components/chat/themes/attachments.d.ts +1 -1
- package/components/chat/themes/attachments.js.map +1 -1
- package/components/chat/themes/input.d.ts +1 -1
- package/components/chat/themes/input.js.map +1 -1
- package/components/chat/themes/message.d.ts +1 -1
- package/components/chat/themes/message.js.map +1 -1
- package/components/chat/themes/themes.d.ts +1 -1
- package/components/chat/themes/themes.js.map +1 -1
- package/components/chat/types.d.ts +2 -2
- package/components/chat/types.js.map +1 -1
- package/components/chat/utils.d.ts +1 -1
- package/components/chat/utils.js +3 -3
- package/components/chat/utils.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +7 -7
- package/components/checkbox/checkbox-base.js +7 -7
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.js +7 -6
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +7 -6
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/checkbox-themes.d.ts +1 -1
- package/components/checkbox/themes/checkbox-themes.js.map +1 -1
- package/components/checkbox/themes/switch-themes.d.ts +1 -1
- package/components/checkbox/themes/switch-themes.js.map +1 -1
- package/components/checkbox/validators.d.ts +1 -1
- package/components/checkbox/validators.js +1 -1
- package/components/checkbox/validators.js.map +1 -1
- package/components/chip/chip.d.ts +9 -3
- package/components/chip/chip.js +10 -6
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/dark/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/dark/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/dark/chip.fluent.css.js +1 -1
- package/components/chip/themes/dark/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/dark/chip.indigo.css.js +1 -1
- package/components/chip/themes/dark/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/dark/chip.material.css.js +1 -1
- package/components/chip/themes/dark/chip.material.css.js.map +1 -1
- package/components/chip/themes/light/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/light/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/light/chip.fluent.css.js +1 -1
- package/components/chip/themes/light/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/light/chip.indigo.css.js +1 -1
- package/components/chip/themes/light/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/light/chip.material.css.js +1 -1
- package/components/chip/themes/light/chip.material.css.js.map +1 -1
- package/components/chip/themes/light/chip.shared.css.js +1 -1
- package/components/chip/themes/light/chip.shared.css.js.map +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/shared/chip.common.css.js +1 -1
- package/components/chip/themes/shared/chip.common.css.js.map +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/themes.d.ts +1 -1
- package/components/chip/themes/themes.js.map +1 -1
- package/components/combo/combo-header.js +2 -2
- package/components/combo/combo-header.js.map +1 -1
- package/components/combo/combo-item.d.ts +0 -2
- package/components/combo/combo-item.js +4 -7
- package/components/combo/combo-item.js.map +1 -1
- package/components/combo/combo.d.ts +84 -26
- package/components/combo/combo.js +197 -152
- package/components/combo/combo.js.map +1 -1
- package/components/combo/controllers/data.d.ts +30 -3
- package/components/combo/controllers/data.js +34 -9
- package/components/combo/controllers/data.js.map +1 -1
- package/components/combo/controllers/navigation.d.ts +8 -2
- package/components/combo/controllers/navigation.js +11 -12
- package/components/combo/controllers/navigation.js.map +1 -1
- package/components/combo/operations/filter.d.ts +17 -1
- package/components/combo/operations/filter.js +29 -9
- package/components/combo/operations/filter.js.map +1 -1
- package/components/combo/operations/group.js +1 -1
- package/components/combo/operations/group.js.map +1 -1
- package/components/combo/themes/combo.base.css.js +1 -1
- package/components/combo/themes/combo.base.css.js.map +1 -1
- package/components/combo/themes/themes.d.ts +1 -1
- package/components/combo/themes/themes.js.map +1 -1
- package/components/combo/types.d.ts +8 -4
- package/components/combo/types.js.map +1 -1
- package/components/combo/validators.d.ts +1 -1
- package/components/combo/validators.js.map +1 -1
- package/components/date-picker/date-picker.base.d.ts +294 -0
- package/components/date-picker/date-picker.base.js +480 -0
- package/components/date-picker/date-picker.base.js.map +1 -0
- package/components/date-picker/date-picker.d.ts +52 -172
- package/components/date-picker/date-picker.js +88 -393
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/themes.d.ts +1 -1
- package/components/date-picker/themes/themes.js.map +1 -1
- package/components/date-picker/validators.d.ts +1 -1
- package/components/date-picker/validators.js +2 -2
- package/components/date-picker/validators.js.map +1 -1
- package/components/date-range-picker/date-range-input.d.ts +12 -14
- package/components/date-range-picker/date-range-input.js +42 -98
- package/components/date-range-picker/date-range-input.js.map +1 -1
- package/components/date-range-picker/date-range-mask-parser.d.ts +22 -34
- package/components/date-range-picker/date-range-mask-parser.js +38 -69
- package/components/date-range-picker/date-range-mask-parser.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +98 -191
- package/components/date-range-picker/date-range-picker.js +210 -530
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.d.ts +2 -2
- package/components/date-range-picker/predefined-ranges-area.js +5 -5
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-range-picker/themes/ranges-themes.d.ts +1 -1
- package/components/date-range-picker/themes/ranges-themes.js.map +1 -1
- package/components/date-range-picker/themes/themes.d.ts +1 -1
- package/components/date-range-picker/themes/themes.js.map +1 -1
- package/components/date-range-picker/validators.d.ts +1 -1
- package/components/date-range-picker/validators.js +15 -22
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-part.d.ts +18 -1
- package/components/date-time-input/date-part.js +10 -0
- package/components/date-time-input/date-part.js.map +1 -1
- package/components/date-time-input/date-time-input.base.d.ts +74 -12
- package/components/date-time-input/date-time-input.base.js +99 -27
- package/components/date-time-input/date-time-input.base.js.map +1 -1
- package/components/date-time-input/date-time-input.d.ts +13 -23
- package/components/date-time-input/date-time-input.js +45 -65
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/datetime-mask-parser.d.ts +45 -109
- package/components/date-time-input/datetime-mask-parser.js +88 -139
- package/components/date-time-input/datetime-mask-parser.js.map +1 -1
- package/components/date-time-input/validators.d.ts +1 -1
- package/components/date-time-input/validators.js +2 -2
- package/components/date-time-input/validators.js.map +1 -1
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +21 -22
- package/components/dialog/dialog.js.map +1 -1
- package/components/dialog/themes/themes.d.ts +1 -1
- package/components/dialog/themes/themes.js.map +1 -1
- package/components/divider/divider.d.ts +2 -1
- package/components/divider/divider.js +3 -3
- package/components/divider/divider.js.map +1 -1
- package/components/divider/themes/themes.d.ts +1 -1
- package/components/divider/themes/themes.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +10 -3
- package/components/dropdown/dropdown-group.js +21 -5
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.d.ts +2 -2
- package/components/dropdown/dropdown-header.js +7 -2
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown-item.d.ts +4 -4
- package/components/dropdown/dropdown-item.js +3 -3
- package/components/dropdown/dropdown-item.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +75 -32
- package/components/dropdown/dropdown.js +189 -110
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/themes/container.d.ts +1 -1
- package/components/dropdown/themes/container.js.map +1 -1
- package/components/dropdown/themes/group.d.ts +1 -1
- package/components/dropdown/themes/group.js.map +1 -1
- package/components/dropdown/themes/header.d.ts +1 -1
- package/components/dropdown/themes/header.js.map +1 -1
- package/components/dropdown/themes/item.d.ts +1 -1
- package/components/dropdown/themes/item.js.map +1 -1
- package/components/expansion-panel/expansion-panel.d.ts +14 -5
- package/components/expansion-panel/expansion-panel.js +10 -9
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/expansion-panel/themes/themes.d.ts +1 -1
- package/components/expansion-panel/themes/themes.js.map +1 -1
- package/components/file-input/file-input.d.ts +20 -12
- package/components/file-input/file-input.js +17 -12
- package/components/file-input/file-input.js.map +1 -1
- package/components/file-input/themes/themes.d.ts +1 -1
- package/components/file-input/themes/themes.js.map +1 -1
- package/components/file-input/validators.d.ts +1 -1
- package/components/file-input/validators.js +1 -1
- package/components/file-input/validators.js.map +1 -1
- package/components/focus-trap/focus-trap.js +3 -2
- package/components/focus-trap/focus-trap.js.map +1 -1
- package/components/highlight/highlight.js +2 -2
- package/components/highlight/highlight.js.map +1 -1
- package/components/highlight/service.d.ts +4 -1
- package/components/highlight/service.js +23 -7
- package/components/highlight/service.js.map +1 -1
- package/components/highlight/themes/themes.d.ts +1 -1
- package/components/highlight/themes/themes.js.map +1 -1
- package/components/icon/icon-references.d.ts +3 -2
- package/components/icon/icon-references.js +103 -491
- package/components/icon/icon-references.js.map +1 -1
- package/components/icon/icon-state.broadcast.d.ts +14 -17
- package/components/icon/icon-state.broadcast.js +19 -20
- package/components/icon/icon-state.broadcast.js.map +1 -1
- package/components/icon/icon.d.ts +14 -25
- package/components/icon/icon.js +37 -24
- package/components/icon/icon.js.map +1 -1
- package/components/icon/icon.registry.d.ts +69 -131
- package/components/icon/icon.registry.js +51 -53
- package/components/icon/icon.registry.js.map +1 -1
- package/components/icon/internal-icons-lib.js +2 -2
- package/components/icon/internal-icons-lib.js.map +1 -1
- package/components/icon/registry/parser.d.ts +15 -3
- package/components/icon/registry/parser.js +36 -11
- package/components/icon/registry/parser.js.map +1 -1
- package/components/icon/registry/types.d.ts +55 -11
- package/components/icon/registry/types.js.map +1 -1
- package/components/icon/themes/icon.base.css.js +1 -1
- package/components/icon/themes/icon.base.css.js.map +1 -1
- package/components/icon/themes/shared/icon.common.css.js +1 -1
- package/components/icon/themes/shared/icon.common.css.js.map +1 -1
- package/components/icon/themes/themes.d.ts +1 -1
- package/components/icon/themes/themes.js.map +1 -1
- package/components/input/input-base.d.ts +12 -12
- package/components/input/input-base.js +13 -15
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +15 -12
- package/components/input/input.js +8 -8
- package/components/input/input.js.map +1 -1
- package/components/input/themes/input.base.css.js +1 -1
- package/components/input/themes/input.base.css.js.map +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.common.css.js +1 -1
- package/components/input/themes/shared/input.common.css.js.map +1 -1
- package/components/input/themes/shared/input.fluent.css.js +1 -1
- package/components/input/themes/shared/input.fluent.css.js.map +1 -1
- package/components/input/themes/shared/input.indigo.css.js +1 -1
- package/components/input/themes/shared/input.indigo.css.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/input/themes/themes.d.ts +1 -1
- package/components/input/themes/themes.js.map +1 -1
- package/components/input/validators.d.ts +1 -1
- package/components/input/validators.js +1 -1
- package/components/input/validators.js.map +1 -1
- package/components/list/list-header.js +3 -3
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.js +3 -3
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.js +3 -3
- package/components/list/list.js.map +1 -1
- package/components/list/themes/container.d.ts +1 -1
- package/components/list/themes/container.js.map +1 -1
- package/components/list/themes/header.d.ts +1 -1
- package/components/list/themes/header.js.map +1 -1
- package/components/list/themes/item.d.ts +1 -1
- package/components/list/themes/item.js.map +1 -1
- package/components/mask-input/mask-history.d.ts +99 -0
- package/components/mask-input/mask-history.js +95 -0
- package/components/mask-input/mask-history.js.map +1 -0
- package/components/mask-input/mask-input.d.ts +14 -9
- package/components/mask-input/mask-input.js +20 -23
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/mask-parser.d.ts +20 -2
- package/components/mask-input/mask-parser.js +21 -13
- package/components/mask-input/mask-parser.js.map +1 -1
- package/components/mask-input/validators.d.ts +1 -1
- package/components/mask-input/validators.js +1 -1
- package/components/mask-input/validators.js.map +1 -1
- package/components/nav-drawer/nav-drawer-header-item.d.ts +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js +2 -2
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.d.ts +2 -2
- package/components/nav-drawer/nav-drawer-item.js +4 -4
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +3 -3
- package/components/nav-drawer/nav-drawer.js +11 -14
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/nav-drawer/themes/container.base.css.js +1 -1
- package/components/nav-drawer/themes/container.base.css.js.map +1 -1
- package/components/nav-drawer/themes/container.d.ts +1 -1
- package/components/nav-drawer/themes/container.js +2 -3
- package/components/nav-drawer/themes/container.js.map +1 -1
- package/components/nav-drawer/themes/dark/container/nav-drawer.shared.css.js +1 -1
- package/components/nav-drawer/themes/dark/container/nav-drawer.shared.css.js.map +1 -1
- package/components/nav-drawer/themes/header-item.d.ts +1 -1
- package/components/nav-drawer/themes/header-item.js.map +1 -1
- package/components/nav-drawer/themes/item.d.ts +1 -1
- package/components/nav-drawer/themes/item.js.map +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.bootstrap.css.js +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.bootstrap.css.js.map +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.fluent.css.js +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.fluent.css.js.map +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.indigo.css.js +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.indigo.css.js.map +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.shared.css.js +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.shared.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.bootstrap.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.bootstrap.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.material.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.material.css.js.map +1 -1
- package/components/navbar/navbar.js +2 -2
- package/components/navbar/navbar.js.map +1 -1
- package/components/navbar/themes/themes.d.ts +1 -1
- package/components/navbar/themes/themes.js.map +1 -1
- package/components/popover/popover.d.ts +10 -3
- package/components/popover/popover.js +114 -99
- package/components/popover/popover.js.map +1 -1
- package/components/progress/base.d.ts +1 -1
- package/components/progress/base.js +5 -4
- package/components/progress/base.js.map +1 -1
- package/components/progress/circular-gradient.d.ts +2 -2
- package/components/progress/circular-gradient.js +1 -1
- package/components/progress/circular-gradient.js.map +1 -1
- package/components/progress/circular-progress.d.ts +15 -15
- package/components/progress/circular-progress.js +7 -6
- package/components/progress/circular-progress.js.map +1 -1
- package/components/progress/linear-progress.d.ts +12 -12
- package/components/progress/linear-progress.js +4 -4
- package/components/progress/linear-progress.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
- package/components/progress/themes/circular/themes.d.ts +1 -1
- package/components/progress/themes/circular/themes.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/themes.d.ts +1 -1
- package/components/progress/themes/linear/themes.js.map +1 -1
- package/components/qr-code/model/encode.d.ts +20 -0
- package/components/qr-code/model/encode.js +166 -0
- package/components/qr-code/model/encode.js.map +1 -0
- package/components/qr-code/model/error-correction.d.ts +15 -0
- package/components/qr-code/model/error-correction.js +1114 -0
- package/components/qr-code/model/error-correction.js.map +1 -0
- package/components/qr-code/model/mask.d.ts +11 -0
- package/components/qr-code/model/mask.js +161 -0
- package/components/qr-code/model/mask.js.map +1 -0
- package/components/qr-code/model/matrix.d.ts +15 -0
- package/components/qr-code/model/matrix.js +277 -0
- package/components/qr-code/model/matrix.js.map +1 -0
- package/components/qr-code/qr-code.d.ts +134 -0
- package/components/qr-code/qr-code.js +221 -0
- package/components/qr-code/qr-code.js.map +1 -0
- package/components/qr-code/renderer/constants.d.ts +26 -0
- package/components/qr-code/renderer/constants.js +5 -0
- package/components/qr-code/renderer/constants.js.map +1 -0
- package/components/qr-code/renderer/corner.d.ts +23 -0
- package/components/qr-code/renderer/corner.js +25 -0
- package/components/qr-code/renderer/corner.js.map +1 -0
- package/components/qr-code/renderer/dots.d.ts +14 -0
- package/components/qr-code/renderer/dots.js +7 -0
- package/components/qr-code/renderer/dots.js.map +1 -0
- package/components/qr-code/renderer/helpers.d.ts +18 -0
- package/components/qr-code/renderer/helpers.js +158 -0
- package/components/qr-code/renderer/helpers.js.map +1 -0
- package/components/qr-code/renderer/image.d.ts +23 -0
- package/components/qr-code/renderer/image.js +29 -0
- package/components/qr-code/renderer/image.js.map +1 -0
- package/components/qr-code/themes/dark/qr-code.bootstrap.css.js +3 -0
- package/components/qr-code/themes/dark/qr-code.bootstrap.css.js.map +1 -0
- package/components/qr-code/themes/dark/qr-code.fluent.css.d.ts +1 -0
- package/components/qr-code/themes/dark/qr-code.fluent.css.js +3 -0
- package/components/qr-code/themes/dark/qr-code.fluent.css.js.map +1 -0
- package/components/qr-code/themes/dark/qr-code.indigo.css.d.ts +1 -0
- package/components/qr-code/themes/dark/qr-code.indigo.css.js +3 -0
- package/components/qr-code/themes/dark/qr-code.indigo.css.js.map +1 -0
- package/components/qr-code/themes/dark/qr-code.material.css.d.ts +1 -0
- package/components/qr-code/themes/dark/qr-code.material.css.js +3 -0
- package/components/qr-code/themes/dark/qr-code.material.css.js.map +1 -0
- package/components/qr-code/themes/light/qr-code.bootstrap.css.d.ts +1 -0
- package/components/qr-code/themes/light/qr-code.bootstrap.css.js +3 -0
- package/components/qr-code/themes/light/qr-code.bootstrap.css.js.map +1 -0
- package/components/qr-code/themes/light/qr-code.fluent.css.d.ts +1 -0
- package/components/qr-code/themes/light/qr-code.fluent.css.js +3 -0
- package/components/qr-code/themes/light/qr-code.fluent.css.js.map +1 -0
- package/components/qr-code/themes/light/qr-code.indigo.css.d.ts +1 -0
- package/components/qr-code/themes/light/qr-code.indigo.css.js +3 -0
- package/components/qr-code/themes/light/qr-code.indigo.css.js.map +1 -0
- package/components/qr-code/themes/light/qr-code.material.css.d.ts +1 -0
- package/components/qr-code/themes/light/qr-code.material.css.js +3 -0
- package/components/qr-code/themes/light/qr-code.material.css.js.map +1 -0
- package/components/qr-code/themes/light/qr-code.shared.css.d.ts +1 -0
- package/components/qr-code/themes/light/qr-code.shared.css.js +3 -0
- package/components/qr-code/themes/light/qr-code.shared.css.js.map +1 -0
- package/components/qr-code/themes/qr-code.base.css.d.ts +1 -0
- package/components/qr-code/themes/qr-code.base.css.js +3 -0
- package/components/qr-code/themes/qr-code.base.css.js.map +1 -0
- package/components/qr-code/themes/shared/qr-code.common.css.d.ts +1 -0
- package/components/qr-code/themes/shared/qr-code.common.css.js +3 -0
- package/components/qr-code/themes/shared/qr-code.common.css.js.map +1 -0
- package/components/qr-code/themes/themes.d.ts +2 -0
- package/components/qr-code/themes/themes.js +46 -0
- package/components/qr-code/themes/themes.js.map +1 -0
- package/components/qr-code/types.d.ts +16 -0
- package/components/qr-code/types.js +2 -0
- package/components/qr-code/types.js.map +1 -0
- package/components/radio/controller.d.ts +35 -0
- package/components/radio/controller.js +100 -0
- package/components/radio/controller.js.map +1 -0
- package/components/radio/radio.d.ts +26 -14
- package/components/radio/radio.js +47 -36
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/themes.d.ts +1 -1
- package/components/radio/themes/themes.js.map +1 -1
- package/components/radio/validators.d.ts +1 -1
- package/components/radio/validators.js +5 -3
- package/components/radio/validators.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +19 -10
- package/components/radio-group/radio-group.js +50 -41
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/radio-group/themes/themes.d.ts +1 -1
- package/components/radio-group/themes/themes.js.map +1 -1
- package/components/rating/rating-symbol.d.ts +1 -1
- package/components/rating/rating-symbol.js +1 -1
- package/components/rating/rating-symbol.js.map +1 -1
- package/components/rating/rating.d.ts +6 -6
- package/components/rating/rating.js +12 -9
- package/components/rating/rating.js.map +1 -1
- package/components/rating/themes/themes.d.ts +1 -1
- package/components/rating/themes/themes.js.map +1 -1
- package/components/resize-container/resize-container.d.ts +4 -4
- package/components/resize-container/resize-container.js +4 -4
- package/components/resize-container/resize-container.js.map +1 -1
- package/components/resize-container/resize-controller.js +2 -2
- package/components/resize-container/resize-controller.js.map +1 -1
- package/components/resize-container/themes/themes.d.ts +1 -1
- package/components/resize-container/themes/themes.js.map +1 -1
- package/components/ripple/ripple.d.ts +1 -1
- package/components/ripple/ripple.js +3 -2
- package/components/ripple/ripple.js.map +1 -1
- package/components/select/select-group.d.ts +9 -2
- package/components/select/select-group.js +21 -5
- package/components/select/select-group.js.map +1 -1
- package/components/select/select-header.d.ts +1 -1
- package/components/select/select-header.js +7 -2
- package/components/select/select-header.js.map +1 -1
- package/components/select/select-item.d.ts +4 -4
- package/components/select/select-item.js +3 -3
- package/components/select/select-item.js.map +1 -1
- package/components/select/select.d.ts +49 -22
- package/components/select/select.js +132 -67
- package/components/select/select.js.map +1 -1
- package/components/select/themes/select.base.css.js +1 -1
- package/components/select/themes/select.base.css.js.map +1 -1
- package/components/select/themes/themes.d.ts +1 -1
- package/components/select/themes/themes.js.map +1 -1
- package/components/select/validators.d.ts +1 -1
- package/components/select/validators.js +1 -1
- package/components/select/validators.js.map +1 -1
- package/components/slider/range-slider.d.ts +2 -2
- package/components/slider/range-slider.js +8 -8
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.js +18 -14
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider-label.js +1 -1
- package/components/slider/slider-label.js.map +1 -1
- package/components/slider/slider.d.ts +3 -3
- package/components/slider/slider.js +6 -6
- package/components/slider/slider.js.map +1 -1
- package/components/slider/themes/themes.d.ts +1 -1
- package/components/slider/themes/themes.js.map +1 -1
- package/components/snackbar/snackbar.d.ts +3 -3
- package/components/snackbar/snackbar.js +8 -8
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/snackbar/themes/themes.d.ts +1 -1
- package/components/snackbar/themes/themes.js.map +1 -1
- package/components/splitter/splitter.d.ts +106 -23
- package/components/splitter/splitter.js +234 -147
- package/components/splitter/splitter.js.map +1 -1
- package/components/splitter/themes/themes.d.ts +1 -1
- package/components/splitter/themes/themes.js.map +1 -1
- package/components/splitter/types.d.ts +14 -3
- package/components/splitter/types.js.map +1 -1
- package/components/stepper/common/animations.d.ts +1 -1
- package/components/stepper/common/animations.js +2 -2
- package/components/stepper/common/animations.js.map +1 -1
- package/components/stepper/step.d.ts +1 -1
- package/components/stepper/step.js +7 -7
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.d.ts +5 -5
- package/components/stepper/stepper.js +12 -9
- package/components/stepper/stepper.js.map +1 -1
- package/components/stepper/themes/step/themes.d.ts +1 -1
- package/components/stepper/themes/step/themes.js.map +1 -1
- package/components/tabs/tab-dom.d.ts +31 -28
- package/components/tabs/tab-dom.js +84 -34
- package/components/tabs/tab-dom.js.map +1 -1
- package/components/tabs/tab.d.ts +24 -6
- package/components/tabs/tab.js +34 -13
- package/components/tabs/tab.js.map +1 -1
- package/components/tabs/tabs.d.ts +36 -22
- package/components/tabs/tabs.js +118 -88
- package/components/tabs/tabs.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.indigo.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.indigo.css.js.map +1 -1
- package/components/tabs/themes/tab-themes.d.ts +1 -1
- package/components/tabs/themes/tab-themes.js.map +1 -1
- package/components/tabs/themes/tabs-themes.d.ts +1 -1
- package/components/tabs/themes/tabs-themes.js.map +1 -1
- package/components/tabs/themes/tabs.base.css.js +1 -1
- package/components/tabs/themes/tabs.base.css.js.map +1 -1
- package/components/textarea/textarea.d.ts +19 -14
- package/components/textarea/textarea.js +22 -16
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/themes.d.ts +1 -1
- package/components/textarea/themes/themes.js.map +1 -1
- package/components/textarea/validators.d.ts +1 -1
- package/components/textarea/validators.js +1 -1
- package/components/textarea/validators.js.map +1 -1
- package/components/theme-provider/theme-provider.d.ts +1 -1
- package/components/theme-provider/theme-provider.js +2 -2
- package/components/theme-provider/theme-provider.js.map +1 -1
- package/components/tile-manager/position.d.ts +1 -1
- package/components/tile-manager/position.js +2 -2
- package/components/tile-manager/position.js.map +1 -1
- package/components/tile-manager/resize-state.js +4 -3
- package/components/tile-manager/resize-state.js.map +1 -1
- package/components/tile-manager/themes/container.d.ts +1 -1
- package/components/tile-manager/themes/container.js.map +1 -1
- package/components/tile-manager/themes/tile.d.ts +1 -1
- package/components/tile-manager/themes/tile.js.map +1 -1
- package/components/tile-manager/tile-ghost-util.js +1 -1
- package/components/tile-manager/tile-ghost-util.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +1 -1
- package/components/tile-manager/tile-manager.js +7 -7
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.d.ts +4 -4
- package/components/tile-manager/tile.js +29 -25
- package/components/tile-manager/tile.js.map +1 -1
- package/components/toast/themes/themes.d.ts +1 -1
- package/components/toast/themes/themes.js.map +1 -1
- package/components/toast/toast.d.ts +1 -1
- package/components/toast/toast.js +3 -3
- package/components/toast/toast.js.map +1 -1
- package/components/tooltip/controller.d.ts +18 -16
- package/components/tooltip/controller.js +62 -41
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/service.d.ts +2 -1
- package/components/tooltip/service.js +10 -15
- package/components/tooltip/service.js.map +1 -1
- package/components/tooltip/themes/shared/tooltip.common.css.js +1 -1
- package/components/tooltip/themes/shared/tooltip.common.css.js.map +1 -1
- package/components/tooltip/themes/shared/tooltip.indigo.css.js +1 -1
- package/components/tooltip/themes/shared/tooltip.indigo.css.js.map +1 -1
- package/components/tooltip/themes/themes.d.ts +1 -1
- package/components/tooltip/themes/themes.js.map +1 -1
- package/components/tooltip/themes/tooltip.base.css.js +1 -1
- package/components/tooltip/themes/tooltip.base.css.js.map +1 -1
- package/components/tooltip/tooltip.d.ts +64 -18
- package/components/tooltip/tooltip.js +112 -62
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/themes/container.base.css.js +1 -1
- package/components/tree/themes/container.base.css.js.map +1 -1
- package/components/tree/themes/container.d.ts +1 -1
- package/components/tree/themes/container.js.map +1 -1
- package/components/tree/themes/item.base.css.js +1 -1
- package/components/tree/themes/item.base.css.js.map +1 -1
- package/components/tree/themes/item.d.ts +1 -1
- package/components/tree/themes/item.js.map +1 -1
- package/components/tree/tree-item.d.ts +62 -36
- package/components/tree/tree-item.js +223 -233
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.common.d.ts +16 -1
- package/components/tree/tree.common.js +40 -1
- package/components/tree/tree.common.js.map +1 -1
- package/components/tree/tree.d.ts +21 -14
- package/components/tree/tree.js +64 -72
- package/components/tree/tree.js.map +1 -1
- package/components/tree/tree.navigation.d.ts +39 -29
- package/components/tree/tree.navigation.js +140 -192
- package/components/tree/tree.navigation.js.map +1 -1
- package/components/tree/tree.selection.d.ts +32 -31
- package/components/tree/tree.selection.js +184 -178
- package/components/tree/tree.selection.js.map +1 -1
- package/components/types.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +33 -6
- package/components/validation-container/validation-container.js +81 -70
- package/components/validation-container/validation-container.js.map +1 -1
- package/components/virtualization/engine.d.ts +92 -0
- package/components/virtualization/engine.js +217 -0
- package/components/virtualization/engine.js.map +1 -0
- package/components/virtualization/types.d.ts +53 -0
- package/components/virtualization/types.js +14 -0
- package/components/virtualization/types.js.map +1 -0
- package/components/virtualization/virtualization.d.ts +235 -0
- package/components/virtualization/virtualization.js +474 -0
- package/components/virtualization/virtualization.js.map +1 -0
- package/components/visually-hidden/visually-hidden.js +1 -1
- package/components/visually-hidden/visually-hidden.js.map +1 -1
- package/custom-elements.json +57500 -47242
- package/extras/chat-markdown-renderer.d.ts +1 -1
- package/extras/chat-markdown-renderer.js.map +1 -1
- package/igniteui-webcomponents.css-data.json +2 -2
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +20 -15
- package/index.js +11 -9
- package/index.js.map +1 -1
- package/internals/abort-handler.js.map +1 -0
- package/internals/context.d.ts +39 -0
- package/{components/common → internals}/context.js +2 -1
- package/internals/context.js.map +1 -0
- package/internals/controllers/adopt-styles.d.ts +76 -0
- package/internals/controllers/adopt-styles.js +173 -0
- package/internals/controllers/adopt-styles.js.map +1 -0
- package/internals/controllers/aria-projection.d.ts +144 -0
- package/internals/controllers/aria-projection.js +138 -0
- package/internals/controllers/aria-projection.js.map +1 -0
- package/{components/common → internals}/controllers/async-consumer.js +8 -7
- package/internals/controllers/async-consumer.js.map +1 -0
- package/internals/controllers/command.js.map +1 -0
- package/{components/common → internals}/controllers/drag.js +3 -2
- package/internals/controllers/drag.js.map +1 -0
- package/{components/common → internals}/controllers/focus-ring.js +5 -2
- package/internals/controllers/focus-ring.js.map +1 -0
- package/{components/common → internals}/controllers/fullscreen.js +6 -3
- package/internals/controllers/fullscreen.js.map +1 -0
- package/{components/common → internals}/controllers/gestures.d.ts +1 -1
- package/{components/common → internals}/controllers/gestures.js +4 -4
- package/internals/controllers/gestures.js.map +1 -0
- package/{components/common → internals}/controllers/id-resolver.js +15 -21
- package/internals/controllers/id-resolver.js.map +1 -0
- package/{components/common → internals}/controllers/internals.d.ts +48 -3
- package/{components/common → internals}/controllers/internals.js +32 -0
- package/internals/controllers/internals.js.map +1 -0
- package/{components/common → internals}/controllers/key-bindings.d.ts +3 -6
- package/{components/common → internals}/controllers/key-bindings.js +43 -29
- package/internals/controllers/key-bindings.js.map +1 -0
- package/{components/common → internals}/controllers/mutation-observer.d.ts +5 -4
- package/internals/controllers/mutation-observer.js +74 -0
- package/internals/controllers/mutation-observer.js.map +1 -0
- package/{components/common → internals}/controllers/resize-observer.d.ts +11 -1
- package/{components/common → internals}/controllers/resize-observer.js +13 -2
- package/internals/controllers/resize-observer.js.map +1 -0
- package/{components/common → internals}/controllers/root-click.js +8 -13
- package/internals/controllers/root-click.js.map +1 -0
- package/{components/common → internals}/controllers/root-scroll.d.ts +11 -8
- package/internals/controllers/root-scroll.js +71 -0
- package/internals/controllers/root-scroll.js.map +1 -0
- package/{components/common → internals}/controllers/slot.d.ts +18 -2
- package/{components/common → internals}/controllers/slot.js +21 -6
- package/internals/controllers/slot.js.map +1 -0
- package/internals/date/compare.d.ts +2 -0
- package/internals/date/compare.js +23 -0
- package/internals/date/compare.js.map +1 -0
- package/internals/date/converters.d.ts +18 -0
- package/internals/date/converters.js +73 -0
- package/internals/date/converters.js.map +1 -0
- package/{components/calendar → internals/date}/model.d.ts +6 -3
- package/{components/calendar → internals/date}/model.js +23 -0
- package/internals/date/model.js.map +1 -0
- package/internals/decorators/blazorAdditionalDependencies.js.map +1 -0
- package/internals/decorators/blazorDeepImport.js.map +1 -0
- package/internals/decorators/blazorInclude.js.map +1 -0
- package/internals/decorators/blazorIndirectRender.js.map +1 -0
- package/internals/decorators/blazorSuppressComponent.js.map +1 -0
- package/internals/decorators/shadow-options.js.map +1 -0
- package/internals/decorators/watch.js.map +1 -0
- package/internals/definitions/defineAllComponents.js +153 -0
- package/internals/definitions/defineAllComponents.js.map +1 -0
- package/internals/definitions/defineComponents.js.map +1 -0
- package/internals/definitions/register.js.map +1 -0
- package/{components/common → internals}/i18n/EN/calendar.resources.js +1 -1
- package/internals/i18n/EN/calendar.resources.js.map +1 -0
- package/internals/i18n/EN/chat.resources.js.map +1 -0
- package/internals/i18n/EN/date-picker.resources.js.map +1 -0
- package/internals/i18n/EN/date-range-picker.resources.js.map +1 -0
- package/internals/i18n/i18n-controller.js.map +1 -0
- package/{components/common → internals}/i18n/utils.js +1 -1
- package/internals/i18n/utils.js.map +1 -0
- package/{components/common → internals}/mixins/alert.d.ts +2 -2
- package/{components/common → internals}/mixins/alert.js +3 -3
- package/internals/mixins/alert.js.map +1 -0
- package/{components/common → internals}/mixins/combo-box.d.ts +10 -2
- package/{components/common → internals}/mixins/combo-box.js +9 -4
- package/internals/mixins/combo-box.js.map +1 -0
- package/internals/mixins/constructor.js.map +1 -0
- package/internals/mixins/event-emitter.js.map +1 -0
- package/{components/common → internals}/mixins/forms/associated-required.js +10 -19
- package/internals/mixins/forms/associated-required.js.map +1 -0
- package/{components/common → internals}/mixins/forms/associated.d.ts +1 -1
- package/{components/common → internals}/mixins/forms/associated.js +66 -51
- package/internals/mixins/forms/associated.js.map +1 -0
- package/{components/common → internals}/mixins/forms/form-transformers.d.ts +1 -1
- package/{components/common → internals}/mixins/forms/form-transformers.js +2 -2
- package/internals/mixins/forms/form-transformers.js.map +1 -0
- package/internals/mixins/forms/form-value.js.map +1 -0
- package/{components/common → internals}/mixins/forms/types.d.ts +7 -7
- package/internals/mixins/forms/types.js.map +1 -0
- package/{components/common → internals}/mixins/mask-behavior.d.ts +11 -3
- package/{components/common → internals}/mixins/mask-behavior.js +117 -29
- package/internals/mixins/mask-behavior.js.map +1 -0
- package/{components/common → internals}/mixins/option.d.ts +0 -2
- package/{components/common → internals}/mixins/option.js +1 -4
- package/internals/mixins/option.js.map +1 -0
- package/internals/part-map.js.map +1 -0
- package/{components/common → internals}/templates/input-shell.d.ts +8 -1
- package/{components/common → internals}/templates/input-shell.js +14 -4
- package/internals/templates/input-shell.js.map +1 -0
- package/{components/common → internals}/templates/masked-input.d.ts +8 -2
- package/{components/common → internals}/templates/masked-input.js +5 -3
- package/internals/templates/masked-input.js.map +1 -0
- package/internals/utils/arrays.d.ts +53 -0
- package/internals/utils/arrays.js +31 -0
- package/internals/utils/arrays.js.map +1 -0
- package/internals/utils/dom.d.ts +92 -0
- package/internals/utils/dom.js +143 -0
- package/internals/utils/dom.js.map +1 -0
- package/internals/utils/events.d.ts +41 -0
- package/internals/utils/events.js +37 -0
- package/internals/utils/events.js.map +1 -0
- package/internals/utils/lit.d.ts +8 -0
- package/internals/utils/lit.js +15 -0
- package/internals/utils/lit.js.map +1 -0
- package/internals/utils/math.d.ts +50 -0
- package/internals/utils/math.js +38 -0
- package/internals/utils/math.js.map +1 -0
- package/internals/utils/objects.d.ts +25 -0
- package/internals/utils/objects.js +125 -0
- package/internals/utils/objects.js.map +1 -0
- package/internals/utils/strings.d.ts +44 -0
- package/internals/utils/strings.js +46 -0
- package/internals/utils/strings.js.map +1 -0
- package/internals/utils/types.d.ts +13 -0
- package/internals/utils/types.js +31 -0
- package/internals/utils/types.js.map +1 -0
- package/{components/common → internals}/validators.d.ts +1 -1
- package/{components/common → internals}/validators.js +4 -2
- package/internals/validators.js.map +1 -0
- package/package.json +15 -7
- package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -1
- package/themes/dark/bootstrap.css +1 -1
- package/themes/dark/fluent.css +1 -1
- package/themes/dark/indigo.css +1 -1
- package/themes/dark/material.css +1 -1
- package/themes/light/bootstrap.css +1 -1
- package/themes/light/fluent.css +1 -1
- package/themes/light/indigo.css +1 -1
- package/themes/light/material.css +1 -1
- package/theming/theming-controller.d.ts +2 -2
- package/theming/theming-controller.js.map +1 -1
- package/web-types.json +3 -3
- package/components/calendar/model.js.map +0 -1
- package/components/combo/combo-list.d.ts +0 -11
- package/components/combo/combo-list.js +0 -13
- package/components/combo/combo-list.js.map +0 -1
- package/components/common/abort-handler.js.map +0 -1
- package/components/common/context.d.ts +0 -25
- package/components/common/context.js.map +0 -1
- package/components/common/controllers/adopt-styles.d.ts +0 -124
- package/components/common/controllers/adopt-styles.js +0 -75
- package/components/common/controllers/adopt-styles.js.map +0 -1
- package/components/common/controllers/async-consumer.js.map +0 -1
- package/components/common/controllers/command.js.map +0 -1
- package/components/common/controllers/drag.js.map +0 -1
- package/components/common/controllers/focus-ring.js.map +0 -1
- package/components/common/controllers/fullscreen.js.map +0 -1
- package/components/common/controllers/gestures.js.map +0 -1
- package/components/common/controllers/id-resolver.js.map +0 -1
- package/components/common/controllers/internals.js.map +0 -1
- package/components/common/controllers/key-bindings.js.map +0 -1
- package/components/common/controllers/mutation-observer.js +0 -69
- package/components/common/controllers/mutation-observer.js.map +0 -1
- package/components/common/controllers/resize-observer.js.map +0 -1
- package/components/common/controllers/root-click.js.map +0 -1
- package/components/common/controllers/root-scroll.js +0 -63
- package/components/common/controllers/root-scroll.js.map +0 -1
- package/components/common/controllers/slot.js.map +0 -1
- package/components/common/decorators/blazorAdditionalDependencies.js.map +0 -1
- package/components/common/decorators/blazorDeepImport.js.map +0 -1
- package/components/common/decorators/blazorInclude.js.map +0 -1
- package/components/common/decorators/blazorIndirectRender.js.map +0 -1
- package/components/common/decorators/blazorSuppressComponent.js.map +0 -1
- package/components/common/decorators/shadow-options.js.map +0 -1
- package/components/common/decorators/watch.js.map +0 -1
- package/components/common/definitions/defineAllComponents.js +0 -151
- package/components/common/definitions/defineAllComponents.js.map +0 -1
- package/components/common/definitions/defineComponents.js.map +0 -1
- package/components/common/definitions/register.js.map +0 -1
- package/components/common/i18n/EN/calendar.resources.js.map +0 -1
- package/components/common/i18n/EN/chat.resources.js.map +0 -1
- package/components/common/i18n/EN/date-picker.resources.js.map +0 -1
- package/components/common/i18n/EN/date-range-picker.resources.js.map +0 -1
- package/components/common/i18n/i18n-controller.js.map +0 -1
- package/components/common/i18n/utils.js.map +0 -1
- package/components/common/mixins/alert.js.map +0 -1
- package/components/common/mixins/combo-box.js.map +0 -1
- package/components/common/mixins/constructor.js.map +0 -1
- package/components/common/mixins/event-emitter.js.map +0 -1
- package/components/common/mixins/forms/associated-required.js.map +0 -1
- package/components/common/mixins/forms/associated.js.map +0 -1
- package/components/common/mixins/forms/form-transformers.js.map +0 -1
- package/components/common/mixins/forms/form-value.js.map +0 -1
- package/components/common/mixins/forms/types.js.map +0 -1
- package/components/common/mixins/mask-behavior.js.map +0 -1
- package/components/common/mixins/option.js.map +0 -1
- package/components/common/part-map.js.map +0 -1
- package/components/common/templates/input-shell.js.map +0 -1
- package/components/common/templates/masked-input.js.map +0 -1
- package/components/common/util.d.ts +0 -196
- package/components/common/util.js +0 -390
- package/components/common/util.js.map +0 -1
- package/components/common/validators.js.map +0 -1
- package/components/icon/registry/default-map.d.ts +0 -107
- package/components/icon/registry/default-map.js +0 -25
- package/components/icon/registry/default-map.js.map +0 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.js +0 -3
- package/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.js.map +0 -1
- package/components/radio/utils.d.ts +0 -13
- package/components/radio/utils.js +0 -37
- package/components/radio/utils.js.map +0 -1
- /package/components/{nav-drawer/themes/shared/container/nav-drawer.fluent.css.d.ts → qr-code/themes/dark/qr-code.bootstrap.css.d.ts} +0 -0
- /package/{components/common → internals}/abort-handler.d.ts +0 -0
- /package/{components/common → internals}/abort-handler.js +0 -0
- /package/{components/common → internals}/controllers/async-consumer.d.ts +0 -0
- /package/{components/common → internals}/controllers/command.d.ts +0 -0
- /package/{components/common → internals}/controllers/command.js +0 -0
- /package/{components/common → internals}/controllers/drag.d.ts +0 -0
- /package/{components/common → internals}/controllers/focus-ring.d.ts +0 -0
- /package/{components/common → internals}/controllers/fullscreen.d.ts +0 -0
- /package/{components/common → internals}/controllers/id-resolver.d.ts +0 -0
- /package/{components/common → internals}/controllers/root-click.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorAdditionalDependencies.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorAdditionalDependencies.js +0 -0
- /package/{components/common → internals}/decorators/blazorDeepImport.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorDeepImport.js +0 -0
- /package/{components/common → internals}/decorators/blazorInclude.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorInclude.js +0 -0
- /package/{components/common → internals}/decorators/blazorIndirectRender.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorIndirectRender.js +0 -0
- /package/{components/common → internals}/decorators/blazorSuppressComponent.d.ts +0 -0
- /package/{components/common → internals}/decorators/blazorSuppressComponent.js +0 -0
- /package/{components/common → internals}/decorators/shadow-options.d.ts +0 -0
- /package/{components/common → internals}/decorators/shadow-options.js +0 -0
- /package/{components/common → internals}/decorators/watch.d.ts +0 -0
- /package/{components/common → internals}/decorators/watch.js +0 -0
- /package/{components/common → internals}/definitions/defineAllComponents.d.ts +0 -0
- /package/{components/common → internals}/definitions/defineComponents.d.ts +0 -0
- /package/{components/common → internals}/definitions/defineComponents.js +0 -0
- /package/{components/common → internals}/definitions/register.d.ts +0 -0
- /package/{components/common → internals}/definitions/register.js +0 -0
- /package/{components/common → internals}/i18n/EN/calendar.resources.d.ts +0 -0
- /package/{components/common → internals}/i18n/EN/chat.resources.d.ts +0 -0
- /package/{components/common → internals}/i18n/EN/chat.resources.js +0 -0
- /package/{components/common → internals}/i18n/EN/date-picker.resources.d.ts +0 -0
- /package/{components/common → internals}/i18n/EN/date-picker.resources.js +0 -0
- /package/{components/common → internals}/i18n/EN/date-range-picker.resources.d.ts +0 -0
- /package/{components/common → internals}/i18n/EN/date-range-picker.resources.js +0 -0
- /package/{components/common → internals}/i18n/i18n-controller.d.ts +0 -0
- /package/{components/common → internals}/i18n/i18n-controller.js +0 -0
- /package/{components/common → internals}/i18n/utils.d.ts +0 -0
- /package/{components/common → internals}/mixins/constructor.d.ts +0 -0
- /package/{components/common → internals}/mixins/constructor.js +0 -0
- /package/{components/common → internals}/mixins/event-emitter.d.ts +0 -0
- /package/{components/common → internals}/mixins/event-emitter.js +0 -0
- /package/{components/common → internals}/mixins/forms/associated-required.d.ts +0 -0
- /package/{components/common → internals}/mixins/forms/form-value.d.ts +0 -0
- /package/{components/common → internals}/mixins/forms/form-value.js +0 -0
- /package/{components/common → internals}/mixins/forms/types.js +0 -0
- /package/{components/common → internals}/part-map.d.ts +0 -0
- /package/{components/common → internals}/part-map.js +0 -0
|
@@ -4,10 +4,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
import { isServer } from 'lit';
|
|
7
8
|
import { property } from 'lit/decorators.js';
|
|
8
9
|
import { addInternalsController } from '../../controllers/internals.js';
|
|
9
10
|
import { enterKey } from '../../controllers/key-bindings.js';
|
|
10
|
-
import { addSafeEventListener
|
|
11
|
+
import { addSafeEventListener } from '../../utils/events.js';
|
|
12
|
+
import { isFunction, isString } from '../../utils/types.js';
|
|
11
13
|
import { InternalInvalidEvent, InternalResetEvent, } from './types.js';
|
|
12
14
|
const INVALID_STATE = 'ig-invalid';
|
|
13
15
|
const eventOptions = {
|
|
@@ -23,14 +25,14 @@ function emitFormResetEvent(host) {
|
|
|
23
25
|
function BaseFormAssociated(base) {
|
|
24
26
|
class BaseFormAssociatedElement extends base {
|
|
25
27
|
static { this.formAssociated = true; }
|
|
26
|
-
get _hasUserInteraction() {
|
|
27
|
-
return this._touched || this._isFormSubmit;
|
|
28
|
-
}
|
|
29
28
|
get _shouldApplyStyles() {
|
|
30
29
|
if (this._isExternalInvalid) {
|
|
31
30
|
return true;
|
|
32
31
|
}
|
|
33
|
-
return (this.
|
|
32
|
+
return (!this._disabled &&
|
|
33
|
+
this._invalid &&
|
|
34
|
+
this._touched &&
|
|
35
|
+
!this._isInternalValidation);
|
|
34
36
|
}
|
|
35
37
|
get __validators() {
|
|
36
38
|
return [];
|
|
@@ -38,6 +40,9 @@ function BaseFormAssociated(base) {
|
|
|
38
40
|
set disabled(value) {
|
|
39
41
|
this._disabled = value;
|
|
40
42
|
this.toggleAttribute('disabled', Boolean(this._disabled));
|
|
43
|
+
if (this.hasUpdated) {
|
|
44
|
+
this._setInvalidStyles();
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
47
|
get disabled() {
|
|
43
48
|
return this._disabled;
|
|
@@ -47,24 +52,23 @@ function BaseFormAssociated(base) {
|
|
|
47
52
|
this._setInvalidStyles();
|
|
48
53
|
}
|
|
49
54
|
get invalid() {
|
|
50
|
-
return this.
|
|
55
|
+
return this._shouldApplyStyles;
|
|
51
56
|
}
|
|
52
57
|
get form() {
|
|
53
|
-
return this.
|
|
58
|
+
return this._internals.form;
|
|
54
59
|
}
|
|
55
60
|
get validity() {
|
|
56
|
-
return this.
|
|
61
|
+
return this._internals.validity;
|
|
57
62
|
}
|
|
58
63
|
get validationMessage() {
|
|
59
|
-
return this.
|
|
64
|
+
return this._internals.validationMessage;
|
|
60
65
|
}
|
|
61
66
|
get willValidate() {
|
|
62
|
-
return this.
|
|
67
|
+
return this._internals.willValidate;
|
|
63
68
|
}
|
|
64
69
|
constructor(...args) {
|
|
65
|
-
super(args);
|
|
66
|
-
this.
|
|
67
|
-
this._isFormSubmit = false;
|
|
70
|
+
super(...args);
|
|
71
|
+
this._internals = addInternalsController(this);
|
|
68
72
|
this._isInternalValidation = false;
|
|
69
73
|
this._touched = false;
|
|
70
74
|
this._isExternalInvalid = false;
|
|
@@ -75,66 +79,61 @@ function BaseFormAssociated(base) {
|
|
|
75
79
|
}
|
|
76
80
|
connectedCallback() {
|
|
77
81
|
super.connectedCallback();
|
|
78
|
-
this.
|
|
79
|
-
|
|
82
|
+
if (!this.hasUpdated) {
|
|
83
|
+
this._pristine = true;
|
|
84
|
+
this._touched = false;
|
|
85
|
+
}
|
|
80
86
|
this._validate();
|
|
81
87
|
}
|
|
82
88
|
_handleEnterKeydown(event) {
|
|
83
|
-
if (event.key !== enterKey)
|
|
89
|
+
if (event.key !== enterKey || event.repeat) {
|
|
84
90
|
return;
|
|
85
|
-
if (event.repeat)
|
|
86
|
-
return;
|
|
87
|
-
const canSubmit = this.form && (this.form.noValidate || this.checkValidity());
|
|
88
|
-
if (canSubmit) {
|
|
89
|
-
this.form?.requestSubmit();
|
|
90
91
|
}
|
|
92
|
+
this.form?.requestSubmit();
|
|
91
93
|
}
|
|
92
|
-
|
|
94
|
+
_handleInvalid(event) {
|
|
93
95
|
event.preventDefault();
|
|
94
96
|
this._invalid = true;
|
|
95
97
|
if (this._isInternalValidation) {
|
|
96
98
|
this._isInternalValidation = false;
|
|
97
99
|
}
|
|
98
100
|
else {
|
|
99
|
-
this.
|
|
101
|
+
this._setTouchedState();
|
|
100
102
|
emitFormInvalidEvent(this);
|
|
101
103
|
}
|
|
102
104
|
this._setInvalidStyles();
|
|
103
105
|
this.requestUpdate();
|
|
104
|
-
if (this._isFormSubmit) {
|
|
105
|
-
await this.updateComplete;
|
|
106
|
-
this._isFormSubmit = false;
|
|
107
|
-
}
|
|
108
106
|
}
|
|
109
107
|
_setInvalidStyles() {
|
|
110
|
-
this.
|
|
108
|
+
this._internals.setState(INVALID_STATE, this._shouldApplyStyles);
|
|
109
|
+
}
|
|
110
|
+
_resolveInternalValidation() {
|
|
111
|
+
this._isInternalValidation = false;
|
|
111
112
|
}
|
|
112
113
|
__runValidators() {
|
|
113
|
-
|
|
114
|
+
let validity = {};
|
|
114
115
|
let message = '';
|
|
115
|
-
let validationFailed = false;
|
|
116
116
|
for (const validator of this.__validators) {
|
|
117
117
|
const isValid = validator.isValid(this);
|
|
118
118
|
validity[validator.key] = !isValid;
|
|
119
119
|
if (!isValid) {
|
|
120
|
-
validationFailed = true;
|
|
121
120
|
message = isFunction(validator.message)
|
|
122
121
|
? validator.message(this)
|
|
123
122
|
: validator.message;
|
|
123
|
+
if (validator.key === 'valueMissing') {
|
|
124
|
+
validity = { valueMissing: true };
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
|
-
this._invalid = validationFailed;
|
|
127
129
|
return { validity, message };
|
|
128
130
|
}
|
|
129
131
|
_validate(userMessage) {
|
|
130
|
-
|
|
132
|
+
if (isServer)
|
|
133
|
+
return;
|
|
134
|
+
const { validity, message: validatorMessage } = this.__runValidators();
|
|
131
135
|
const hasCustomError = this.validity.customError;
|
|
132
|
-
|
|
133
|
-
validity = {
|
|
134
|
-
valueMissing: true,
|
|
135
|
-
customError: hasCustomError,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
136
|
+
let message = validatorMessage;
|
|
138
137
|
if (hasCustomError && userMessage === undefined) {
|
|
139
138
|
validity.customError = true;
|
|
140
139
|
message = this.validationMessage;
|
|
@@ -146,18 +145,18 @@ function BaseFormAssociated(base) {
|
|
|
146
145
|
validity.customError = true;
|
|
147
146
|
message = userMessage;
|
|
148
147
|
}
|
|
149
|
-
this.
|
|
148
|
+
this._internals.setValidity(validity, message);
|
|
150
149
|
this._isInternalValidation = true;
|
|
151
|
-
this._invalid = !this.
|
|
150
|
+
this._invalid = !this._internals.checkValidity();
|
|
151
|
+
this._resolveInternalValidation();
|
|
152
|
+
this._setInvalidStyles();
|
|
152
153
|
}
|
|
153
154
|
_handleBlur() {
|
|
154
155
|
this._setTouchedState();
|
|
155
156
|
this._validate();
|
|
156
157
|
}
|
|
157
158
|
_setTouchedState() {
|
|
158
|
-
|
|
159
|
-
this._touched = true;
|
|
160
|
-
}
|
|
159
|
+
this._touched = true;
|
|
161
160
|
}
|
|
162
161
|
_setDefaultValue(current) {
|
|
163
162
|
this._formValue.defaultValue = current;
|
|
@@ -169,13 +168,13 @@ function BaseFormAssociated(base) {
|
|
|
169
168
|
}
|
|
170
169
|
_setFormValue(value, state) {
|
|
171
170
|
this._pristine = false;
|
|
172
|
-
this.
|
|
171
|
+
this._internals.setFormValue(value, state);
|
|
173
172
|
this._validate();
|
|
174
|
-
this._setInvalidStyles();
|
|
175
173
|
}
|
|
176
174
|
formAssociatedCallback(_form) { }
|
|
177
175
|
formDisabledCallback(state) {
|
|
178
176
|
this._disabled = state;
|
|
177
|
+
this._setInvalidStyles();
|
|
179
178
|
this.requestUpdate();
|
|
180
179
|
}
|
|
181
180
|
formResetCallback() {
|
|
@@ -183,25 +182,25 @@ function BaseFormAssociated(base) {
|
|
|
183
182
|
this._pristine = true;
|
|
184
183
|
this._touched = false;
|
|
185
184
|
this._invalid = false;
|
|
185
|
+
this._isExternalInvalid = false;
|
|
186
186
|
this._setInvalidStyles();
|
|
187
187
|
emitFormResetEvent(this);
|
|
188
188
|
}
|
|
189
189
|
formStateRestoreCallback(_state, _mode) { }
|
|
190
190
|
reportValidity() {
|
|
191
|
-
const state = this.
|
|
191
|
+
const state = this._internals.reportValidity();
|
|
192
192
|
this._invalid = !state;
|
|
193
193
|
return state;
|
|
194
194
|
}
|
|
195
195
|
checkValidity() {
|
|
196
196
|
this._isInternalValidation = true;
|
|
197
|
-
const state = this.
|
|
197
|
+
const state = this._internals.checkValidity();
|
|
198
198
|
this._invalid = !state;
|
|
199
|
+
this._resolveInternalValidation();
|
|
199
200
|
return state;
|
|
200
201
|
}
|
|
201
202
|
setCustomValidity(message) {
|
|
202
203
|
this._validate(message);
|
|
203
|
-
this._isInternalValidation = message === '';
|
|
204
|
-
this._setInvalidStyles();
|
|
205
204
|
this.requestUpdate();
|
|
206
205
|
}
|
|
207
206
|
}
|
|
@@ -209,7 +208,7 @@ function BaseFormAssociated(base) {
|
|
|
209
208
|
property({ reflect: true })
|
|
210
209
|
], BaseFormAssociatedElement.prototype, "name", void 0);
|
|
211
210
|
__decorate([
|
|
212
|
-
property({ type: Boolean
|
|
211
|
+
property({ type: Boolean })
|
|
213
212
|
], BaseFormAssociatedElement.prototype, "disabled", null);
|
|
214
213
|
__decorate([
|
|
215
214
|
property({ type: Boolean })
|
|
@@ -229,6 +228,14 @@ export function FormAssociatedMixin(base) {
|
|
|
229
228
|
get defaultValue() {
|
|
230
229
|
return this._formValue.defaultValue;
|
|
231
230
|
}
|
|
231
|
+
_restoreDefaultValue() {
|
|
232
|
+
if ('value' in this) {
|
|
233
|
+
this.value = this.defaultValue;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
super._restoreDefaultValue();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
232
239
|
attributeChangedCallback(name, prev, current) {
|
|
233
240
|
super.attributeChangedCallback(name, prev, current);
|
|
234
241
|
if (name === 'value') {
|
|
@@ -254,6 +261,14 @@ export function FormAssociatedCheckboxMixin(base) {
|
|
|
254
261
|
get defaultChecked() {
|
|
255
262
|
return this._formValue.defaultValue;
|
|
256
263
|
}
|
|
264
|
+
_restoreDefaultValue() {
|
|
265
|
+
if ('checked' in this) {
|
|
266
|
+
this.checked = this.defaultChecked;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
super._restoreDefaultValue();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
257
272
|
attributeChangedCallback(name, prev, current) {
|
|
258
273
|
super.attributeChangedCallback(name, prev, current);
|
|
259
274
|
if (name === 'checked') {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"associated.js","sourceRoot":"","sources":["../../../../src/internals/mixins/forms/associated.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAmB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAI5D,OAAO,EAKL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,aAAa,GAAG,YAAY,CAAC;AAEnC,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,SAAS,oBAAoB,CAAC,IAAgB;IAC5C,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC,CAAC;AAC1E,CAAC;AA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EAS9B;IA8BH,OAAO,6BACJ,CAAC;AACN,CAAC","sourcesContent":["import { isServer, type LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { addInternalsController } from '../../controllers/internals.js';\nimport { enterKey } from '../../controllers/key-bindings.js';\nimport { addSafeEventListener } from '../../utils/events.js';\nimport { isFunction, isString } from '../../utils/types.js';\nimport type { Validator } from '../../validators.js';\nimport type { Constructor } from '../constructor.js';\nimport type { FormValue } from './form-value.js';\nimport {\n type FormAssociatedCheckboxElementInterface,\n type FormAssociatedElementInterface,\n type FormRestoreMode,\n type FormValueType,\n InternalInvalidEvent,\n InternalResetEvent,\n} from './types.js';\n\nconst INVALID_STATE = 'ig-invalid';\n\nconst eventOptions = {\n bubbles: false,\n composed: false,\n};\n\nfunction emitFormInvalidEvent(host: LitElement): void {\n host.dispatchEvent(new CustomEvent(InternalInvalidEvent, eventOptions));\n}\n\nfunction emitFormResetEvent(host: LitElement): void {\n host.dispatchEvent(new CustomEvent(InternalResetEvent, eventOptions));\n}\n\nfunction BaseFormAssociated<T extends Constructor<LitElement>>(base: T) {\n class BaseFormAssociatedElement extends base {\n public static readonly formAssociated = true;\n\n //#region Internal state and properties\n\n protected readonly _internals = addInternalsController(this);\n protected readonly _formValue!: FormValue<unknown>;\n\n /**\n * Suppresses invalid styling for a programmatic validation cycle\n * (`checkValidity`/`_validate`). Scoped to the synchronous validity check:\n * set immediately before it and cleared immediately after, so it never\n * leaks into a later submission or user-interaction cycle.\n */\n private _isInternalValidation = false;\n private _touched = false;\n private _isExternalInvalid = false;\n\n private get _shouldApplyStyles(): boolean {\n if (this._isExternalInvalid) {\n return true;\n }\n\n // A disabled control is barred from constraint validation, so it never\n // carries invalid styling regardless of what its validators say.\n return (\n !this._disabled &&\n this._invalid &&\n this._touched &&\n !this._isInternalValidation\n );\n }\n\n protected _disabled = false;\n protected _invalid = false;\n protected _pristine = true;\n\n protected get __validators(): Validator[] {\n return [];\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * The name of the control, submitted with the form data.\n * @attr\n */\n @property({ reflect: true })\n public name!: string;\n\n /**\n * The disabled state of the component.\n * @attr\n * @default false\n */\n @property({ type: Boolean })\n public set disabled(value: boolean) {\n this._disabled = value;\n this.toggleAttribute('disabled', Boolean(this._disabled));\n if (this.hasUpdated) {\n this._setInvalidStyles();\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n * Sets the control into invalid state (visual state only).\n *\n * @remarks\n * The property is not reflected back to the attribute. Reading it returns\n * the effective visual state, so a touched control failing validation\n * reads `true` even after assigning `false`.\n * @attr\n * @default false\n */\n @property({ type: Boolean })\n public set invalid(value: boolean) {\n this._isExternalInvalid = value;\n this._setInvalidStyles();\n }\n\n public get invalid(): boolean {\n return this._shouldApplyStyles;\n }\n\n /** Returns the HTMLFormElement associated with this element. */\n public get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /**\n * Returns a ValidityState object which represents the different validity states\n * the element can be in, with respect to constraint validation.\n */\n public get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /** A string containing the validation message of this element. */\n public get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /**\n * A boolean value which returns true if the element is a submittable element\n * that is a candidate for constraint validation.\n */\n public get willValidate(): boolean {\n return this._internals.willValidate;\n }\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor(...args: any[]) {\n super(...args);\n addSafeEventListener(this, 'invalid', this._handleInvalid);\n }\n\n /** @internal */\n public override connectedCallback(): void {\n super.connectedCallback();\n\n if (!this.hasUpdated) {\n this._pristine = true;\n this._touched = false;\n }\n\n this._validate();\n }\n\n //#endregion\n\n //#region Enter key submission handling\n\n protected _handleEnterKeydown(event: KeyboardEvent): void {\n if (event.key !== enterKey || event.repeat) {\n return;\n }\n\n this.form?.requestSubmit();\n }\n\n //#endregion\n\n //#region Form value and validation states\n\n private _handleInvalid(event: Event): void {\n event.preventDefault();\n this._invalid = true;\n\n if (this._isInternalValidation) {\n this._isInternalValidation = false;\n } else {\n // A failed submission counts as user interaction, and a lasting one: the\n // control was asked for a value it could not provide. Keeping it touched\n // is what makes `invalid` - and with it the validation messages the host\n // projects - survive any later re-render, rather than holding only for\n // the update the submission itself scheduled.\n this._setTouchedState();\n emitFormInvalidEvent(this);\n }\n\n this._setInvalidStyles();\n this.requestUpdate();\n }\n\n private _setInvalidStyles(): void {\n this._internals.setState(INVALID_STATE, this._shouldApplyStyles);\n }\n\n /**\n * Closes a programmatic validation cycle. If the control was invalid, the\n * synchronous `invalid` event already cleared the flag; if it was valid no\n * event fired, so clear it here to stop it leaking into a later submission\n * or user-interaction cycle.\n */\n private _resolveInternalValidation(): void {\n this._isInternalValidation = false;\n }\n\n private __runValidators(): {\n validity: ValidityStateFlags;\n message: string;\n } {\n let validity: ValidityStateFlags = {};\n let message = '';\n\n for (const validator of this.__validators) {\n const isValid = validator.isValid(this);\n\n validity[validator.key] = !isValid;\n\n if (!isValid) {\n message = isFunction(validator.message)\n ? validator.message(this)\n : validator.message;\n\n if (validator.key === 'valueMissing') {\n validity = { valueMissing: true };\n break;\n }\n }\n }\n\n return { validity, message };\n }\n\n /**\n * Executes the component validators and updates the internal validity state.\n */\n protected _validate(userMessage?: string): void {\n if (isServer) return;\n const { validity, message: validatorMessage } = this.__runValidators();\n const hasCustomError = this.validity.customError;\n let message = validatorMessage;\n\n if (hasCustomError && userMessage === undefined) {\n // Internal validation cycle after the user has called setCustomValidity()\n // with some message. Keep the customError flag and the passed in message.\n validity.customError = true;\n message = this.validationMessage;\n } else if (hasCustomError && userMessage === '') {\n // setCustomValidity with an empty message.\n validity.customError = false;\n } else if (userMessage && userMessage !== '') {\n // setCustomValidity with a message.\n validity.customError = true;\n message = userMessage;\n }\n\n this._internals.setValidity(validity, message);\n this._isInternalValidation = true;\n this._invalid = !this._internals.checkValidity();\n this._resolveInternalValidation();\n this._setInvalidStyles();\n }\n\n protected _handleBlur(): void {\n this._setTouchedState();\n this._validate();\n }\n\n protected _setTouchedState(): void {\n this._touched = true;\n }\n\n protected _setDefaultValue(current: string | null): void {\n this._formValue.defaultValue = current;\n }\n\n protected _restoreDefaultValue(): void {\n const value = this._formValue.value;\n this._formValue.setValueAndFormState(this._formValue.defaultValue);\n this.requestUpdate('value', value);\n }\n\n protected _setFormValue(value: FormValueType, state?: FormValueType): void {\n this._pristine = false;\n this._internals.setFormValue(value, state);\n this._validate();\n }\n\n //#endregion\n\n //#region Form associated callback hooks\n\n protected formAssociatedCallback(_form: HTMLFormElement): void {}\n\n protected formDisabledCallback(state: boolean): void {\n this._disabled = state;\n this._setInvalidStyles();\n this.requestUpdate();\n }\n\n protected formResetCallback(): void {\n this._restoreDefaultValue();\n this._pristine = true;\n this._touched = false;\n this._invalid = false;\n this._isExternalInvalid = false;\n this._setInvalidStyles();\n emitFormResetEvent(this);\n }\n\n /* c8 ignore next 4 */\n protected formStateRestoreCallback(\n _state: FormValueType,\n _mode: FormRestoreMode\n ): void {}\n\n //#endregion\n\n //#region Public API\n\n /** Checks for validity of the control and shows the browser message if it's invalid. */\n public reportValidity(): boolean {\n const state = this._internals.reportValidity();\n this._invalid = !state;\n return state;\n }\n\n /** Checks for validity of the control and emits the invalid event if it's invalid. */\n public checkValidity(): boolean {\n this._isInternalValidation = true;\n const state = this._internals.checkValidity();\n this._invalid = !state;\n this._resolveInternalValidation();\n return state;\n }\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public setCustomValidity(message: string): void {\n this._validate(message);\n this.requestUpdate();\n }\n\n //#endregion\n }\n return BaseFormAssociatedElement as Constructor<BaseFormAssociatedElement> &\n T;\n}\n\n/**\n * Mixes the passed in class and turns it into a form associated custom element.\n */\nexport function FormAssociatedMixin<T extends Constructor<LitElement>>(\n base: T\n) {\n class FormAssociatedElement extends BaseFormAssociated(base) {\n /* blazorCSSuppress */\n @property({ attribute: false })\n public set defaultValue(value: unknown) {\n this._formValue.defaultValue = value;\n\n if (this._pristine && 'value' in this) {\n this.value = this.defaultValue;\n this._pristine = true;\n this._validate();\n }\n }\n\n public get defaultValue(): unknown {\n return this._formValue.defaultValue;\n }\n\n /**\n * Restores the default value through the public `value` setter so any\n * clamping/normalization the component applies (slider bounds, rating max)\n * also applies on form reset, and the correct reactive property is\n * recorded for the update cycle.\n */\n protected override _restoreDefaultValue(): void {\n if ('value' in this) {\n this.value = this.defaultValue;\n } else {\n super._restoreDefaultValue();\n }\n }\n\n public override attributeChangedCallback(\n name: string,\n prev: string | null,\n current: string | null\n ): void {\n super.attributeChangedCallback(name, prev, current);\n if (name === 'value') {\n this._setDefaultValue(current);\n }\n }\n }\n\n return FormAssociatedElement as unknown as Constructor<FormAssociatedElementInterface> &\n T;\n}\n\n/**\n * Mixes the passed in class and turns it into a form associated custom element.\n */\nexport function FormAssociatedCheckboxMixin<T extends Constructor<LitElement>>(\n base: T\n) {\n class FormAssociatedCheckboxElement extends BaseFormAssociated(base) {\n /* blazorCSSuppress */\n @property({ attribute: false })\n public set defaultChecked(value: boolean) {\n this._formValue.defaultValue = value;\n\n if (this._pristine && 'checked' in this) {\n this.checked = this.defaultChecked;\n this._pristine = true;\n this._validate();\n }\n }\n\n public get defaultChecked(): boolean {\n return this._formValue.defaultValue as boolean;\n }\n\n /**\n * Restores the default checked state through the public `checked` setter\n * so the correct reactive property is recorded for the update cycle.\n */\n protected override _restoreDefaultValue(): void {\n if ('checked' in this) {\n this.checked = this.defaultChecked;\n } else {\n super._restoreDefaultValue();\n }\n }\n\n public override attributeChangedCallback(\n name: string,\n prev: string | null,\n current: string | null\n ): void {\n super.attributeChangedCallback(name, prev, current);\n if (name === 'checked') {\n this._setDefaultValue(isString(current) ? 'true' : null);\n }\n }\n }\n\n return FormAssociatedCheckboxElement as unknown as Constructor<FormAssociatedCheckboxElementInterface> &\n T;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { convertToDate, convertToDateRange, getDateFormValue, } from '
|
|
2
|
-
import { asNumber } from '../../
|
|
1
|
+
import { convertToDate, convertToDateRange, getDateFormValue, } from '../../date/converters.js';
|
|
2
|
+
import { asNumber } from '../../utils/math.js';
|
|
3
3
|
export const FormValueDefaultTransformers = {
|
|
4
4
|
setValue: (value) => value || '',
|
|
5
5
|
getValue: (value) => value,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-transformers.js","sourceRoot":"","sources":["../../../../src/internals/mixins/forms/form-transformers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAmB/C,MAAM,CAAC,MAAM,4BAA4B,GAAkC;IACzE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IAC1B,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE;IACvC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACjC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAErC;IACF,QAAQ,EAAE,OAAO;IACjB,eAAe,EAAE,OAAO;IACxB,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAC9B,OAAO,IAAI,OAAO,IAAI,IAAI,CAAC,CAAC,CAAE,IAAI,CAAC,KAAgB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI;CACrE,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,QAAQ,EAAE,QAAQ;IAClB,eAAe,EAAE,QAAQ;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE;CAC1C,CAAC;AAEF,MAAM,C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AAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC;AAEJ,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,SAAS;IACvC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,SAAS;CAC/C,CAAC","sourcesContent":["import type { DateRangeValue } from '../../../components/types.js';\nimport {\n convertToDate,\n convertToDateRange,\n getDateFormValue,\n} from '../../date/converters.js';\nimport { asNumber } from '../../utils/math.js';\nimport type { FormValueType, IgcFormControl } from './types.js';\n\nexport type FormValueTransformers<T> = {\n setValue: (value: T) => T;\n getValue: (value: T) => T;\n setDefaultValue: (value: T) => T;\n getDefaultValue: (value: T) => T;\n setFormValue: (value: T, host: IgcFormControl) => FormValueType;\n};\n\nexport type FormValueConfig<T> = {\n initialValue: T;\n initialDefaultValue?: T;\n transformers?: Partial<FormValueTransformers<T>>;\n};\n\n// Transformers\n\nexport const FormValueDefaultTransformers: FormValueTransformers<string> = {\n setValue: (value) => value || '',\n getValue: (value) => value,\n setDefaultValue: (value) => value || '',\n getDefaultValue: (value) => value,\n setFormValue: (value, _) => value || null,\n};\n\nexport const FormValueBooleanTransformers: Partial<\n FormValueTransformers<boolean>\n> = {\n setValue: Boolean,\n setDefaultValue: Boolean,\n setFormValue: (checked, host) =>\n checked && 'value' in host ? (host.value as string) || 'on' : null,\n};\n\nexport const FormValueNumberTransformers: Partial<\n FormValueTransformers<number>\n> = {\n setValue: asNumber,\n setDefaultValue: asNumber,\n setFormValue: (value) => value.toString(),\n};\n\nexport const FormValueDateTimeTransformers: Partial<\n FormValueTransformers<Date | null>\n> = {\n setValue: convertToDate,\n setDefaultValue: convertToDate,\n setFormValue: getDateFormValue,\n};\n\nexport const FormValueDateRangeTransformers: Partial<\n FormValueTransformers<DateRangeValue | null>\n> = {\n setValue: convertToDateRange,\n setDefaultValue: convertToDateRange,\n setFormValue: (value, host) => {\n if (!host.name) {\n return null;\n }\n const start = value?.start?.toISOString();\n const end = value?.end?.toISOString();\n\n const formData = new FormData();\n\n if (start) {\n formData.append(`${host.name}-start`, start);\n }\n if (end) {\n formData.append(`${host.name}-end`, end);\n }\n\n return formData;\n },\n};\n\n/* blazorSuppress */\nexport const FormValueFileListTransformers: FormValueTransformers<FileList | null> =\n {\n setValue: (value) => value || null,\n getValue: (value) => value,\n setDefaultValue: (value) => value || null,\n getDefaultValue: (value) => value,\n setFormValue: (files, host) => {\n if (!(host.name && files)) {\n return null;\n }\n\n const formData = new FormData();\n for (const file of files) {\n formData.append(host.name, file);\n }\n\n return formData;\n },\n };\n\nexport const FormValueSelectTransformers: Partial<\n FormValueTransformers<string | undefined>\n> = {\n setValue: (value) => value || undefined,\n setDefaultValue: (value) => value || undefined,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-value.js","sourceRoot":"","sources":["../../../../src/internals/mixins/forms/form-value.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,4BAA4B,GAE7B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,OAAO,SAAS;aACI,oBAAe,GAAG,eAAwB,CAAC;IASnE,YAAY,IAAoB,EAAE,MAA0B;QAC1D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,mBAAmB,IAAI,IAAI,CAAC,MAAM,CAAC;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAErD,IAAI,CAAC,aAAa,GAAG;YACnB,GAAG,4BAA4B;YAC/B,GAAG,MAAM,CAAC,YAAY;SACK,CAAC;IAChC,CAAC;IAEM,oBAAoB,CAAC,KAAQ;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CACxD,CAAC;IACJ,CAAC;IAED,IAAW,YAAY,CAAC,KAAQ;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAChE,CAAC;IAED,IAAW,KAAK,CAAC,KAAQ;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;;AAGH,MAAM,UAAU,oBAAoB,CAClC,IAAgB,EAChB,MAA0B;IAE1B,OAAO,IAAI,SAAS,CAAC,IAAsB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import type { LitElement } from 'lit';\nimport {\n type FormValueConfig,\n FormValueDefaultTransformers,\n type FormValueTransformers,\n} from './form-transformers.js';\nimport type { IgcFormControl } from './types.js';\n\n/* blazorSuppress */\nexport class FormValue<T> {\n private static readonly setFormValueKey = '_setFormValue' as const;\n\n private readonly _host: IgcFormControl;\n private readonly _transformers: FormValueTransformers<T>;\n private readonly _setFormValue: IgcFormControl[typeof FormValue.setFormValueKey];\n\n private _value: T;\n private _defaultValue: T;\n\n constructor(host: IgcFormControl, config: FormValueConfig<T>) {\n this._host = host;\n this._value = config.initialValue;\n this._defaultValue = config.initialDefaultValue ?? this._value;\n this._setFormValue = host[FormValue.setFormValueKey];\n\n this._transformers = {\n ...FormValueDefaultTransformers,\n ...config.transformers,\n } as FormValueTransformers<T>;\n }\n\n public setValueAndFormState(value: T): void {\n this.value = value;\n this._setFormValue.call(\n this._host,\n this._transformers.setFormValue(this.value, this._host)\n );\n }\n\n public set defaultValue(value: T) {\n this._defaultValue = this._transformers.setDefaultValue(value);\n }\n\n public get defaultValue(): T {\n return this._transformers.getDefaultValue(this._defaultValue);\n }\n\n public set value(value: T) {\n this._value = this._transformers.setValue(value);\n }\n\n public get value(): T {\n return this._transformers.getValue(this._value);\n }\n}\n\nexport function createFormValueState<T>(\n host: LitElement,\n config: FormValueConfig<T>\n): FormValue<T> {\n return new FormValue(host as IgcFormControl, config);\n}\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { LitElement } from 'lit';
|
|
2
|
+
import type { ElementInternalsController } from '../../controllers/internals.js';
|
|
2
3
|
import type { Validator } from '../../validators.js';
|
|
3
4
|
export type FormRestoreMode = 'autocomplete' | 'restore';
|
|
4
5
|
export type FormValueType = string | File | FormData | null;
|
|
5
6
|
export type IgcFormControl = LitElement & (FormAssociatedElementInterface | FormAssociatedCheckboxElementInterface);
|
|
6
|
-
declare class BaseFormAssociatedElement {
|
|
7
|
+
export declare class BaseFormAssociatedElement {
|
|
7
8
|
static readonly formAssociated: boolean;
|
|
8
|
-
|
|
9
|
+
protected readonly _internals: ElementInternalsController;
|
|
9
10
|
protected readonly _formValue: unknown;
|
|
10
11
|
protected _pristine: boolean;
|
|
11
12
|
protected _disabled: boolean;
|
|
@@ -24,7 +25,7 @@ declare class BaseFormAssociatedElement {
|
|
|
24
25
|
*/
|
|
25
26
|
invalid: boolean;
|
|
26
27
|
/**
|
|
27
|
-
* The name
|
|
28
|
+
* The name of the control, submitted with the form data.
|
|
28
29
|
* @attr
|
|
29
30
|
*/
|
|
30
31
|
name: string;
|
|
@@ -63,7 +64,7 @@ declare class BaseFormAssociatedElement {
|
|
|
63
64
|
protected _setTouchedState(): void;
|
|
64
65
|
/**
|
|
65
66
|
* Sets the default value of the component.
|
|
66
|
-
* Called in `attributeChangedCallback`(i.e. when the `value` attribute of the control is set).
|
|
67
|
+
* Called in `attributeChangedCallback` (i.e. when the `value` attribute of the control is set).
|
|
67
68
|
*/
|
|
68
69
|
protected _setDefaultValue(current: string | null): void;
|
|
69
70
|
/**
|
|
@@ -107,9 +108,9 @@ declare class BaseFormAssociatedElement {
|
|
|
107
108
|
* This is not implemented currently.
|
|
108
109
|
*/
|
|
109
110
|
protected formStateRestoreCallback(state: FormValueType, mode: FormRestoreMode): void;
|
|
110
|
-
/** Checks for validity of the control and emits the invalid event if it invalid. */
|
|
111
|
+
/** Checks for validity of the control and emits the invalid event if it's invalid. */
|
|
111
112
|
checkValidity(): boolean;
|
|
112
|
-
/** Checks for validity of the control and shows the browser message if it invalid. */
|
|
113
|
+
/** Checks for validity of the control and shows the browser message if it's invalid. */
|
|
113
114
|
reportValidity(): boolean;
|
|
114
115
|
/**
|
|
115
116
|
* Sets a custom validation message for the control.
|
|
@@ -139,4 +140,3 @@ export declare class FormRequiredInterface {
|
|
|
139
140
|
}
|
|
140
141
|
export declare const InternalInvalidEvent = "igc-form-internal-invalid";
|
|
141
142
|
export declare const InternalResetEvent = "igc-form-internal-reset";
|
|
142
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internals/mixins/forms/types.ts"],"names":[],"mappings":"AAuLA,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC","sourcesContent":["import type { LitElement } from 'lit';\nimport type { ElementInternalsController } from '../../controllers/internals.js';\nimport type { Validator } from '../../validators.js';\n\nexport type FormRestoreMode = 'autocomplete' | 'restore';\nexport type FormValueType = string | File | FormData | null;\nexport type IgcFormControl = LitElement &\n (FormAssociatedElementInterface | FormAssociatedCheckboxElementInterface);\n\nexport declare class BaseFormAssociatedElement {\n public static readonly formAssociated: boolean;\n\n //#region Properties\n\n protected readonly _internals: ElementInternalsController;\n protected readonly _formValue: unknown;\n\n protected _pristine: boolean;\n protected _disabled: boolean;\n protected _invalid: boolean;\n\n protected get __validators(): Validator[];\n\n /**\n * The disabled state of the component.\n * @attr\n * @default false\n */\n public disabled: boolean;\n\n /**\n * Sets the control into invalid state (visual state only).\n * @attr\n * @default false\n */\n public invalid: boolean;\n\n /**\n * The name of the control, submitted with the form data.\n * @attr\n */\n public name: string;\n\n /** Returns the HTMLFormElement associated with this element. */\n public get form(): HTMLFormElement | null;\n\n /**\n * Returns a ValidityState object which represents the different validity states\n * the element can be in, with respect to constraint validation.\n */\n public get validity(): ValidityState;\n\n /** A string containing the validation message of this element. */\n public get validationMessage(): string;\n\n /**\n * A boolean value which returns true if the element is a submittable element\n * that is a candidate for constraint validation.\n */\n public get willValidate(): boolean;\n\n //#endregion\n\n //#region Methods\n\n /**\n * Default implementation for handling the `Enter` key press on the component.\n * Checks if the component is inside a form and if so, submits it.\n */\n protected _handleEnterKeydown(event: KeyboardEvent): void;\n\n /**\n * Sets the **touched** state of the component and invokes {@link BaseFormAssociatedElement._validate | `_validate()`} method.\n *\n * As the naming of the method suggests, this should be invoked either on **blur** or **focusout**, depending\n * on the DOM structure and how focus state is managed by the component.\n */\n protected _handleBlur(): void;\n\n /**\n * Sets the **touched** state of the component and **DOES NOT** invoke {@link BaseFormAssociatedElement._validate | `_validate()`} method.\n *\n * This should be called whenever a user interaction triggers a response, usually an event, from the component in\n * regards to its value.\n */\n protected _setTouchedState(): void;\n\n /**\n * Sets the default value of the component.\n * Called in `attributeChangedCallback` (i.e. when the `value` attribute of the control is set).\n */\n protected _setDefaultValue(current: string | null): void;\n\n /**\n * Called when the associated parent form is reset.\n */\n protected _restoreDefaultValue(): void;\n\n /**\n * Executes the component validators and updates the internal validity state.\n */\n protected _validate(message?: string): void;\n\n /**\n * Sets the component's submission value and state.\n */\n protected _setFormValue(value: FormValueType, state?: FormValueType): void;\n\n /**\n * Called by the browser when it associates/disassociates the component with/from a given form element.\n * Receives the form element as a parameter.\n *\n * @remarks\n * This is not implemented currently.\n */\n protected formAssociatedCallback(form: HTMLFormElement): void;\n\n /**\n * Called whenever the component or a parent `fieldset` elements are disabled.\n * Receives the current disabled state.\n */\n protected formDisabledCallback(state: boolean): void;\n\n /**\n * Called when the form is reset.\n * Resets the component value/checked state to the default one, internal state and validation.\n *\n * @remarks\n * The default implementation calls {@link BaseFormAssociatedElement._restoreDefaultValue | `_restoreDefaultValue`}.\n * If additional customization is needed, it is better to override that method instead of this callback.\n */\n protected formResetCallback(): void;\n\n /**\n * Called when the browser attempts to automatically fill out the component.\n *\n * @remarks\n * This is not implemented currently.\n */\n protected formStateRestoreCallback(\n state: FormValueType,\n mode: FormRestoreMode\n ): void;\n\n /** Checks for validity of the control and emits the invalid event if it's invalid. */\n public checkValidity(): boolean;\n\n /** Checks for validity of the control and shows the browser message if it's invalid. */\n public reportValidity(): boolean;\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public setCustomValidity(message: string): void;\n\n //#endregion\n}\n\nexport declare class FormAssociatedElementInterface extends BaseFormAssociatedElement {\n /** The initial value of the component. */\n public set defaultValue(value: unknown);\n public get defaultValue(): unknown;\n}\n\nexport declare class FormAssociatedCheckboxElementInterface extends BaseFormAssociatedElement {\n /** The initial checked state of the component. */\n public set defaultChecked(value: boolean);\n public get defaultChecked(): boolean;\n}\n\nexport declare class FormRequiredInterface {\n protected _required: boolean;\n\n /**\n * When set, makes the component a required field for validation.\n * @attr\n * @default false\n */\n public set required(value: boolean);\n public get required(): boolean;\n}\n\nexport const InternalInvalidEvent = 'igc-form-internal-invalid';\nexport const InternalResetEvent = 'igc-form-internal-reset';\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LitElement } from 'lit';
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
2
|
+
import { type MaskEditKind, type MaskHistory } from '../../components/mask-input/mask-history.js';
|
|
3
|
+
import type { MaskParser } from '../../components/mask-input/mask-parser.js';
|
|
4
|
+
import type { RangeTextSelectMode, SelectionRangeDirection } from '../../components/types.js';
|
|
4
5
|
import type { AbstractConstructor } from './constructor.js';
|
|
5
6
|
export type MaskSelection = {
|
|
6
7
|
start: number;
|
|
@@ -22,8 +23,10 @@ export declare class MaskBehaviorElementInterface {
|
|
|
22
23
|
protected _compositionStart: number;
|
|
23
24
|
protected _focused: boolean;
|
|
24
25
|
protected _maskedValue: string;
|
|
26
|
+
protected readonly _history: MaskHistory;
|
|
25
27
|
protected get _inputSelection(): MaskSelection;
|
|
26
28
|
protected get _isEmptyMask(): boolean;
|
|
29
|
+
protected get _historyText(): string;
|
|
27
30
|
/**
|
|
28
31
|
* Makes the control a readonly field.
|
|
29
32
|
* @attr readonly
|
|
@@ -44,12 +47,17 @@ export declare class MaskBehaviorElementInterface {
|
|
|
44
47
|
get prompt(): string;
|
|
45
48
|
set prompt(value: string);
|
|
46
49
|
protected _handleInput(event: InputEvent): Promise<void>;
|
|
50
|
+
protected _handleBeforeInput(event: InputEvent): void;
|
|
47
51
|
protected _updateInput(text: string, range: MaskSelection): Promise<void>;
|
|
52
|
+
protected _commitMaskedValue(value: string): void;
|
|
48
53
|
protected _emitInputEvent(): void;
|
|
49
54
|
protected _setMaskSelection(event: Event): void;
|
|
50
55
|
protected _handleCompositionStart(): void;
|
|
51
56
|
protected _handleCompositionEnd(event: CompositionEvent): void;
|
|
52
57
|
protected _handleClick(): void;
|
|
58
|
+
protected _recordHistory(kind: MaskEditKind, next: string, caret: number, selection?: MaskSelection): void;
|
|
59
|
+
protected _historyStep(direction: 'undo' | 'redo'): Promise<void>;
|
|
60
|
+
protected _historyResync(): void;
|
|
53
61
|
/** Sets the text selection range of the control. */
|
|
54
62
|
setSelectionRange(start?: number, end?: number, direction?: SelectionRangeDirection): void;
|
|
55
63
|
/** Replaces the selected text in the control and re-applies the mask. */
|
|
@@ -68,6 +76,6 @@ export declare class MaskBehaviorElementInterface {
|
|
|
68
76
|
*
|
|
69
77
|
* The host class must implement `_syncValueFromMask` to bridge the masked
|
|
70
78
|
* text back into its public `value`. It is called by the default
|
|
71
|
-
* `
|
|
79
|
+
* `_commitMaskedValue` implementation.
|
|
72
80
|
*/
|
|
73
81
|
export declare function MaskBehaviorMixin<T extends AbstractConstructor<LitElement>>(superClass: T): AbstractConstructor<MaskBehaviorElementInterface> & T;
|