igniteui-webcomponents 4.11.0 → 5.0.0-rc.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 +79 -0
- package/README.md +168 -110
- package/components/accordion/accordion.d.ts +2 -2
- package/components/accordion/accordion.js +25 -35
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.d.ts +1 -3
- package/components/avatar/avatar.js +1 -3
- package/components/avatar/avatar.js.map +1 -1
- package/components/avatar/themes/avatar.base.css.js +1 -1
- package/components/avatar/themes/avatar.base.css.js.map +1 -1
- package/components/badge/badge.d.ts +2 -1
- package/components/badge/badge.js.map +1 -1
- package/components/badge/themes/badge.base.css.js +1 -1
- package/components/badge/themes/badge.base.css.js.map +1 -1
- package/components/button/button-base.d.ts +3 -4
- package/components/button/button-base.js +1 -9
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.d.ts +3 -7
- package/components/button/button.js +4 -5
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +2 -2
- package/components/button/icon-button.js +0 -3
- package/components/button/icon-button.js.map +1 -1
- package/components/button/themes/button/button.base.css.js +1 -1
- package/components/button/themes/button/button.base.css.js.map +1 -1
- package/components/button/themes/icon-button/icon-button.base.css.js +1 -1
- package/components/button/themes/icon-button/icon-button.base.css.js.map +1 -1
- package/components/button-group/themes/button.base.css.js +1 -1
- package/components/button-group/themes/button.base.css.js.map +1 -1
- package/components/button-group/themes/group.base.css.js +1 -1
- package/components/button-group/themes/group.base.css.js.map +1 -1
- package/components/calendar/base.d.ts +65 -0
- package/components/calendar/base.js +150 -0
- package/components/calendar/base.js.map +1 -0
- package/components/calendar/calendar.d.ts +113 -61
- package/components/calendar/calendar.js +417 -514
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +43 -46
- package/components/calendar/days-view/days-view.js +269 -340
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +30 -0
- package/components/calendar/helpers.js +99 -0
- package/components/calendar/helpers.js.map +1 -0
- package/components/calendar/model.d.ts +55 -0
- package/components/calendar/model.js +94 -0
- package/components/calendar/model.js.map +1 -0
- package/components/calendar/months-view/months-view.d.ts +12 -12
- package/components/calendar/months-view/months-view.js +72 -79
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/themes/calendar.base.css.js +1 -1
- package/components/calendar/themes/calendar.base.css.js.map +1 -1
- package/components/calendar/types.d.ts +16 -0
- package/components/calendar/types.js +10 -0
- package/components/calendar/types.js.map +1 -0
- package/components/calendar/years-view/years-view.d.ts +13 -12
- package/components/calendar/years-view/years-view.js +58 -73
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/themes/card.actions.base.css.js +1 -1
- package/components/card/themes/card.actions.base.css.js.map +1 -1
- package/components/card/themes/card.content.base.css.js +1 -1
- package/components/card/themes/card.content.base.css.js.map +1 -1
- package/components/card/themes/card.header.base.css.js +1 -1
- package/components/card/themes/card.header.base.css.js.map +1 -1
- package/components/card/themes/card.media.base.css.js +1 -1
- package/components/card/themes/card.media.base.css.js.map +1 -1
- package/components/card/themes/container.base.css.js +1 -1
- package/components/card/themes/container.base.css.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +8 -5
- package/components/checkbox/checkbox-base.js +8 -15
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.d.ts +2 -4
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.d.ts +1 -3
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/switch.base.css.js +1 -1
- package/components/checkbox/themes/switch.base.css.js.map +1 -1
- package/components/checkbox/validators.d.ts +3 -0
- package/components/checkbox/validators.js +5 -0
- package/components/checkbox/validators.js.map +1 -0
- package/components/chip/chip.d.ts +4 -3
- package/components/chip/chip.js +11 -19
- 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/shared/chip.common.css.js +1 -1
- package/components/chip/themes/shared/chip.common.css.js.map +1 -1
- package/components/combo/combo.d.ts +36 -54
- package/components/combo/combo.js +36 -59
- package/components/combo/combo.js.map +1 -1
- package/components/combo/themes/combo-header.base.css.js +1 -1
- package/components/combo/themes/combo-header.base.css.js.map +1 -1
- package/components/combo/themes/combo-item.base.css.js +1 -1
- package/components/combo/themes/combo-item.base.css.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/types.d.ts +2 -2
- package/components/combo/types.js.map +1 -1
- package/components/combo/validators.d.ts +3 -0
- package/components/combo/validators.js +9 -0
- package/components/combo/validators.js.map +1 -0
- package/components/common/controllers/key-bindings.d.ts +1 -0
- package/components/common/controllers/key-bindings.js.map +1 -1
- package/components/common/controllers/mutation-observer.d.ts +1 -0
- package/components/common/controllers/mutation-observer.js.map +1 -1
- package/components/common/controllers/root-click.d.ts +4 -2
- package/components/common/controllers/root-click.js +13 -7
- package/components/common/controllers/root-click.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +0 -2
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/localization/intl-formatters.d.ts +17 -0
- package/components/common/localization/intl-formatters.js +46 -0
- package/components/common/localization/intl-formatters.js.map +1 -0
- package/components/common/mixins/alert.d.ts +3 -3
- package/components/common/mixins/alert.js +6 -4
- package/components/common/mixins/alert.js.map +1 -1
- package/components/common/mixins/combo-box.d.ts +4 -3
- package/components/common/mixins/combo-box.js +16 -10
- package/components/common/mixins/combo-box.js.map +1 -1
- package/components/common/mixins/form-associated.d.ts +1 -1
- package/components/common/mixins/form-associated.js +4 -2
- package/components/common/mixins/form-associated.js.map +1 -1
- package/components/common/util.d.ts +26 -0
- package/components/common/util.js +34 -0
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +7 -10
- package/components/date-picker/date-picker.js +16 -33
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/date-picker.base.css.js +1 -1
- package/components/date-picker/themes/date-picker.base.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
- package/components/date-picker/validators.d.ts +3 -0
- package/components/date-picker/validators.js +15 -0
- package/components/date-picker/validators.js.map +1 -0
- package/components/date-time-input/date-time-input.d.ts +3 -22
- package/components/date-time-input/date-time-input.js +8 -36
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/date-util.js +3 -1
- package/components/date-time-input/date-util.js.map +1 -1
- package/components/date-time-input/validators.d.ts +3 -0
- package/components/date-time-input/validators.js +18 -0
- package/components/date-time-input/validators.js.map +1 -0
- package/components/dialog/dialog.d.ts +12 -25
- package/components/dialog/dialog.js +55 -77
- package/components/dialog/dialog.js.map +1 -1
- package/components/dialog/themes/dialog.base.css.js +1 -1
- package/components/dialog/themes/dialog.base.css.js.map +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js.map +1 -1
- package/components/divider/divider.js.map +1 -1
- package/components/divider/themes/divider.base.css.js +1 -1
- package/components/divider/themes/divider.base.css.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +1 -1
- package/components/dropdown/dropdown-group.js +5 -3
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +4 -11
- package/components/dropdown/dropdown.js +10 -23
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/themes/dropdown-group.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-group.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown-header.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-header.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown.base.css.js +1 -1
- package/components/dropdown/themes/dropdown.base.css.js.map +1 -1
- package/components/expansion-panel/expansion-panel.d.ts +10 -10
- package/components/expansion-panel/expansion-panel.js +39 -39
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/expansion-panel/themes/expansion-panel.base.css.js +1 -1
- package/components/expansion-panel/themes/expansion-panel.base.css.js.map +1 -1
- package/components/icon/icon-references.d.ts +28 -0
- package/components/icon/icon-references.js +151 -0
- package/components/icon/icon-references.js.map +1 -0
- package/components/icon/icon-state.broadcast.d.ts +10 -0
- package/components/icon/icon-state.broadcast.js +36 -0
- package/components/icon/icon-state.broadcast.js.map +1 -0
- package/components/icon/icon.d.ts +3 -3
- package/components/icon/icon.js +13 -7
- package/components/icon/icon.js.map +1 -1
- package/components/icon/icon.registry.d.ts +14 -14
- package/components/icon/icon.registry.js +70 -26
- package/components/icon/icon.registry.js.map +1 -1
- package/components/icon/internal-icons-lib.d.ts +2 -2
- package/components/icon/internal-icons-lib.js +2 -2
- package/components/icon/internal-icons-lib.js.map +1 -1
- package/components/icon/registry/default-map.d.ts +12 -0
- package/components/icon/registry/default-map.js +31 -0
- package/components/icon/registry/default-map.js.map +1 -0
- package/components/icon/registry/parser.d.ts +6 -0
- package/components/icon/registry/parser.js +21 -0
- package/components/icon/registry/parser.js.map +1 -0
- package/components/icon/registry/types.d.ts +34 -0
- package/components/icon/registry/types.js +7 -0
- package/components/icon/registry/types.js.map +1 -0
- package/components/icon/themes/icon.base.css.js +1 -1
- package/components/icon/themes/icon.base.css.js.map +1 -1
- package/components/input/input-base.d.ts +8 -21
- package/components/input/input-base.js +12 -41
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +3 -29
- package/components/input/input.js +4 -78
- 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/validators.d.ts +4 -0
- package/components/input/validators.js +30 -0
- package/components/input/validators.js.map +1 -0
- package/components/list/list.d.ts +1 -3
- package/components/list/list.js +1 -2
- package/components/list/list.js.map +1 -1
- package/components/list/themes/container.base.css.js +1 -1
- package/components/list/themes/container.base.css.js.map +1 -1
- package/components/mask-input/mask-input-base.d.ts +3 -2
- package/components/mask-input/mask-input-base.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +1 -4
- package/components/mask-input/mask-input.js +7 -17
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/validators.d.ts +3 -0
- package/components/mask-input/validators.js +11 -0
- package/components/mask-input/validators.js.map +1 -0
- package/components/nav-drawer/nav-drawer-item.d.ts +1 -5
- package/components/nav-drawer/nav-drawer-item.js +9 -10
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +4 -3
- package/components/nav-drawer/nav-drawer.js +18 -7
- 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/header-item.base.css.js +1 -1
- package/components/nav-drawer/themes/header-item.base.css.js.map +1 -1
- package/components/nav-drawer/themes/item.base.css.js +1 -1
- package/components/nav-drawer/themes/item.base.css.js.map +1 -1
- package/components/navbar/themes/navbar.base.css.js +1 -1
- package/components/navbar/themes/navbar.base.css.js.map +1 -1
- package/components/popover/themes/light/popover.base.css.js +1 -1
- package/components/popover/themes/light/popover.base.css.js.map +1 -1
- package/components/progress/base.d.ts +2 -1
- package/components/progress/base.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/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/radio/radio.d.ts +9 -9
- package/components/radio/radio.js +17 -31
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/radio.base.css.js +1 -1
- package/components/radio/themes/radio.base.css.js.map +1 -1
- package/components/radio/validators.d.ts +3 -0
- package/components/radio/validators.js +13 -0
- package/components/radio/validators.js.map +1 -0
- package/components/radio-group/radio-group.base.css.js +1 -1
- package/components/radio-group/radio-group.base.css.js.map +1 -1
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +1 -9
- package/components/rating/rating.js +6 -16
- package/components/rating/rating.js.map +1 -1
- package/components/rating/themes/rating-symbol.base.css.js +1 -1
- package/components/rating/themes/rating-symbol.base.css.js.map +1 -1
- package/components/rating/themes/rating.base.css.js +1 -1
- package/components/rating/themes/rating.base.css.js.map +1 -1
- package/components/ripple/ripple.material.css.js +1 -1
- package/components/ripple/ripple.material.css.js.map +1 -1
- package/components/select/select.d.ts +5 -33
- package/components/select/select.js +23 -66
- 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/validators.d.ts +3 -0
- package/components/select/validators.js +5 -0
- package/components/select/validators.js.map +1 -0
- package/components/slider/range-slider.d.ts +0 -16
- package/components/slider/range-slider.js +0 -18
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/themes/slider.base.css.js +1 -1
- package/components/slider/themes/slider.base.css.js.map +1 -1
- package/components/snackbar/snackbar.js +3 -7
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/snackbar/themes/snackbar.base.css.js +1 -1
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -1
- package/components/stepper/animations.d.ts +7 -1
- package/components/stepper/animations.js +63 -15
- package/components/stepper/animations.js.map +1 -1
- package/components/stepper/step.d.ts +3 -1
- package/components/stepper/step.js +17 -6
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/themes/step/step.base.css.js +1 -1
- package/components/stepper/themes/step/step.base.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.bootstrap.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.bootstrap.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.fluent.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.fluent.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.indigo.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.indigo.css.js.map +1 -1
- package/components/tabs/tabs.js +2 -3
- package/components/tabs/tabs.js.map +1 -1
- package/components/tabs/themes/tab.base.css.js +1 -1
- package/components/tabs/themes/tab.base.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/textarea.d.ts +13 -16
- package/components/textarea/textarea.js +10 -12
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/textarea.base.css.js +1 -1
- package/components/textarea/themes/textarea.base.css.js.map +1 -1
- package/components/textarea/validators.d.ts +3 -0
- package/components/textarea/validators.js +7 -0
- package/components/textarea/validators.js.map +1 -0
- package/components/toast/themes/toast.base.css.js +1 -1
- package/components/toast/themes/toast.base.css.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/item.base.css.js +1 -1
- package/components/tree/themes/item.base.css.js.map +1 -1
- package/components/tree/tree-item.d.ts +4 -4
- package/components/tree/tree-item.js +11 -23
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.d.ts +3 -4
- package/components/tree/tree.js +1 -37
- package/components/tree/tree.js.map +1 -1
- package/components/types.d.ts +3 -0
- package/components/types.js +2 -0
- package/components/types.js.map +1 -0
- package/custom-elements.json +30656 -31315
- package/igniteui-webcomponents.css-data.json +5 -928
- package/igniteui-webcomponents.html-data.json +4 -2699
- package/index.d.ts +5 -4
- package/index.js +2 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/theming/config.js +3 -3
- package/theming/config.js.map +1 -1
- package/theming/theming-controller.d.ts +4 -6
- package/theming/theming-controller.js +30 -34
- package/theming/theming-controller.js.map +1 -1
- package/theming/theming-decorator.d.ts +29 -11
- package/theming/theming-decorator.js +21 -7
- package/theming/theming-decorator.js.map +1 -1
- package/theming/theming-event.js.map +1 -1
- package/theming/types.d.ts +5 -0
- package/theming/types.js.map +1 -1
- package/theming/utils.d.ts +1 -1
- package/theming/utils.js +8 -8
- package/theming/utils.js.map +1 -1
- package/web-types.json +12 -7621
- package/components/calendar/common/calendar-base.d.ts +0 -40
- package/components/calendar/common/calendar-base.js +0 -118
- package/components/calendar/common/calendar-base.js.map +0 -1
- package/components/calendar/common/calendar.model.d.ts +0 -128
- package/components/calendar/common/calendar.model.js +0 -246
- package/components/calendar/common/calendar.model.js.map +0 -1
- package/components/calendar/common/utils.d.ts +0 -12
- package/components/calendar/common/utils.js +0 -54
- package/components/calendar/common/utils.js.map +0 -1
- package/components/common/decorators/alternateName.d.ts +0 -7
- package/components/common/decorators/alternateName.js +0 -4
- package/components/common/decorators/alternateName.js.map +0 -1
- package/components/common/decorators/blazorSuppress.d.ts +0 -5
- package/components/common/decorators/blazorSuppress.js +0 -4
- package/components/common/decorators/blazorSuppress.js.map +0 -1
- package/components/common/decorators/blazorTwoWayBind.d.ts +0 -7
- package/components/common/decorators/blazorTwoWayBind.js +0 -4
- package/components/common/decorators/blazorTwoWayBind.js.map +0 -1
- package/components/common/mixins/sizable.d.ts +0 -13
- package/components/common/mixins/sizable.js +0 -27
- package/components/common/mixins/sizable.js.map +0 -1
- package/components/form/form.d.ts +0 -48
- package/components/form/form.js +0 -158
- package/components/form/form.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.base.css.js","sourceRoot":"","sources":["../../../../src/components/button-group/themes/group.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,quCAAquC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
1
|
+
{"version":3,"file":"group.base.css.js","sourceRoot":"","sources":["../../../../src/components/button-group/themes/group.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,quCAAquC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{max-width:100%}[part~=group]{display:grid;grid-auto-flow:row;grid-auto-columns:minmax(0, 1fr)}:host(:not([alignment=vertical])){--_negative-margin-horizontal: -0.0625rem}:host(:not([alignment=vertical])) [part~=group]{grid-auto-flow:column}:host([alignment=vertical]){--_negative-margin-vertical: -0.0625rem}:host([alignment=vertical]) [part~=group]{grid-auto-flow:row}`;\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { CalendarDay } from './model.js';
|
|
3
|
+
import type { DateRangeDescriptor, WeekDays } from './types.js';
|
|
4
|
+
export declare class IgcCalendarBaseComponent extends LitElement {
|
|
5
|
+
private _initialActiveDateSet;
|
|
6
|
+
protected get _hasValues(): boolean;
|
|
7
|
+
protected get _isSingle(): boolean;
|
|
8
|
+
protected get _isMultiple(): boolean;
|
|
9
|
+
protected get _isRange(): boolean;
|
|
10
|
+
protected _rangePreviewDate?: CalendarDay;
|
|
11
|
+
protected _firstDayOfWeek: number;
|
|
12
|
+
protected _activeDate: CalendarDay;
|
|
13
|
+
protected _value?: CalendarDay;
|
|
14
|
+
protected _values: CalendarDay[];
|
|
15
|
+
protected _specialDates: DateRangeDescriptor[];
|
|
16
|
+
protected _disabledDates: DateRangeDescriptor[];
|
|
17
|
+
get value(): Date | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The current value of the calendar.
|
|
20
|
+
* Used when selection is set to single
|
|
21
|
+
*
|
|
22
|
+
* @attr value
|
|
23
|
+
*/
|
|
24
|
+
set value(value: Date | undefined);
|
|
25
|
+
get values(): Date[];
|
|
26
|
+
/**
|
|
27
|
+
* The current values of the calendar.
|
|
28
|
+
* Used when selection is set to multiple of range.
|
|
29
|
+
*
|
|
30
|
+
* @attr values
|
|
31
|
+
*/
|
|
32
|
+
set values(values: Date[]);
|
|
33
|
+
get activeDate(): Date;
|
|
34
|
+
/** Get/Set the date which is shown in view and is highlighted. By default it is the current date. */
|
|
35
|
+
set activeDate(value: Date);
|
|
36
|
+
/**
|
|
37
|
+
* Sets the type of selection in the component.
|
|
38
|
+
* @attr selection
|
|
39
|
+
*/
|
|
40
|
+
selection: 'single' | 'multiple' | 'range';
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show the week numbers.
|
|
43
|
+
* @attr show-week-numbers
|
|
44
|
+
*/
|
|
45
|
+
showWeekNumbers: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Gets/Sets the first day of the week.
|
|
48
|
+
* @attr week-start
|
|
49
|
+
*/
|
|
50
|
+
weekStart: WeekDays;
|
|
51
|
+
/**
|
|
52
|
+
* Gets/Sets the locale used for formatting and displaying the dates in the component.
|
|
53
|
+
* @attr locale
|
|
54
|
+
*/
|
|
55
|
+
locale: string;
|
|
56
|
+
/** Gets/Sets the special dates for the component. */
|
|
57
|
+
set specialDates(value: DateRangeDescriptor[]);
|
|
58
|
+
get specialDates(): DateRangeDescriptor[] | undefined;
|
|
59
|
+
/** Gets/Sets the disabled dates for the component. */
|
|
60
|
+
set disabledDates(value: DateRangeDescriptor[]);
|
|
61
|
+
get disabledDates(): DateRangeDescriptor[] | undefined;
|
|
62
|
+
protected weekStartChanged(): void;
|
|
63
|
+
protected selectionChanged(): void;
|
|
64
|
+
protected firstUpdated(): void;
|
|
65
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement } from 'lit';
|
|
8
|
+
import { property, state } from 'lit/decorators.js';
|
|
9
|
+
import { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';
|
|
10
|
+
import { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';
|
|
11
|
+
import { watch } from '../common/decorators/watch.js';
|
|
12
|
+
import { dateFromISOString, datesFromISOStrings, getWeekDayNumber, } from './helpers.js';
|
|
13
|
+
import { CalendarDay } from './model.js';
|
|
14
|
+
let IgcCalendarBaseComponent = class IgcCalendarBaseComponent extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this._initialActiveDateSet = false;
|
|
18
|
+
this._firstDayOfWeek = 0;
|
|
19
|
+
this._activeDate = CalendarDay.today;
|
|
20
|
+
this._values = [];
|
|
21
|
+
this._specialDates = [];
|
|
22
|
+
this._disabledDates = [];
|
|
23
|
+
this.selection = 'single';
|
|
24
|
+
this.showWeekNumbers = false;
|
|
25
|
+
this.weekStart = 'sunday';
|
|
26
|
+
this.locale = 'en';
|
|
27
|
+
}
|
|
28
|
+
get _hasValues() {
|
|
29
|
+
return this._values.length > 0;
|
|
30
|
+
}
|
|
31
|
+
get _isSingle() {
|
|
32
|
+
return this.selection === 'single';
|
|
33
|
+
}
|
|
34
|
+
get _isMultiple() {
|
|
35
|
+
return this.selection === 'multiple';
|
|
36
|
+
}
|
|
37
|
+
get _isRange() {
|
|
38
|
+
return this.selection === 'range';
|
|
39
|
+
}
|
|
40
|
+
get value() {
|
|
41
|
+
return this._value ? this._value.native : undefined;
|
|
42
|
+
}
|
|
43
|
+
set value(value) {
|
|
44
|
+
this._value = value ? CalendarDay.from(value) : undefined;
|
|
45
|
+
}
|
|
46
|
+
get values() {
|
|
47
|
+
return this._values ? this._values.map((v) => v.native) : [];
|
|
48
|
+
}
|
|
49
|
+
set values(values) {
|
|
50
|
+
this._values = values ? values.map((v) => CalendarDay.from(v)) : [];
|
|
51
|
+
}
|
|
52
|
+
get activeDate() {
|
|
53
|
+
return this._activeDate.native;
|
|
54
|
+
}
|
|
55
|
+
set activeDate(value) {
|
|
56
|
+
this._initialActiveDateSet = true;
|
|
57
|
+
this._activeDate = value ? CalendarDay.from(value) : CalendarDay.today;
|
|
58
|
+
}
|
|
59
|
+
set specialDates(value) {
|
|
60
|
+
this._specialDates = value ?? [];
|
|
61
|
+
}
|
|
62
|
+
get specialDates() {
|
|
63
|
+
return this._specialDates.length ? this._specialDates : undefined;
|
|
64
|
+
}
|
|
65
|
+
set disabledDates(value) {
|
|
66
|
+
this._disabledDates = value ?? [];
|
|
67
|
+
}
|
|
68
|
+
get disabledDates() {
|
|
69
|
+
return this._disabledDates.length ? this._disabledDates : undefined;
|
|
70
|
+
}
|
|
71
|
+
weekStartChanged() {
|
|
72
|
+
this._firstDayOfWeek = getWeekDayNumber(this.weekStart);
|
|
73
|
+
}
|
|
74
|
+
selectionChanged() {
|
|
75
|
+
this._rangePreviewDate = undefined;
|
|
76
|
+
this._value = undefined;
|
|
77
|
+
this._values = [];
|
|
78
|
+
}
|
|
79
|
+
firstUpdated() {
|
|
80
|
+
if (this._initialActiveDateSet) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this._isSingle) {
|
|
84
|
+
this.activeDate = this.value ?? this.activeDate;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.activeDate = this.values[0] ?? this.activeDate;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
__decorate([
|
|
92
|
+
state()
|
|
93
|
+
], IgcCalendarBaseComponent.prototype, "_rangePreviewDate", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
state()
|
|
96
|
+
], IgcCalendarBaseComponent.prototype, "_firstDayOfWeek", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
state()
|
|
99
|
+
], IgcCalendarBaseComponent.prototype, "_activeDate", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
state()
|
|
102
|
+
], IgcCalendarBaseComponent.prototype, "_value", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
state()
|
|
105
|
+
], IgcCalendarBaseComponent.prototype, "_values", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
state()
|
|
108
|
+
], IgcCalendarBaseComponent.prototype, "_specialDates", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
state()
|
|
111
|
+
], IgcCalendarBaseComponent.prototype, "_disabledDates", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ converter: dateFromISOString })
|
|
114
|
+
], IgcCalendarBaseComponent.prototype, "value", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ converter: datesFromISOStrings })
|
|
117
|
+
], IgcCalendarBaseComponent.prototype, "values", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ attribute: 'active-date', converter: dateFromISOString })
|
|
120
|
+
], IgcCalendarBaseComponent.prototype, "activeDate", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
property()
|
|
123
|
+
], IgcCalendarBaseComponent.prototype, "selection", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })
|
|
126
|
+
], IgcCalendarBaseComponent.prototype, "showWeekNumbers", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ attribute: 'week-start' })
|
|
129
|
+
], IgcCalendarBaseComponent.prototype, "weekStart", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
property()
|
|
132
|
+
], IgcCalendarBaseComponent.prototype, "locale", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
property({ attribute: false })
|
|
135
|
+
], IgcCalendarBaseComponent.prototype, "specialDates", null);
|
|
136
|
+
__decorate([
|
|
137
|
+
property({ attribute: false })
|
|
138
|
+
], IgcCalendarBaseComponent.prototype, "disabledDates", null);
|
|
139
|
+
__decorate([
|
|
140
|
+
watch('weekStart')
|
|
141
|
+
], IgcCalendarBaseComponent.prototype, "weekStartChanged", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
watch('selection', { waitUntilFirstUpdate: true })
|
|
144
|
+
], IgcCalendarBaseComponent.prototype, "selectionChanged", null);
|
|
145
|
+
IgcCalendarBaseComponent = __decorate([
|
|
146
|
+
blazorIndirectRender,
|
|
147
|
+
blazorDeepImport
|
|
148
|
+
], IgcCalendarBaseComponent);
|
|
149
|
+
export { IgcCalendarBaseComponent };
|
|
150
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/components/calendar/base.ts"],"names":[],"mappings":"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","sourcesContent":["import { LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';\nimport { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';\nimport { watch } from '../common/decorators/watch.js';\nimport {\n dateFromISOString,\n datesFromISOStrings,\n getWeekDayNumber,\n} from './helpers.js';\nimport { CalendarDay } from './model.js';\nimport type { DateRangeDescriptor, WeekDays } from './types.js';\n\n@blazorIndirectRender\n@blazorDeepImport\nexport class IgcCalendarBaseComponent extends LitElement {\n private _initialActiveDateSet = false;\n\n protected get _hasValues() {\n return this._values.length > 0;\n }\n\n protected get _isSingle() {\n return this.selection === 'single';\n }\n\n protected get _isMultiple() {\n return this.selection === 'multiple';\n }\n\n protected get _isRange() {\n return this.selection === 'range';\n }\n\n @state()\n protected _rangePreviewDate?: CalendarDay;\n\n @state()\n protected _firstDayOfWeek = 0;\n\n @state()\n protected _activeDate = CalendarDay.today;\n\n @state()\n protected _value?: CalendarDay;\n\n @state()\n protected _values: CalendarDay[] = [];\n\n @state()\n protected _specialDates: DateRangeDescriptor[] = [];\n\n @state()\n protected _disabledDates: DateRangeDescriptor[] = [];\n\n public get value(): Date | undefined {\n return this._value ? this._value.native : undefined;\n }\n\n /* blazorSuppress */\n /**\n * The current value of the calendar.\n * Used when selection is set to single\n *\n * @attr value\n */\n @property({ converter: dateFromISOString })\n public set value(value) {\n this._value = value ? CalendarDay.from(value) : undefined;\n }\n\n public get values(): Date[] {\n return this._values ? this._values.map((v) => v.native) : [];\n }\n\n /* blazorSuppress */\n /**\n * The current values of the calendar.\n * Used when selection is set to multiple of range.\n *\n * @attr values\n */\n @property({ converter: datesFromISOStrings })\n public set values(values) {\n this._values = values ? values.map((v) => CalendarDay.from(v)) : [];\n }\n\n public get activeDate(): Date {\n return this._activeDate.native;\n }\n\n /* blazorSuppress */\n /** Get/Set the date which is shown in view and is highlighted. By default it is the current date. */\n @property({ attribute: 'active-date', converter: dateFromISOString })\n public set activeDate(value) {\n this._initialActiveDateSet = true;\n this._activeDate = value ? CalendarDay.from(value) : CalendarDay.today;\n }\n\n /**\n * Sets the type of selection in the component.\n * @attr selection\n */\n @property()\n public selection: 'single' | 'multiple' | 'range' = 'single';\n\n /**\n * Whether to show the week numbers.\n * @attr show-week-numbers\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /**\n * Gets/Sets the first day of the week.\n * @attr week-start\n */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n /**\n * Gets/Sets the locale used for formatting and displaying the dates in the component.\n * @attr locale\n */\n @property()\n public locale = 'en';\n\n /** Gets/Sets the special dates for the component. */\n @property({ attribute: false })\n public set specialDates(value: DateRangeDescriptor[]) {\n this._specialDates = value ?? [];\n }\n\n public get specialDates(): DateRangeDescriptor[] | undefined {\n return this._specialDates.length ? this._specialDates : undefined;\n }\n\n /** Gets/Sets the disabled dates for the component. */\n @property({ attribute: false })\n public set disabledDates(value: DateRangeDescriptor[]) {\n this._disabledDates = value ?? [];\n }\n\n public get disabledDates(): DateRangeDescriptor[] | undefined {\n return this._disabledDates.length ? this._disabledDates : undefined;\n }\n\n @watch('weekStart')\n protected weekStartChanged() {\n this._firstDayOfWeek = getWeekDayNumber(this.weekStart);\n }\n\n @watch('selection', { waitUntilFirstUpdate: true })\n protected selectionChanged() {\n this._rangePreviewDate = undefined;\n this._value = undefined;\n this._values = [];\n }\n\n protected override firstUpdated() {\n if (this._initialActiveDateSet) {\n return;\n }\n\n if (this._isSingle) {\n this.activeDate = this.value ?? this.activeDate;\n } else {\n this.activeDate = this.values[0] ?? this.activeDate;\n }\n }\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type IgcCalendarResourceStrings } from '../common/i18n/calendar.resources.js';
|
|
1
|
+
import { nothing } from 'lit';
|
|
3
2
|
import type { Constructor } from '../common/mixins/constructor.js';
|
|
4
|
-
import { IgcCalendarBaseComponent
|
|
3
|
+
import { IgcCalendarBaseComponent } from './base.js';
|
|
4
|
+
import { CalendarDay } from './model.js';
|
|
5
|
+
import type { IgcCalendarBaseEventMap } from './types.js';
|
|
5
6
|
export declare const focusActiveDate: unique symbol;
|
|
6
|
-
declare const IgcCalendarComponent_base: Constructor<import("../common/mixins/
|
|
7
|
+
declare const IgcCalendarComponent_base: Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcCalendarBaseEventMap>> & Constructor<IgcCalendarBaseComponent>;
|
|
7
8
|
/**
|
|
8
9
|
* Represents a calendar that lets users
|
|
9
10
|
* to select a date value in a variety of different ways.
|
|
@@ -15,83 +16,134 @@ declare const IgcCalendarComponent_base: Constructor<import("../common/mixins/si
|
|
|
15
16
|
*
|
|
16
17
|
* @fires igcChange - Emitted when calendar changes its value.
|
|
17
18
|
*
|
|
18
|
-
* @csspart
|
|
19
|
-
* @csspart
|
|
20
|
-
* @csspart
|
|
21
|
-
* @csspart
|
|
22
|
-
* @csspart
|
|
23
|
-
* @csspart
|
|
24
|
-
* @csspart
|
|
25
|
-
* @csspart
|
|
26
|
-
* @csspart
|
|
27
|
-
* @csspart
|
|
28
|
-
* @csspart
|
|
29
|
-
* @csspart
|
|
30
|
-
* @csspart
|
|
31
|
-
* @csspart
|
|
32
|
-
*
|
|
33
|
-
* @csspart
|
|
19
|
+
* @csspart header - The header element of the calendar.
|
|
20
|
+
* @csspart header-title - The header title element of the calendar.
|
|
21
|
+
* @csspart header-date - The header date element of the calendar.
|
|
22
|
+
* @csspart content - The content element which contains the views and navigation elements of the calendar.
|
|
23
|
+
* @csspart navigation - The navigation container element of the calendar.
|
|
24
|
+
* @csspart months-navigation - The months navigation button element of the calendar.
|
|
25
|
+
* @csspart years-navigation - The years navigation button element of the calendar.
|
|
26
|
+
* @csspart years-range - The years range element of the calendar.
|
|
27
|
+
* @csspart navigation-buttons - The navigation buttons container of the calendar.
|
|
28
|
+
* @csspart navigation-button - Previous/next navigation button of the calendar.
|
|
29
|
+
* @csspart days-view-container - The days view container element of the calendar.
|
|
30
|
+
* @csspart days-view - Days view element of the calendar.
|
|
31
|
+
* @csspart months-view - The months view element of the calendar.
|
|
32
|
+
* @csspart years-view - The years view element of the calendar.
|
|
33
|
+
* @csspart days-row - Days row element of the calendar.
|
|
34
|
+
* @csspart label - Week header label element of the calendar.
|
|
35
|
+
* @csspart week-number - Week number element of the calendar.
|
|
36
|
+
* @csspart week-number-inner - Week number inner element of the calendar.
|
|
37
|
+
* @csspart date - Date element of the calendar.
|
|
38
|
+
* @csspart date-inner - Date inner element of the calendar.
|
|
39
|
+
* @csspart first - The first selected date element of the calendar in range selection.
|
|
40
|
+
* @csspart last - The last selected date element of the calendar in range selection.
|
|
41
|
+
* @csspart inactive - Inactive date element of the calendar.
|
|
42
|
+
* @csspart hidden - Hidden date element of the calendar.
|
|
43
|
+
* @csspart weekend - Weekend date element of the calendar.
|
|
44
|
+
* @csspart range - Range selected element of the calendar.
|
|
45
|
+
* @csspart special - Special date element of the calendar.
|
|
46
|
+
* @csspart disabled - Disabled date element of the calendar.
|
|
47
|
+
* @csspart single - Single selected date element of the calendar.
|
|
48
|
+
* @csspart preview - Range selection preview date element of the calendar.
|
|
49
|
+
* @csspart month - Month element of the calendar.
|
|
50
|
+
* @csspart month-inner - Month inner element of the calendar.
|
|
51
|
+
* @csspart year - Year element of the calendar.
|
|
52
|
+
* @csspart year-inner - Year inner element of the calendar.
|
|
53
|
+
* @csspart selected - Indicates selected state. Applies to date, month and year elements of the calendar.
|
|
54
|
+
* @csspart current - Indicates current state. Applies to date, month and year elements of the calendar.
|
|
34
55
|
*/
|
|
35
56
|
export default class IgcCalendarComponent extends IgcCalendarComponent_base {
|
|
36
57
|
static readonly tagName = "igc-calendar";
|
|
37
58
|
static styles: import("lit").CSSResult;
|
|
38
59
|
static register(): void;
|
|
39
|
-
private
|
|
40
|
-
private
|
|
41
|
-
private
|
|
42
|
-
private
|
|
43
|
-
private
|
|
60
|
+
private get _isDayView();
|
|
61
|
+
private get _isMonthView();
|
|
62
|
+
private get _isYearView();
|
|
63
|
+
private get previousButtonLabel();
|
|
64
|
+
private get nextButtonLabel();
|
|
65
|
+
private contentRef;
|
|
44
66
|
private activeDaysViewIndex;
|
|
45
67
|
private daysViews;
|
|
46
68
|
private monthsView;
|
|
47
69
|
private yearsView;
|
|
48
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Whether to show the dates that do not belong to the current active month.
|
|
72
|
+
* @attr hide-outside-days
|
|
73
|
+
*/
|
|
49
74
|
hideOutsideDays: boolean;
|
|
50
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Whether to render the calendar header part.
|
|
77
|
+
* When the calendar selection is set to `multiple` the header is always hidden.
|
|
78
|
+
*
|
|
79
|
+
* @attr hide-header
|
|
80
|
+
*/
|
|
51
81
|
hideHeader: boolean;
|
|
52
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The orientation of the calendar header.
|
|
84
|
+
* @attr header-orientation
|
|
85
|
+
*/
|
|
53
86
|
headerOrientation: 'vertical' | 'horizontal';
|
|
54
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The orientation of the calendar months when more than one month
|
|
89
|
+
* is being shown.
|
|
90
|
+
* @attr orientation
|
|
91
|
+
*/
|
|
55
92
|
orientation: 'vertical' | 'horizontal';
|
|
56
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* The number of months displayed in the days view.
|
|
95
|
+
* @attr visible-months
|
|
96
|
+
*/
|
|
57
97
|
visibleMonths: number;
|
|
58
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* The current active view of the component.
|
|
100
|
+
* @attr active-view
|
|
101
|
+
*/
|
|
59
102
|
activeView: 'days' | 'months' | 'years';
|
|
60
103
|
/** The options used to format the months and the weekdays in the calendar views. */
|
|
61
104
|
formatOptions: Pick<Intl.DateTimeFormatOptions, 'month' | 'weekday'>;
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
private
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
private
|
|
70
|
-
private yearSelectLabel;
|
|
71
|
-
private handleKeyDown;
|
|
105
|
+
/**
|
|
106
|
+
* The resource strings for localization.
|
|
107
|
+
*/
|
|
108
|
+
resourceStrings: import("../common/i18n/calendar.resources.js").IgcCalendarResourceStrings;
|
|
109
|
+
private _intl;
|
|
110
|
+
protected localeChange(): void;
|
|
111
|
+
protected formatOptionsChange(): void;
|
|
112
|
+
/** @private @hidden @internal */
|
|
72
113
|
[focusActiveDate](): Promise<void>;
|
|
73
|
-
private
|
|
74
|
-
private
|
|
75
|
-
private
|
|
76
|
-
private
|
|
77
|
-
private
|
|
78
|
-
private
|
|
79
|
-
private
|
|
114
|
+
private updateViewIndex;
|
|
115
|
+
private getSubsequentActiveDate;
|
|
116
|
+
private handleArrowKey;
|
|
117
|
+
private onPageKeys;
|
|
118
|
+
private onShiftPageKeys;
|
|
119
|
+
private onHomeKey;
|
|
120
|
+
private onEndKey;
|
|
121
|
+
private isNotFromCalendarView;
|
|
122
|
+
constructor();
|
|
123
|
+
protected renderNavigationButtons(): import("lit-html").TemplateResult<1>;
|
|
124
|
+
protected renderMonthButtonNavigation(active: CalendarDay, viewIndex: number): import("lit-html").TemplateResult<1>;
|
|
125
|
+
protected renderYearButtonNavigation(active: CalendarDay, viewIndex: number): import("lit-html").TemplateResult<1>;
|
|
126
|
+
protected renderYearRangeNavigation(active: CalendarDay): import("lit-html").TemplateResult<1>;
|
|
127
|
+
protected renderNavigation(date?: CalendarDay, showButtons?: boolean, viewIndex?: number): import("lit-html").TemplateResult<1>;
|
|
128
|
+
protected renderHeader(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
129
|
+
protected renderHeaderDateSingle(): string | import("lit-html").TemplateResult<1>;
|
|
130
|
+
protected renderHeaderDateRange(): import("lit-html").TemplateResult<1>;
|
|
131
|
+
protected renderHeaderDate(): string | import("lit-html").TemplateResult<1>;
|
|
132
|
+
protected renderDaysView(): import("lit-html").TemplateResult<1>;
|
|
133
|
+
protected renderMonthView(): import("lit-html").TemplateResult<1>;
|
|
134
|
+
protected renderYearView(): import("lit-html").TemplateResult<1>;
|
|
135
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
136
|
+
protected changeMonth(event: CustomEvent<Date>): void;
|
|
137
|
+
protected changeYear(event: CustomEvent<Date>): void;
|
|
138
|
+
protected changeValue(event: CustomEvent<Date>): void;
|
|
139
|
+
protected activeDateChanged(event: CustomEvent<Date>): void;
|
|
140
|
+
protected rangePreviewDateChanged(event: CustomEvent<Date>): void;
|
|
141
|
+
private getActiveDates;
|
|
80
142
|
private activateDaysView;
|
|
81
|
-
private activeDateChanged;
|
|
82
|
-
private rangePreviewDateChange;
|
|
83
|
-
private nextMonth;
|
|
84
|
-
private previousMonth;
|
|
85
|
-
private nextYear;
|
|
86
|
-
private previousYear;
|
|
87
|
-
private nextYearsPage;
|
|
88
|
-
private previousYearsPage;
|
|
89
|
-
private navigateNext;
|
|
90
143
|
private navigatePrevious;
|
|
91
|
-
private
|
|
92
|
-
private
|
|
93
|
-
private
|
|
94
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
144
|
+
private navigateNext;
|
|
145
|
+
private switchToMonths;
|
|
146
|
+
private switchToYears;
|
|
95
147
|
}
|
|
96
148
|
declare global {
|
|
97
149
|
interface HTMLElementTagNameMap {
|