igniteui-webcomponents 6.4.0-alpha.4 → 6.5.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 +141 -2
- package/README.md +65 -56
- package/components/button/themes/button/dark/button.indigo.css.js +1 -1
- package/components/button/themes/button/dark/button.indigo.css.js.map +1 -1
- package/components/button/themes/button/dark/button.material.css.js +1 -1
- package/components/button/themes/button/dark/button.material.css.js.map +1 -1
- package/components/button/themes/button/light/button.indigo.css.js +1 -1
- package/components/button/themes/button/light/button.indigo.css.js.map +1 -1
- package/components/button/themes/button/light/button.material.css.js +1 -1
- package/components/button/themes/button/light/button.material.css.js.map +1 -1
- package/components/button/themes/button/shared/button.bootstrap.css.js +1 -1
- package/components/button/themes/button/shared/button.bootstrap.css.js.map +1 -1
- package/components/button/themes/button/shared/button.common.css.js +1 -1
- package/components/button/themes/button/shared/button.common.css.js.map +1 -1
- package/components/button/themes/button/shared/button.fluent.css.js +1 -1
- package/components/button/themes/button/shared/button.fluent.css.js.map +1 -1
- package/components/button/themes/button/shared/button.indigo.css.js +1 -1
- package/components/button/themes/button/shared/button.indigo.css.js.map +1 -1
- package/components/button/themes/button/shared/button.material.css.js +1 -1
- package/components/button/themes/button/shared/button.material.css.js.map +1 -1
- package/components/button-group/themes/dark/button-group.material.css.js +1 -1
- package/components/button-group/themes/dark/button-group.material.css.js.map +1 -1
- package/components/button-group/themes/light/button-group.material.css.js +1 -1
- package/components/button-group/themes/light/button-group.material.css.js.map +1 -1
- package/components/button-group/themes/shared/button/button.bootstrap.css.js +1 -1
- package/components/button-group/themes/shared/button/button.bootstrap.css.js.map +1 -1
- package/components/button-group/themes/shared/button/button.material.css.js +1 -1
- package/components/button-group/themes/shared/button/button.material.css.js.map +1 -1
- package/components/calendar/base.d.ts +7 -3
- package/components/calendar/base.js +10 -14
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +48 -44
- package/components/calendar/calendar.js +263 -259
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +49 -27
- package/components/calendar/days-view/days-view.js +170 -168
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.js +40 -28
- package/components/calendar/helpers.js.map +1 -1
- package/components/calendar/model.d.ts +9 -3
- package/components/calendar/model.js +29 -19
- package/components/calendar/model.js.map +1 -1
- package/components/calendar/months-view/months-view.d.ts +6 -8
- package/components/calendar/months-view/months-view.js +25 -38
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/themes/dark/calendar.bootstrap.css.js +1 -1
- package/components/calendar/themes/dark/calendar.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/dark/calendar.fluent.css.js +1 -1
- package/components/calendar/themes/dark/calendar.fluent.css.js.map +1 -1
- package/components/calendar/themes/dark/calendar.indigo.css.js +1 -1
- package/components/calendar/themes/dark/calendar.indigo.css.js.map +1 -1
- package/components/calendar/themes/dark/calendar.material.css.js +1 -1
- package/components/calendar/themes/dark/calendar.material.css.js.map +1 -1
- package/components/calendar/themes/days.js +8 -23
- package/components/calendar/themes/days.js.map +1 -1
- package/components/calendar/themes/light/calendar.bootstrap.css.js +1 -1
- package/components/calendar/themes/light/calendar.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/light/calendar.fluent.css.js +1 -1
- package/components/calendar/themes/light/calendar.fluent.css.js.map +1 -1
- package/components/calendar/themes/light/calendar.indigo.css.js +1 -1
- package/components/calendar/themes/light/calendar.indigo.css.js.map +1 -1
- package/components/calendar/themes/light/calendar.material.css.js +1 -1
- package/components/calendar/themes/light/calendar.material.css.js.map +1 -1
- package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js +1 -1
- package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/shared/bootstrap/year-month-view.bootstrap.css.js +1 -1
- package/components/calendar/themes/shared/bootstrap/year-month-view.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/shared/fluent/days-view.fluent.css.js +1 -1
- package/components/calendar/themes/shared/fluent/days-view.fluent.css.js.map +1 -1
- package/components/calendar/themes/shared/indigo/days-view.indigo.css.js +1 -1
- package/components/calendar/themes/shared/indigo/days-view.indigo.css.js.map +1 -1
- package/components/calendar/themes/shared/material/days-view.material.css.js +1 -1
- package/components/calendar/themes/shared/material/days-view.material.css.js.map +1 -1
- package/components/calendar/themes/year-month.js +8 -23
- package/components/calendar/themes/year-month.js.map +1 -1
- package/components/calendar/years-view/years-view.d.ts +6 -5
- package/components/calendar/years-view/years-view.js +11 -14
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/carousel/carousel.d.ts +2 -1
- package/components/carousel/carousel.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.material.css.js +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.material.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.common.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.common.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.fluent.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.fluent.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.indigo.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.indigo.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.material.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.material.css.js.map +1 -1
- package/components/chip/chip.d.ts +2 -1
- package/components/chip/chip.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/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.shared.css.js +1 -1
- package/components/chip/themes/light/chip.shared.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/combo/combo.d.ts +3 -2
- package/components/combo/combo.js +7 -0
- package/components/combo/combo.js.map +1 -1
- package/components/combo/controllers/selection.js.map +1 -1
- package/components/combo/validators.js +2 -2
- package/components/combo/validators.js.map +1 -1
- package/components/common/controllers/async-consumer.js.map +1 -1
- package/components/common/controllers/focus-ring.js +1 -5
- package/components/common/controllers/focus-ring.js.map +1 -1
- package/components/common/controllers/root-click.js +46 -21
- package/components/common/controllers/root-click.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +2 -0
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/i18n/EN/calendar.resources.js +4 -1
- package/components/common/i18n/EN/calendar.resources.js.map +1 -1
- package/components/common/i18n/EN/date-range-picker.resources.js.map +1 -1
- package/components/common/i18n/i18n-controller.js +6 -9
- package/components/common/i18n/i18n-controller.js.map +1 -1
- package/components/common/i18n/utils.d.ts +0 -12
- package/components/common/i18n/utils.js +0 -12
- package/components/common/i18n/utils.js.map +1 -1
- package/components/common/mixins/forms/associated.js +3 -23
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/util.d.ts +5 -0
- package/components/common/util.js +5 -0
- package/components/common/util.js.map +1 -1
- package/components/common/validators.d.ts +2 -4
- package/components/common/validators.js +13 -19
- package/components/common/validators.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +7 -3
- package/components/date-picker/date-picker.js +2 -2
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.material.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.material.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.material.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.material.css.js.map +1 -1
- package/components/date-picker/validators.js +2 -3
- package/components/date-picker/validators.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +7 -2
- package/components/date-range-picker/date-range-picker.js +13 -10
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js.map +1 -1
- package/components/date-range-picker/validators.js +5 -8
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-time-input.d.ts +10 -3
- package/components/date-time-input/date-time-input.js +39 -21
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/date-util.d.ts +11 -9
- package/components/date-time-input/date-util.js +23 -219
- package/components/date-time-input/date-util.js.map +1 -1
- package/components/dialog/dialog.d.ts +2 -0
- package/components/dialog/dialog.js +18 -9
- package/components/dialog/dialog.js.map +1 -1
- package/components/dialog/themes/dark/dialog.fluent.css.js +1 -1
- package/components/dialog/themes/dark/dialog.fluent.css.js.map +1 -1
- package/components/dialog/themes/light/dialog.fluent.css.js +1 -1
- package/components/dialog/themes/light/dialog.fluent.css.js.map +1 -1
- package/components/dialog/themes/shared/dialog.bootstrap.css.js +1 -1
- package/components/dialog/themes/shared/dialog.bootstrap.css.js.map +1 -1
- package/components/dialog/themes/shared/dialog.indigo.css.js +1 -1
- package/components/dialog/themes/shared/dialog.indigo.css.js.map +1 -1
- package/components/expansion-panel/themes/light/expansion-panel.bootstrap.css.js +1 -1
- package/components/expansion-panel/themes/light/expansion-panel.bootstrap.css.js.map +1 -1
- package/components/file-input/file-input.d.ts +28 -13
- package/components/file-input/file-input.js +73 -46
- package/components/file-input/file-input.js.map +1 -1
- package/components/input/input-base.d.ts +31 -34
- package/components/input/input-base.js +58 -83
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +18 -7
- package/components/input/input.js +34 -19
- package/components/input/input.js.map +1 -1
- package/components/input/themes/dark/input.indigo.css.js +1 -1
- package/components/input/themes/dark/input.indigo.css.js.map +1 -1
- package/components/input/themes/light/input.indigo.css.js +1 -1
- package/components/input/themes/light/input.indigo.css.js.map +1 -1
- package/components/input/themes/light/input.shared.css.js +1 -1
- package/components/input/themes/light/input.shared.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/validators.js +3 -3
- package/components/input/validators.js.map +1 -1
- package/components/list/themes/dark/container/list.bootstrap.css.js +1 -1
- package/components/list/themes/dark/container/list.bootstrap.css.js.map +1 -1
- package/components/list/themes/light/container/list.fluent.css.js +1 -1
- package/components/list/themes/light/container/list.fluent.css.js.map +1 -1
- package/components/list/themes/shared/item/list-item.common.css.js +1 -1
- package/components/list/themes/shared/item/list-item.common.css.js.map +1 -1
- package/components/list/themes/shared/item/list-item.indigo.css.js +1 -1
- package/components/list/themes/shared/item/list-item.indigo.css.js.map +1 -1
- package/components/mask-input/mask-input-base.d.ts +10 -4
- package/components/mask-input/mask-input-base.js +21 -16
- package/components/mask-input/mask-input-base.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +9 -3
- package/components/mask-input/mask-input.js +26 -6
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/mask-parser.d.ts +30 -7
- package/components/mask-input/mask-parser.js +70 -42
- package/components/mask-input/mask-parser.js.map +1 -1
- package/components/mask-input/validators.js +3 -3
- package/components/mask-input/validators.js.map +1 -1
- package/components/nav-drawer/themes/dark/container/nav-drawer.fluent.css.js +1 -1
- package/components/nav-drawer/themes/dark/container/nav-drawer.fluent.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.material.css.js +1 -1
- package/components/nav-drawer/themes/light/container/nav-drawer.material.css.js.map +1 -1
- package/components/navbar/themes/shared/navbar.common.css.js +1 -1
- package/components/navbar/themes/shared/navbar.common.css.js.map +1 -1
- package/components/radio/themes/light/radio.material.css.js +1 -1
- package/components/radio/themes/light/radio.material.css.js.map +1 -1
- package/components/radio/themes/shared/radio.bootstrap.css.js +1 -1
- package/components/radio/themes/shared/radio.bootstrap.css.js.map +1 -1
- package/components/radio/themes/shared/radio.common.css.js +1 -1
- package/components/radio/themes/shared/radio.common.css.js.map +1 -1
- package/components/radio/themes/shared/radio.fluent.css.js +1 -1
- package/components/radio/themes/shared/radio.fluent.css.js.map +1 -1
- package/components/radio/themes/shared/radio.indigo.css.js +1 -1
- package/components/radio/themes/shared/radio.indigo.css.js.map +1 -1
- package/components/radio/themes/shared/radio.material.css.js +1 -1
- package/components/radio/themes/shared/radio.material.css.js.map +1 -1
- package/components/radio/validators.js +2 -2
- package/components/radio/validators.js.map +1 -1
- package/components/rating/themes/dark/rating.indigo.css.js +1 -1
- package/components/rating/themes/dark/rating.indigo.css.js.map +1 -1
- package/components/rating/themes/light/rating.indigo.css.js +1 -1
- package/components/rating/themes/light/rating.indigo.css.js.map +1 -1
- package/components/ripple/ripple.d.ts +3 -3
- package/components/ripple/ripple.js +34 -31
- package/components/ripple/ripple.js.map +1 -1
- package/components/stepper/step.js +2 -2
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/themes/step/dark/step.bootstrap.css.js +1 -1
- package/components/stepper/themes/step/dark/step.bootstrap.css.js.map +1 -1
- package/components/stepper/themes/step/dark/step.fluent.css.js +1 -1
- package/components/stepper/themes/step/dark/step.fluent.css.js.map +1 -1
- package/components/stepper/themes/step/dark/step.indigo.css.js +1 -1
- package/components/stepper/themes/step/dark/step.indigo.css.js.map +1 -1
- package/components/stepper/themes/step/dark/step.material.css.js +1 -1
- package/components/stepper/themes/step/dark/step.material.css.js.map +1 -1
- package/components/stepper/themes/step/light/step.bootstrap.css.js +1 -1
- package/components/stepper/themes/step/light/step.bootstrap.css.js.map +1 -1
- package/components/stepper/themes/step/light/step.fluent.css.js +1 -1
- package/components/stepper/themes/step/light/step.fluent.css.js.map +1 -1
- package/components/stepper/themes/step/light/step.indigo.css.js +1 -1
- package/components/stepper/themes/step/light/step.indigo.css.js.map +1 -1
- package/components/stepper/themes/step/light/step.material.css.js +1 -1
- package/components/stepper/themes/step/light/step.material.css.js.map +1 -1
- package/components/stepper/themes/step/light/step.shared.css.js +1 -1
- package/components/stepper/themes/step/light/step.shared.css.js.map +1 -1
- package/components/stepper/themes/step/shared/step.common.css.js +1 -1
- package/components/stepper/themes/step/shared/step.common.css.js.map +1 -1
- package/components/stepper/themes/step/shared/step.indigo.css.js +1 -1
- package/components/stepper/themes/step/shared/step.indigo.css.js.map +1 -1
- package/components/tabs/tab-dom.js +8 -9
- package/components/tabs/tab-dom.js.map +1 -1
- package/components/tabs/themes/dark/tab.bootstrap.css.js +1 -1
- package/components/tabs/themes/dark/tab.bootstrap.css.js.map +1 -1
- package/components/tabs/themes/dark/tab.fluent.css.js +1 -1
- package/components/tabs/themes/dark/tab.fluent.css.js.map +1 -1
- package/components/tabs/themes/dark/tab.indigo.css.js +1 -1
- package/components/tabs/themes/dark/tab.indigo.css.js.map +1 -1
- package/components/tabs/themes/dark/tab.material.css.js +1 -1
- package/components/tabs/themes/dark/tab.material.css.js.map +1 -1
- package/components/tabs/themes/dark/tab.shared.css.js +1 -1
- package/components/tabs/themes/dark/tab.shared.css.js.map +1 -1
- package/components/tabs/themes/light/tab.bootstrap.css.js +1 -1
- package/components/tabs/themes/light/tab.bootstrap.css.js.map +1 -1
- package/components/tabs/themes/light/tab.fluent.css.js +1 -1
- package/components/tabs/themes/light/tab.fluent.css.js.map +1 -1
- package/components/tabs/themes/light/tab.indigo.css.js +1 -1
- package/components/tabs/themes/light/tab.indigo.css.js.map +1 -1
- package/components/tabs/themes/light/tab.material.css.js +1 -1
- package/components/tabs/themes/light/tab.material.css.js.map +1 -1
- package/components/tabs/themes/light/tab.shared.css.js +1 -1
- package/components/tabs/themes/light/tab.shared.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.bootstrap.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.bootstrap.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.common.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.common.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.fluent.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.fluent.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.indigo.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.indigo.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.material.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.material.css.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.common.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.common.css.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/shared/tabs/tabs.material.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.material.css.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/themes/dark/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/dark/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/light/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.shared.css.js +1 -1
- package/components/textarea/themes/light/textarea.shared.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
- package/components/theme-provider/theme-provider.d.ts +65 -0
- package/components/theme-provider/theme-provider.js +58 -0
- package/components/theme-provider/theme-provider.js.map +1 -0
- package/components/tile-manager/tile.js +6 -3
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tree/themes/dark/container.bootstrap.css.js +1 -1
- package/components/tree/themes/dark/container.bootstrap.css.js.map +1 -1
- package/components/tree/themes/light/container.bootstrap.css.js +1 -1
- package/components/tree/themes/light/container.bootstrap.css.js.map +1 -1
- package/components/tree/tree-item.js +4 -0
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.d.ts +14 -0
- package/components/tree/tree.js +23 -0
- package/components/tree/tree.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +0 -1
- package/components/validation-container/validation-container.js +6 -9
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +3176 -2986
- package/extras/chat-markdown-renderer.d.ts +72 -4
- package/extras/chat-markdown-renderer.js +19 -7
- package/extras/chat-markdown-renderer.js.map +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +5 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/package.json +9 -4
- 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/context.d.ts +36 -0
- package/theming/context.js +3 -0
- package/theming/context.js.map +1 -0
- package/theming/theming-controller.d.ts +7 -1
- package/theming/theming-controller.js +48 -12
- package/theming/theming-controller.js.map +1 -1
- package/theming/utils.d.ts +10 -0
- package/theming/utils.js +8 -42
- package/theming/utils.js.map +1 -1
- package/web-types.json +1 -1
- package/components/common/localization/intl-formatters.d.ts +0 -17
- package/components/common/localization/intl-formatters.js +0 -46
- package/components/common/localization/intl-formatters.js.map +0 -1
- package/components/validation-container/themes/dark/validator.bootstrap.css.d.ts +0 -1
- package/components/validation-container/themes/dark/validator.bootstrap.css.js +0 -3
- package/components/validation-container/themes/dark/validator.bootstrap.css.js.map +0 -1
- package/components/validation-container/themes/dark/validator.fluent.css.d.ts +0 -1
- package/components/validation-container/themes/dark/validator.fluent.css.js +0 -3
- package/components/validation-container/themes/dark/validator.fluent.css.js.map +0 -1
- package/components/validation-container/themes/dark/validator.indigo.css.d.ts +0 -1
- package/components/validation-container/themes/dark/validator.indigo.css.js +0 -3
- package/components/validation-container/themes/dark/validator.indigo.css.js.map +0 -1
- package/components/validation-container/themes/dark/validator.material.css.d.ts +0 -1
- package/components/validation-container/themes/dark/validator.material.css.js +0 -3
- package/components/validation-container/themes/dark/validator.material.css.js.map +0 -1
- package/components/validation-container/themes/light/validator.bootstrap.css.d.ts +0 -1
- package/components/validation-container/themes/light/validator.bootstrap.css.js +0 -3
- package/components/validation-container/themes/light/validator.bootstrap.css.js.map +0 -1
- package/components/validation-container/themes/light/validator.fluent.css.d.ts +0 -1
- package/components/validation-container/themes/light/validator.fluent.css.js +0 -3
- package/components/validation-container/themes/light/validator.fluent.css.js.map +0 -1
- package/components/validation-container/themes/light/validator.indigo.css.d.ts +0 -1
- package/components/validation-container/themes/light/validator.indigo.css.js +0 -3
- package/components/validation-container/themes/light/validator.indigo.css.js.map +0 -1
- package/components/validation-container/themes/light/validator.material.css.d.ts +0 -1
- package/components/validation-container/themes/light/validator.material.css.js +0 -3
- package/components/validation-container/themes/light/validator.material.css.js.map +0 -1
- package/components/validation-container/themes/light/validator.shared.css.d.ts +0 -1
- package/components/validation-container/themes/light/validator.shared.css.js +0 -3
- package/components/validation-container/themes/light/validator.shared.css.js.map +0 -1
- package/components/validation-container/themes/themes.d.ts +0 -2
- package/components/validation-container/themes/themes.js +0 -46
- package/components/validation-container/themes/themes.js.map +0 -1
|
@@ -4,15 +4,14 @@ 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 { getDateFormatter } from 'igniteui-i18n-core';
|
|
7
8
|
import { html, nothing } from 'lit';
|
|
8
9
|
import { property, query, queryAll, state } from 'lit/decorators.js';
|
|
9
10
|
import { choose } from 'lit/directives/choose.js';
|
|
10
11
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
12
|
import { addThemingController } from '../../theming/theming-controller.js';
|
|
12
13
|
import { addKeybindings, arrowDown, arrowLeft, arrowRight, arrowUp, endKey, homeKey, pageDownKey, pageUpKey, shiftKey, } from '../common/controllers/key-bindings.js';
|
|
13
|
-
import { watch } from '../common/decorators/watch.js';
|
|
14
14
|
import { registerComponent } from '../common/definitions/register.js';
|
|
15
|
-
import { createDateTimeFormatters } from '../common/localization/intl-formatters.js';
|
|
16
15
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
17
16
|
import { partMap } from '../common/part-map.js';
|
|
18
17
|
import { clamp, findElementFromEventPath, first, formatString, last, } from '../common/util.js';
|
|
@@ -41,164 +40,229 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
41
40
|
get _isYearView() {
|
|
42
41
|
return this.activeView === 'years';
|
|
43
42
|
}
|
|
44
|
-
get
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (this._isDayView) {
|
|
55
|
-
return this.resourceStrings.nextMonth;
|
|
56
|
-
}
|
|
57
|
-
if (this._isMonthView) {
|
|
58
|
-
return this.resourceStrings.nextYear;
|
|
59
|
-
}
|
|
60
|
-
return formatString(this.resourceStrings.nextYears, YEARS_PER_PAGE);
|
|
61
|
-
}
|
|
62
|
-
localeChange() {
|
|
63
|
-
this._intl.locale = this.locale;
|
|
64
|
-
}
|
|
65
|
-
formatOptionsChange() {
|
|
66
|
-
this._intl.update({
|
|
67
|
-
month: {
|
|
68
|
-
month: this.formatOptions.month,
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
async [focusActiveDate](options) {
|
|
73
|
-
await this.updateComplete;
|
|
74
|
-
if (this._isDayView) {
|
|
75
|
-
return this.daysViews
|
|
76
|
-
.item(this.activeDaysViewIndex)
|
|
77
|
-
.focusActiveDate(options);
|
|
78
|
-
}
|
|
79
|
-
if (this._isMonthView) {
|
|
80
|
-
return this.monthsView.focusActiveDate(options);
|
|
81
|
-
}
|
|
82
|
-
if (this._isYearView) {
|
|
83
|
-
return this.yearsView.focusActiveDate(options);
|
|
43
|
+
get _previousButtonLabel() {
|
|
44
|
+
switch (this.activeView) {
|
|
45
|
+
case 'days':
|
|
46
|
+
return this.resourceStrings.previousMonth;
|
|
47
|
+
case 'months':
|
|
48
|
+
return this.resourceStrings.previousYear;
|
|
49
|
+
case 'years':
|
|
50
|
+
return formatString(this.resourceStrings.previousYears, YEARS_PER_PAGE);
|
|
51
|
+
default:
|
|
52
|
+
return '';
|
|
84
53
|
}
|
|
85
54
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
55
|
+
get _nextButtonLabel() {
|
|
56
|
+
switch (this.activeView) {
|
|
57
|
+
case 'days':
|
|
58
|
+
return this.resourceStrings.nextMonth;
|
|
59
|
+
case 'months':
|
|
60
|
+
return this.resourceStrings.nextYear;
|
|
61
|
+
case 'years':
|
|
62
|
+
return formatString(this.resourceStrings.nextYears, YEARS_PER_PAGE);
|
|
63
|
+
default:
|
|
64
|
+
return '';
|
|
93
65
|
}
|
|
94
66
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
67
|
+
constructor() {
|
|
68
|
+
super();
|
|
69
|
+
this._contentRef = createRef();
|
|
70
|
+
this._activeDaysViewIndex = 0;
|
|
71
|
+
this.hideOutsideDays = false;
|
|
72
|
+
this.hideHeader = false;
|
|
73
|
+
this.headerOrientation = 'horizontal';
|
|
74
|
+
this.orientation = 'horizontal';
|
|
75
|
+
this.visibleMonths = 1;
|
|
76
|
+
this.activeView = 'days';
|
|
77
|
+
this.formatOptions = { month: 'long', weekday: 'narrow' };
|
|
78
|
+
addThemingController(this, all);
|
|
79
|
+
addKeybindings(this, {
|
|
80
|
+
skip: this._shouldSkipKeyboardEvent,
|
|
81
|
+
ref: this._contentRef,
|
|
82
|
+
bindingDefaults: { triggers: ['keydownRepeat'] },
|
|
83
|
+
})
|
|
84
|
+
.set(arrowLeft, this._handleArrowKey.bind(this, 'day', -1))
|
|
85
|
+
.set(arrowRight, this._handleArrowKey.bind(this, 'day', 1))
|
|
86
|
+
.set(arrowUp, this._handleArrowKey.bind(this, 'week', -1))
|
|
87
|
+
.set(arrowDown, this._handleArrowKey.bind(this, 'week', 1))
|
|
88
|
+
.set([shiftKey, pageUpKey], this._handleShiftPageKeys.bind(this, -1))
|
|
89
|
+
.set([shiftKey, pageDownKey], this._handleShiftPageKeys.bind(this, 1))
|
|
90
|
+
.set(pageUpKey, this._handlePageKeys.bind(this, -1))
|
|
91
|
+
.set(pageDownKey, this._handlePageKeys.bind(this, 1))
|
|
92
|
+
.set(homeKey, this._handleHomeKey)
|
|
93
|
+
.set(endKey, this._handleEndKey);
|
|
94
|
+
}
|
|
95
|
+
_shouldSkipKeyboardEvent(_, event) {
|
|
96
|
+
return !findElementFromEventPath(`${IgcDaysViewComponent.tagName}, ${IgcMonthsViewComponent.tagName}, ${IgcYearsViewComponent.tagName}`, event);
|
|
102
97
|
}
|
|
103
|
-
|
|
98
|
+
_handleArrowKey(period, delta) {
|
|
104
99
|
if (this._isDayView) {
|
|
105
|
-
const date = this.
|
|
106
|
-
this.
|
|
100
|
+
const date = this._getNextEnabledDate(this._activeDate.add(period, delta), delta);
|
|
101
|
+
this._updateViewIndex(date, delta);
|
|
107
102
|
this._activeDate = date;
|
|
108
103
|
}
|
|
109
104
|
else {
|
|
110
105
|
const monthOrYear = this._isMonthView ? 'month' : 'year';
|
|
111
106
|
const monthOrYearDelta = (this._isMonthView ? MONTHS_PER_ROW : YEARS_PER_ROW) * delta;
|
|
112
|
-
this._activeDate = this.
|
|
107
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.add(monthOrYear, period === 'week' ? monthOrYearDelta : delta), delta);
|
|
113
108
|
}
|
|
114
109
|
this[focusActiveDate]();
|
|
115
110
|
}
|
|
116
|
-
|
|
111
|
+
_handlePageKeys(delta) {
|
|
117
112
|
const unit = this._isDayView ? 'month' : 'year';
|
|
118
113
|
const increment = (this._isYearView ? YEARS_PER_PAGE : 1) * delta;
|
|
119
|
-
this._activeDate = this.
|
|
114
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.add(unit, increment), increment);
|
|
120
115
|
this[focusActiveDate]();
|
|
121
116
|
}
|
|
122
|
-
|
|
117
|
+
_handleShiftPageKeys(delta) {
|
|
123
118
|
if (this._isDayView) {
|
|
124
|
-
this._activeDate = this.
|
|
119
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.add('year', delta), delta);
|
|
125
120
|
this[focusActiveDate]();
|
|
126
121
|
}
|
|
127
122
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
123
|
+
_handleHomeKey() {
|
|
124
|
+
switch (this.activeView) {
|
|
125
|
+
case 'days': {
|
|
126
|
+
const firstView = CalendarDay.from(this._daysViews.item(0).activeDate);
|
|
127
|
+
this._activeDate = this._getNextEnabledDate(firstView.set({ date: 1 }), 1);
|
|
128
|
+
this._activeDaysViewIndex = 0;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'months':
|
|
132
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.set({ month: 0 }), 1);
|
|
133
|
+
break;
|
|
134
|
+
case 'years':
|
|
135
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.set({
|
|
136
|
+
year: getYearRange(this._activeDate, YEARS_PER_PAGE).start,
|
|
137
|
+
}), 1);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
this[focusActiveDate]();
|
|
141
|
+
}
|
|
142
|
+
_handleEndKey() {
|
|
143
|
+
switch (this.activeView) {
|
|
144
|
+
case 'days': {
|
|
145
|
+
const index = this._daysViews.length - 1;
|
|
146
|
+
const lastView = CalendarDay.from(this._daysViews.item(index).activeDate);
|
|
147
|
+
this._activeDate = this._getNextEnabledDate(lastView.set({ month: lastView.month + 1, date: 0 }), -1);
|
|
148
|
+
this._activeDaysViewIndex = index;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
case 'months':
|
|
152
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.set({ month: 11 }), -1);
|
|
153
|
+
break;
|
|
154
|
+
case 'years':
|
|
155
|
+
this._activeDate = this._getNextEnabledDate(this._activeDate.set({
|
|
156
|
+
year: getYearRange(this._activeDate, YEARS_PER_PAGE).end,
|
|
157
|
+
}), -1);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
this[focusActiveDate]();
|
|
161
|
+
}
|
|
162
|
+
_handleMonthChange(event) {
|
|
163
|
+
event.stopPropagation();
|
|
164
|
+
this.activeDate = event.detail;
|
|
165
|
+
this.activeView = 'days';
|
|
166
|
+
this[focusActiveDate]();
|
|
167
|
+
}
|
|
168
|
+
_handleYearChange(event) {
|
|
169
|
+
event.stopPropagation();
|
|
170
|
+
this.activeDate = event.detail;
|
|
171
|
+
this.activeView = 'months';
|
|
172
|
+
this[focusActiveDate]();
|
|
173
|
+
}
|
|
174
|
+
_handleValueChange(event) {
|
|
175
|
+
event.stopPropagation();
|
|
176
|
+
const view = event.target;
|
|
177
|
+
if (this._isSingle) {
|
|
178
|
+
this.value = view.value;
|
|
133
179
|
}
|
|
134
|
-
|
|
135
|
-
this.
|
|
180
|
+
else {
|
|
181
|
+
this.values = view.values;
|
|
136
182
|
}
|
|
137
|
-
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
|
|
183
|
+
this.emitEvent('igcChange', {
|
|
184
|
+
detail: this._isSingle ? this.value : this.values,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
_handleActiveDateChange(event) {
|
|
188
|
+
const view = event.target;
|
|
189
|
+
const views = Array.from(this._daysViews);
|
|
190
|
+
this._activeDaysViewIndex = views.indexOf(view);
|
|
191
|
+
this.activeDate = event.detail;
|
|
192
|
+
if (!areSameMonth(this.activeDate, view.activeDate)) {
|
|
193
|
+
this[focusActiveDate]();
|
|
141
194
|
}
|
|
195
|
+
}
|
|
196
|
+
_handleRangePreviewChange(event) {
|
|
197
|
+
this._rangePreviewDate = event.detail
|
|
198
|
+
? CalendarDay.from(event.detail)
|
|
199
|
+
: undefined;
|
|
200
|
+
}
|
|
201
|
+
_setActiveDaysView(viewIndex) {
|
|
202
|
+
const view = this._daysViews.item(viewIndex);
|
|
203
|
+
this.activeDate = view.activeDate;
|
|
204
|
+
this._activeDaysViewIndex = viewIndex;
|
|
205
|
+
}
|
|
206
|
+
_navigate(delta) {
|
|
207
|
+
const unit = this._isDayView ? 'month' : 'year';
|
|
208
|
+
const increment = (this._isYearView ? YEARS_PER_PAGE : 1) * delta;
|
|
209
|
+
this._activeDate = this._activeDate.add(unit, increment);
|
|
210
|
+
}
|
|
211
|
+
_navigatePrevious() {
|
|
212
|
+
this._navigate(-1);
|
|
213
|
+
}
|
|
214
|
+
_navigateNext() {
|
|
215
|
+
this._navigate(1);
|
|
216
|
+
}
|
|
217
|
+
_navigateToMonthView(viewIndex) {
|
|
218
|
+
this._setActiveDaysView(viewIndex);
|
|
219
|
+
this.activeView = 'months';
|
|
142
220
|
this[focusActiveDate]();
|
|
143
221
|
}
|
|
144
|
-
|
|
222
|
+
_navigateToYearView(viewIndex) {
|
|
145
223
|
if (this._isDayView) {
|
|
146
|
-
|
|
147
|
-
const last = CalendarDay.from(this.daysViews.item(index).activeDate);
|
|
148
|
-
this._activeDate = this.getSubsequentActiveDate(last.set({ month: last.month + 1, date: 0 }), -1);
|
|
149
|
-
this.activeDaysViewIndex = index;
|
|
224
|
+
this._setActiveDaysView(viewIndex);
|
|
150
225
|
}
|
|
151
|
-
|
|
152
|
-
|
|
226
|
+
this.activeView = 'years';
|
|
227
|
+
this[focusActiveDate]();
|
|
228
|
+
}
|
|
229
|
+
async [focusActiveDate](options) {
|
|
230
|
+
await this.updateComplete;
|
|
231
|
+
switch (this.activeView) {
|
|
232
|
+
case 'days':
|
|
233
|
+
return this._daysViews
|
|
234
|
+
.item(this._activeDaysViewIndex)
|
|
235
|
+
.focusActiveDate(options);
|
|
236
|
+
case 'months':
|
|
237
|
+
return this._monthsView.focusActiveDate(options);
|
|
238
|
+
case 'years':
|
|
239
|
+
return this._yearsView.focusActiveDate(options);
|
|
153
240
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
241
|
+
}
|
|
242
|
+
_updateViewIndex(date, delta) {
|
|
243
|
+
if (this.visibleMonths === 1) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const index = this._activeDaysViewIndex;
|
|
247
|
+
const view = CalendarDay.from(this._daysViews.item(index).activeDate);
|
|
248
|
+
if (date.month !== view.month) {
|
|
249
|
+
this._activeDaysViewIndex = clamp(index + delta, 0, this.visibleMonths - 1);
|
|
158
250
|
}
|
|
159
|
-
this[focusActiveDate]();
|
|
160
251
|
}
|
|
161
|
-
|
|
162
|
-
|
|
252
|
+
_getActiveDates() {
|
|
253
|
+
const current = this._activeDaysViewIndex;
|
|
254
|
+
const length = Math.max(this.visibleMonths, 1);
|
|
255
|
+
return Array.from({ length }, (_, i) => this._activeDate.add('month', i - current));
|
|
163
256
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.activeView = 'days';
|
|
174
|
-
this.formatOptions = { month: 'long', weekday: 'narrow' };
|
|
175
|
-
this._intl = createDateTimeFormatters(this.locale, {
|
|
176
|
-
month: {
|
|
177
|
-
month: this.formatOptions.month,
|
|
178
|
-
},
|
|
179
|
-
monthLabel: { month: 'long' },
|
|
180
|
-
weekday: { weekday: 'short' },
|
|
181
|
-
monthDay: { month: 'short', day: 'numeric' },
|
|
182
|
-
yearLabel: { month: 'long', year: 'numeric' },
|
|
183
|
-
});
|
|
184
|
-
addThemingController(this, all);
|
|
185
|
-
addKeybindings(this, {
|
|
186
|
-
skip: this.isNotFromCalendarView,
|
|
187
|
-
ref: this.contentRef,
|
|
188
|
-
bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },
|
|
189
|
-
})
|
|
190
|
-
.set(arrowLeft, this.handleArrowKey.bind(this, 'day', -1))
|
|
191
|
-
.set(arrowRight, this.handleArrowKey.bind(this, 'day', 1))
|
|
192
|
-
.set(arrowUp, this.handleArrowKey.bind(this, 'week', -1))
|
|
193
|
-
.set(arrowDown, this.handleArrowKey.bind(this, 'week', 1))
|
|
194
|
-
.set([shiftKey, pageUpKey], this.onShiftPageKeys.bind(this, -1))
|
|
195
|
-
.set([shiftKey, pageDownKey], this.onShiftPageKeys.bind(this, 1))
|
|
196
|
-
.set(pageUpKey, this.onPageKeys.bind(this, -1))
|
|
197
|
-
.set(pageDownKey, this.onPageKeys.bind(this, 1))
|
|
198
|
-
.set(homeKey, this.onHomeKey)
|
|
199
|
-
.set(endKey, this.onEndKey);
|
|
200
|
-
}
|
|
201
|
-
renderNavigationButtons() {
|
|
257
|
+
_getNextEnabledDate(start, delta) {
|
|
258
|
+
const disabled = this._disabledDates;
|
|
259
|
+
let beginning = start.clone();
|
|
260
|
+
while (isDateInRanges(beginning, disabled)) {
|
|
261
|
+
beginning = beginning.add('day', delta);
|
|
262
|
+
}
|
|
263
|
+
return beginning;
|
|
264
|
+
}
|
|
265
|
+
_renderNavigationButtons() {
|
|
202
266
|
const parts = {
|
|
203
267
|
'navigation-button': true,
|
|
204
268
|
vertical: this.orientation === 'vertical',
|
|
@@ -207,8 +271,8 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
207
271
|
<div part="navigation-buttons">
|
|
208
272
|
<button
|
|
209
273
|
part=${partMap(parts)}
|
|
210
|
-
aria-label=${this.
|
|
211
|
-
@click=${this.
|
|
274
|
+
aria-label=${this._previousButtonLabel}
|
|
275
|
+
@click=${this._navigatePrevious}
|
|
212
276
|
>
|
|
213
277
|
<igc-icon
|
|
214
278
|
aria-hidden="true"
|
|
@@ -219,8 +283,8 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
219
283
|
|
|
220
284
|
<button
|
|
221
285
|
part=${partMap(parts)}
|
|
222
|
-
aria-label=${this.
|
|
223
|
-
@click=${this.
|
|
286
|
+
aria-label=${this._nextButtonLabel}
|
|
287
|
+
@click=${this._navigateNext}
|
|
224
288
|
>
|
|
225
289
|
<igc-icon
|
|
226
290
|
aria-hidden="true"
|
|
@@ -231,61 +295,69 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
231
295
|
</div>
|
|
232
296
|
`;
|
|
233
297
|
}
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
|
|
298
|
+
_renderMonthButtonNavigation(active, viewIndex) {
|
|
299
|
+
const formatter = getDateFormatter();
|
|
300
|
+
const label = formatter.formatDateTime(active.native, this.locale, {
|
|
301
|
+
month: 'long',
|
|
302
|
+
});
|
|
303
|
+
const value = formatter.formatDateTime(active.native, this.locale, {
|
|
304
|
+
month: this.formatOptions.month,
|
|
305
|
+
});
|
|
306
|
+
const ariaLabel = `${label}, ${this.resourceStrings.selectMonth}`;
|
|
238
307
|
return html `
|
|
239
308
|
<button
|
|
240
309
|
part="months-navigation"
|
|
241
310
|
aria-label=${ariaLabel}
|
|
242
|
-
@click=${() => this.
|
|
311
|
+
@click=${() => this._navigateToMonthView(viewIndex)}
|
|
243
312
|
>
|
|
244
|
-
${
|
|
313
|
+
${value}
|
|
245
314
|
</button>
|
|
246
315
|
`;
|
|
247
316
|
}
|
|
248
|
-
|
|
249
|
-
const
|
|
317
|
+
_renderYearButtonNavigation(active, viewIndex) {
|
|
318
|
+
const { format } = getDateFormatter().getIntlFormatter(this.locale, {
|
|
319
|
+
month: 'long',
|
|
320
|
+
year: 'numeric',
|
|
321
|
+
});
|
|
250
322
|
const ariaLabel = `${active.year}, ${this.resourceStrings.selectYear}`;
|
|
251
|
-
const ariaSkip = this._isDayView ?
|
|
323
|
+
const ariaSkip = this._isDayView ? format(active.native) : active.year;
|
|
252
324
|
return html `
|
|
253
325
|
<span class="aria-off-screen" aria-live="polite">${ariaSkip}</span>
|
|
254
326
|
<button
|
|
255
327
|
part="years-navigation"
|
|
256
328
|
aria-label=${ariaLabel}
|
|
257
|
-
@click=${() => this.
|
|
329
|
+
@click=${() => this._navigateToYearView(viewIndex)}
|
|
258
330
|
>
|
|
259
331
|
${active.year}
|
|
260
332
|
</button>
|
|
261
333
|
`;
|
|
262
334
|
}
|
|
263
|
-
|
|
335
|
+
_renderYearRangeNavigation(active) {
|
|
264
336
|
const { start, end } = getYearRange(active, YEARS_PER_PAGE);
|
|
265
337
|
return html `
|
|
266
338
|
<span part="years-range" aria-live="polite"> ${start} - ${end} </span>
|
|
267
339
|
`;
|
|
268
340
|
}
|
|
269
|
-
|
|
341
|
+
_renderNavigation(date, showButtons = true, viewIndex = 0) {
|
|
270
342
|
const activeDate = date ?? this._activeDate;
|
|
271
343
|
return html `
|
|
272
344
|
<div part="navigation">
|
|
273
345
|
<div part="picker-dates">
|
|
274
346
|
${this._isDayView
|
|
275
|
-
? this.
|
|
347
|
+
? this._renderMonthButtonNavigation(activeDate, viewIndex)
|
|
276
348
|
: nothing}
|
|
277
349
|
${this._isDayView || this._isMonthView
|
|
278
|
-
? this.
|
|
350
|
+
? this._renderYearButtonNavigation(activeDate, viewIndex)
|
|
279
351
|
: nothing}
|
|
280
352
|
${this._isYearView
|
|
281
|
-
? this.
|
|
353
|
+
? this._renderYearRangeNavigation(activeDate)
|
|
282
354
|
: nothing}
|
|
283
355
|
</div>
|
|
284
|
-
${showButtons ? this.
|
|
356
|
+
${showButtons ? this._renderNavigationButtons() : nothing}
|
|
285
357
|
</div>
|
|
286
358
|
`;
|
|
287
359
|
}
|
|
288
|
-
|
|
360
|
+
_renderHeader() {
|
|
289
361
|
if (this.hideHeader || this._isMultiple) {
|
|
290
362
|
return nothing;
|
|
291
363
|
}
|
|
@@ -297,24 +369,33 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
297
369
|
<h5 part="header-title">
|
|
298
370
|
<slot name="title">${title}</slot>
|
|
299
371
|
</h5>
|
|
300
|
-
<h2 part="header-date">${this.
|
|
372
|
+
<h2 part="header-date">${this._renderHeaderDate()}</h2>
|
|
301
373
|
</div>
|
|
302
374
|
`;
|
|
303
375
|
}
|
|
304
|
-
|
|
376
|
+
_renderHeaderDateSingle() {
|
|
305
377
|
const date = this.value ?? CalendarDay.today.native;
|
|
306
|
-
const
|
|
307
|
-
const
|
|
378
|
+
const formatter = getDateFormatter();
|
|
379
|
+
const weekday = formatter.formatDateTime(date, this.locale, {
|
|
380
|
+
weekday: 'short',
|
|
381
|
+
});
|
|
382
|
+
const monthDay = formatter.formatDateTime(date, this.locale, {
|
|
383
|
+
month: 'short',
|
|
384
|
+
day: 'numeric',
|
|
385
|
+
});
|
|
308
386
|
const separator = this.headerOrientation === 'vertical' ? html `<br />` : ' ';
|
|
309
|
-
const formatted = html `${
|
|
387
|
+
const formatted = html `${weekday},${separator}${monthDay}`;
|
|
310
388
|
return html `<slot name="header-date">${formatted}</slot>`;
|
|
311
389
|
}
|
|
312
|
-
|
|
390
|
+
_renderHeaderDateRange() {
|
|
313
391
|
const values = this.values;
|
|
314
|
-
const
|
|
392
|
+
const { format } = getDateFormatter().getIntlFormatter(this.locale, {
|
|
393
|
+
month: 'short',
|
|
394
|
+
day: 'numeric',
|
|
395
|
+
});
|
|
315
396
|
const { startDate, endDate } = this.resourceStrings;
|
|
316
|
-
const start = this._hasValues ?
|
|
317
|
-
const end = this._hasValues && values.length > 1 ?
|
|
397
|
+
const start = this._hasValues ? format(first(values)) : startDate;
|
|
398
|
+
const end = this._hasValues && values.length > 1 ? format(last(values)) : endDate;
|
|
318
399
|
return html `
|
|
319
400
|
<slot name="header-date">
|
|
320
401
|
<span>${start}</span>
|
|
@@ -323,27 +404,27 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
323
404
|
</slot>
|
|
324
405
|
`;
|
|
325
406
|
}
|
|
326
|
-
|
|
407
|
+
_renderHeaderDate() {
|
|
327
408
|
return this._isSingle
|
|
328
|
-
? this.
|
|
329
|
-
: this.
|
|
409
|
+
? this._renderHeaderDateSingle()
|
|
410
|
+
: this._renderHeaderDateRange();
|
|
330
411
|
}
|
|
331
|
-
|
|
332
|
-
const activeDates = this.
|
|
412
|
+
_renderDaysView() {
|
|
413
|
+
const activeDates = this._getActiveDates();
|
|
333
414
|
const horizontal = this.orientation === 'horizontal';
|
|
334
415
|
const length = activeDates.length - 1;
|
|
335
416
|
const format = this.formatOptions
|
|
336
417
|
.weekday;
|
|
337
418
|
return html `${activeDates.map((date, idx) => html `
|
|
338
419
|
<div part="days-view-container">
|
|
339
|
-
${this.
|
|
420
|
+
${this._renderNavigation(date, horizontal ? idx === length : idx === 0, idx)}
|
|
340
421
|
<igc-days-view
|
|
341
|
-
@igcChange=${this.
|
|
342
|
-
@igcActiveDateChange=${this.
|
|
343
|
-
@igcRangePreviewDateChange=${this.
|
|
422
|
+
@igcChange=${this._handleValueChange}
|
|
423
|
+
@igcActiveDateChange=${this._handleActiveDateChange}
|
|
424
|
+
@igcRangePreviewDateChange=${this._handleRangePreviewChange}
|
|
344
425
|
part="days-view"
|
|
345
426
|
exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, content-vertical, weekend, range, special, disabled, single, preview"
|
|
346
|
-
.active=${this.
|
|
427
|
+
.active=${this._activeDaysViewIndex === idx}
|
|
347
428
|
.activeDate=${date.native}
|
|
348
429
|
.disabledDates=${this.disabledDates}
|
|
349
430
|
.hideLeadingDays=${this.hideOutsideDays || idx !== 0}
|
|
@@ -362,28 +443,28 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
362
443
|
</div>
|
|
363
444
|
`)}`;
|
|
364
445
|
}
|
|
365
|
-
|
|
446
|
+
_renderMonthView() {
|
|
366
447
|
const format = this.formatOptions
|
|
367
448
|
.month;
|
|
368
449
|
return html `
|
|
369
|
-
${this.
|
|
450
|
+
${this._renderNavigation()}
|
|
370
451
|
<igc-months-view
|
|
371
452
|
part="months-view"
|
|
372
453
|
exportparts="month, selected, month-inner, current"
|
|
373
|
-
@igcChange=${this.
|
|
454
|
+
@igcChange=${this._handleMonthChange}
|
|
374
455
|
.value=${this.activeDate}
|
|
375
456
|
.locale=${this.locale}
|
|
376
457
|
.monthFormat=${format}
|
|
377
458
|
></igc-months-view>
|
|
378
459
|
`;
|
|
379
460
|
}
|
|
380
|
-
|
|
461
|
+
_renderYearView() {
|
|
381
462
|
return html `
|
|
382
|
-
${this.
|
|
463
|
+
${this._renderNavigation()}
|
|
383
464
|
<igc-years-view
|
|
384
465
|
part="years-view"
|
|
385
466
|
exportparts="year, selected, year-inner, current"
|
|
386
|
-
@igcChange=${this.
|
|
467
|
+
@igcChange=${this._handleYearChange}
|
|
387
468
|
.value=${this.activeDate}
|
|
388
469
|
.yearsPerPage=${YEARS_PER_PAGE}
|
|
389
470
|
></igc-years-view>
|
|
@@ -395,100 +476,29 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
|
|
|
395
476
|
'content-vertical': this._isDayView && this.orientation === 'vertical',
|
|
396
477
|
};
|
|
397
478
|
return html `
|
|
398
|
-
${this.
|
|
399
|
-
<div ${ref(this.
|
|
479
|
+
${this._renderHeader()}
|
|
480
|
+
<div ${ref(this._contentRef)} part=${partMap(parts)}>
|
|
400
481
|
${choose(this.activeView, [
|
|
401
|
-
['days', () => this.
|
|
402
|
-
['months', () => this.
|
|
403
|
-
['years', () => this.
|
|
482
|
+
['days', () => this._renderDaysView()],
|
|
483
|
+
['months', () => this._renderMonthView()],
|
|
484
|
+
['years', () => this._renderYearView()],
|
|
404
485
|
])}
|
|
405
486
|
</div>
|
|
406
487
|
`;
|
|
407
488
|
}
|
|
408
|
-
changeMonth(event) {
|
|
409
|
-
event.stopPropagation();
|
|
410
|
-
this.activeDate = event.detail;
|
|
411
|
-
this.activeView = 'days';
|
|
412
|
-
this[focusActiveDate]();
|
|
413
|
-
}
|
|
414
|
-
changeYear(event) {
|
|
415
|
-
event.stopPropagation();
|
|
416
|
-
this.activeDate = event.detail;
|
|
417
|
-
this.activeView = 'months';
|
|
418
|
-
this[focusActiveDate]();
|
|
419
|
-
}
|
|
420
|
-
changeValue(event) {
|
|
421
|
-
event.stopPropagation();
|
|
422
|
-
const view = event.target;
|
|
423
|
-
if (this._isSingle) {
|
|
424
|
-
this.value = view.value;
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
this.values = view.values;
|
|
428
|
-
}
|
|
429
|
-
this.emitEvent('igcChange', {
|
|
430
|
-
detail: this._isSingle ? this.value : this.values,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
activeDateChanged(event) {
|
|
434
|
-
const view = event.target;
|
|
435
|
-
const views = Array.from(this.daysViews);
|
|
436
|
-
this.activeDaysViewIndex = views.indexOf(view);
|
|
437
|
-
this.activeDate = event.detail;
|
|
438
|
-
if (!areSameMonth(this.activeDate, view.activeDate)) {
|
|
439
|
-
this[focusActiveDate]();
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
rangePreviewDateChanged(event) {
|
|
443
|
-
this._rangePreviewDate = event.detail
|
|
444
|
-
? CalendarDay.from(event.detail)
|
|
445
|
-
: undefined;
|
|
446
|
-
}
|
|
447
|
-
getActiveDates() {
|
|
448
|
-
const current = this.activeDaysViewIndex;
|
|
449
|
-
const length = Math.max(this.visibleMonths, 1);
|
|
450
|
-
return Array.from({ length }, (_, i) => this._activeDate.add('month', i - current));
|
|
451
|
-
}
|
|
452
|
-
activateDaysView(index) {
|
|
453
|
-
const view = this.daysViews.item(index);
|
|
454
|
-
this.activeDate = view.activeDate;
|
|
455
|
-
this.activeDaysViewIndex = index;
|
|
456
|
-
}
|
|
457
|
-
navigatePrevious() {
|
|
458
|
-
const unit = this._isDayView ? 'month' : 'year';
|
|
459
|
-
const delta = this._isYearView ? YEARS_PER_PAGE : 1;
|
|
460
|
-
this._activeDate = this._activeDate.add(unit, -delta);
|
|
461
|
-
}
|
|
462
|
-
navigateNext() {
|
|
463
|
-
const unit = this._isDayView ? 'month' : 'year';
|
|
464
|
-
const delta = this._isYearView ? YEARS_PER_PAGE : 1;
|
|
465
|
-
this._activeDate = this._activeDate.add(unit, delta);
|
|
466
|
-
}
|
|
467
|
-
switchToMonths(viewIndex) {
|
|
468
|
-
this.activateDaysView(viewIndex);
|
|
469
|
-
this.activeView = 'months';
|
|
470
|
-
this[focusActiveDate]();
|
|
471
|
-
}
|
|
472
|
-
switchToYears(viewIndex) {
|
|
473
|
-
if (this._isDayView) {
|
|
474
|
-
this.activateDaysView(viewIndex);
|
|
475
|
-
}
|
|
476
|
-
this.activeView = 'years';
|
|
477
|
-
this[focusActiveDate]();
|
|
478
|
-
}
|
|
479
489
|
}
|
|
480
490
|
__decorate([
|
|
481
491
|
state()
|
|
482
|
-
], IgcCalendarComponent.prototype, "
|
|
492
|
+
], IgcCalendarComponent.prototype, "_activeDaysViewIndex", void 0);
|
|
483
493
|
__decorate([
|
|
484
494
|
queryAll(IgcDaysViewComponent.tagName)
|
|
485
|
-
], IgcCalendarComponent.prototype, "
|
|
495
|
+
], IgcCalendarComponent.prototype, "_daysViews", void 0);
|
|
486
496
|
__decorate([
|
|
487
497
|
query(IgcMonthsViewComponent.tagName)
|
|
488
|
-
], IgcCalendarComponent.prototype, "
|
|
498
|
+
], IgcCalendarComponent.prototype, "_monthsView", void 0);
|
|
489
499
|
__decorate([
|
|
490
500
|
query(IgcYearsViewComponent.tagName)
|
|
491
|
-
], IgcCalendarComponent.prototype, "
|
|
501
|
+
], IgcCalendarComponent.prototype, "_yearsView", void 0);
|
|
492
502
|
__decorate([
|
|
493
503
|
property({ type: Boolean, attribute: 'hide-outside-days', reflect: true })
|
|
494
504
|
], IgcCalendarComponent.prototype, "hideOutsideDays", void 0);
|
|
@@ -510,10 +520,4 @@ __decorate([
|
|
|
510
520
|
__decorate([
|
|
511
521
|
property({ attribute: false })
|
|
512
522
|
], IgcCalendarComponent.prototype, "formatOptions", void 0);
|
|
513
|
-
__decorate([
|
|
514
|
-
watch('locale')
|
|
515
|
-
], IgcCalendarComponent.prototype, "localeChange", null);
|
|
516
|
-
__decorate([
|
|
517
|
-
watch('formatOptions')
|
|
518
|
-
], IgcCalendarComponent.prototype, "formatOptionsChange", null);
|
|
519
523
|
//# sourceMappingURL=calendar.js.map
|