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
|
@@ -5,598 +5,499 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var IgcCalendarComponent_1;
|
|
8
|
-
import { html } from 'lit';
|
|
8
|
+
import { html, nothing } from 'lit';
|
|
9
9
|
import { property, query, queryAll, state } from 'lit/decorators.js';
|
|
10
|
+
import { choose } from 'lit/directives/choose.js';
|
|
11
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
10
12
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
|
-
import {
|
|
13
|
+
import { themes } from '../../theming/theming-decorator.js';
|
|
14
|
+
import { addKeybindings, arrowDown, arrowLeft, arrowRight, arrowUp, endKey, homeKey, pageDownKey, pageUpKey, shiftKey, } from '../common/controllers/key-bindings.js';
|
|
12
15
|
import { watch } from '../common/decorators/watch.js';
|
|
13
16
|
import { registerComponent } from '../common/definitions/register.js';
|
|
14
|
-
import { IgcCalendarResourceStringEN
|
|
17
|
+
import { IgcCalendarResourceStringEN } from '../common/i18n/calendar.resources.js';
|
|
18
|
+
import { createDateTimeFormatters } from '../common/localization/intl-formatters.js';
|
|
15
19
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
16
|
-
import {
|
|
17
|
-
import { partNameMap } from '../common/util.js';
|
|
20
|
+
import { clamp, findElementFromEventPath, first, formatString, last, partNameMap, } from '../common/util.js';
|
|
18
21
|
import IgcIconComponent from '../icon/icon.js';
|
|
19
|
-
import { IgcCalendarBaseComponent
|
|
20
|
-
import { TimeDeltaInterval, } from './common/calendar.model.js';
|
|
21
|
-
import { calculateYearsRangeStart, setDateSafe } from './common/utils.js';
|
|
22
|
+
import { IgcCalendarBaseComponent } from './base.js';
|
|
22
23
|
import IgcDaysViewComponent from './days-view/days-view.js';
|
|
24
|
+
import { MONTHS_PER_ROW, YEARS_PER_PAGE, YEARS_PER_ROW, areSameMonth, getYearRange, isDateInRanges, } from './helpers.js';
|
|
25
|
+
import { CalendarDay } from './model.js';
|
|
23
26
|
import IgcMonthsViewComponent from './months-view/months-view.js';
|
|
24
27
|
import { styles } from './themes/calendar.base.css.js';
|
|
25
28
|
import { all } from './themes/calendar.js';
|
|
26
29
|
import IgcYearsViewComponent from './years-view/years-view.js';
|
|
27
30
|
export const focusActiveDate = Symbol();
|
|
28
|
-
let IgcCalendarComponent = IgcCalendarComponent_1 = class IgcCalendarComponent extends
|
|
31
|
+
let IgcCalendarComponent = IgcCalendarComponent_1 = class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarBaseComponent) {
|
|
29
32
|
static register() {
|
|
30
33
|
registerComponent(IgcCalendarComponent_1, IgcIconComponent, IgcDaysViewComponent, IgcMonthsViewComponent, IgcYearsViewComponent);
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
this.
|
|
35
|
+
get _isDayView() {
|
|
36
|
+
return this.activeView === 'days';
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.activeDaysViewIndex = 0;
|
|
38
|
-
this.hideOutsideDays = false;
|
|
39
|
-
this.hideHeader = false;
|
|
40
|
-
this.headerOrientation = 'horizontal';
|
|
41
|
-
this.orientation = 'horizontal';
|
|
42
|
-
this.visibleMonths = 1;
|
|
43
|
-
this.activeView = 'days';
|
|
44
|
-
this.formatOptions = {
|
|
45
|
-
month: 'long',
|
|
46
|
-
weekday: 'narrow',
|
|
47
|
-
};
|
|
48
|
-
this.resourceStrings = IgcCalendarResourceStringEN;
|
|
49
|
-
this.handleKeyDown = (event) => {
|
|
50
|
-
const tagName = event.target.tagName.toLowerCase();
|
|
51
|
-
if (tagName !== 'igc-days-view' &&
|
|
52
|
-
tagName !== 'igc-months-view' &&
|
|
53
|
-
tagName !== 'igc-years-view') {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
switch (event.key) {
|
|
57
|
-
case 'PageDown':
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
if (event.shiftKey && this.activeView === 'days') {
|
|
60
|
-
this.nextYear();
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
this.navigateNext();
|
|
64
|
-
}
|
|
65
|
-
if (this.activeView === 'days') {
|
|
66
|
-
this[focusActiveDate]();
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
case 'PageUp':
|
|
70
|
-
event.preventDefault();
|
|
71
|
-
if (event.shiftKey && this.activeView === 'days') {
|
|
72
|
-
this.previousYear();
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
this.navigatePrevious();
|
|
76
|
-
}
|
|
77
|
-
if (this.activeView === 'days') {
|
|
78
|
-
this[focusActiveDate]();
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
case 'Home':
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
if (this.activeView === 'days') {
|
|
84
|
-
const firstDaysView = this.daysViews[0];
|
|
85
|
-
const activeDate = firstDaysView.activeDate;
|
|
86
|
-
const date = new Date(activeDate);
|
|
87
|
-
date.setDate(1);
|
|
88
|
-
this.activeDate = date;
|
|
89
|
-
this.activeDaysViewIndex = 0;
|
|
90
|
-
}
|
|
91
|
-
else if (this.activeView === 'months') {
|
|
92
|
-
const date = new Date(this.activeDate);
|
|
93
|
-
date.setMonth(0);
|
|
94
|
-
this.activeDate = date;
|
|
95
|
-
}
|
|
96
|
-
else if (this.activeView === 'years') {
|
|
97
|
-
const startYear = calculateYearsRangeStart(this.activeDate, this.yearPerPage);
|
|
98
|
-
const date = new Date(this.activeDate);
|
|
99
|
-
date.setDate(1);
|
|
100
|
-
date.setFullYear(startYear);
|
|
101
|
-
setDateSafe(date, this.activeDate.getDate());
|
|
102
|
-
this.activeDate = date;
|
|
103
|
-
}
|
|
104
|
-
this[focusActiveDate]();
|
|
105
|
-
break;
|
|
106
|
-
case 'End':
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
if (this.activeView === 'days') {
|
|
109
|
-
const index = this.daysViews.length - 1;
|
|
110
|
-
const lastDaysView = this.daysViews[index];
|
|
111
|
-
const activeDate = lastDaysView.activeDate;
|
|
112
|
-
const date = new Date(activeDate);
|
|
113
|
-
date.setDate(1);
|
|
114
|
-
date.setMonth(date.getMonth() + 1);
|
|
115
|
-
date.setDate(0);
|
|
116
|
-
this.activeDate = date;
|
|
117
|
-
this.activeDaysViewIndex = index;
|
|
118
|
-
}
|
|
119
|
-
else if (this.activeView === 'months') {
|
|
120
|
-
const date = new Date(this.activeDate);
|
|
121
|
-
date.setMonth(11);
|
|
122
|
-
this.activeDate = date;
|
|
123
|
-
}
|
|
124
|
-
else if (this.activeView === 'years') {
|
|
125
|
-
const startYear = calculateYearsRangeStart(this.activeDate, this.yearPerPage);
|
|
126
|
-
const date = new Date(this.activeDate);
|
|
127
|
-
date.setDate(1);
|
|
128
|
-
date.setFullYear(startYear + this.yearPerPage - 1);
|
|
129
|
-
setDateSafe(date, this.activeDate.getDate());
|
|
130
|
-
this.activeDate = date;
|
|
131
|
-
}
|
|
132
|
-
this[focusActiveDate]();
|
|
133
|
-
break;
|
|
134
|
-
case 'ArrowLeft':
|
|
135
|
-
event.preventDefault();
|
|
136
|
-
if (this.activeView === 'days') {
|
|
137
|
-
const date = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Day, -1);
|
|
138
|
-
if (this.visibleMonths > 1) {
|
|
139
|
-
const activeDayView = this.daysViews[this.activeDaysViewIndex];
|
|
140
|
-
const activeMonthDate = activeDayView.activeDate;
|
|
141
|
-
if (activeMonthDate.getMonth() !== date.getMonth()) {
|
|
142
|
-
this.activeDaysViewIndex =
|
|
143
|
-
this.activeDaysViewIndex > 0 ? this.activeDaysViewIndex - 1 : 0;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
this.activeDate = date;
|
|
147
|
-
}
|
|
148
|
-
else if (this.activeView === 'months') {
|
|
149
|
-
this.previousMonth();
|
|
150
|
-
}
|
|
151
|
-
else if (this.activeView === 'years') {
|
|
152
|
-
this.previousYear();
|
|
153
|
-
}
|
|
154
|
-
this[focusActiveDate]();
|
|
155
|
-
break;
|
|
156
|
-
case 'ArrowRight':
|
|
157
|
-
event.preventDefault();
|
|
158
|
-
if (this.activeView === 'days') {
|
|
159
|
-
const date = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Day, 1);
|
|
160
|
-
if (this.visibleMonths > 1) {
|
|
161
|
-
const activeDayView = this.daysViews[this.activeDaysViewIndex];
|
|
162
|
-
const activeMonthDate = activeDayView.activeDate;
|
|
163
|
-
if (activeMonthDate.getMonth() !== date.getMonth()) {
|
|
164
|
-
this.activeDaysViewIndex =
|
|
165
|
-
this.activeDaysViewIndex === this.visibleMonths - 1
|
|
166
|
-
? this.activeDaysViewIndex
|
|
167
|
-
: this.activeDaysViewIndex + 1;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
this.activeDate = date;
|
|
171
|
-
}
|
|
172
|
-
else if (this.activeView === 'months') {
|
|
173
|
-
this.nextMonth();
|
|
174
|
-
}
|
|
175
|
-
else if (this.activeView === 'years') {
|
|
176
|
-
this.nextYear();
|
|
177
|
-
}
|
|
178
|
-
this[focusActiveDate]();
|
|
179
|
-
break;
|
|
180
|
-
case 'ArrowUp':
|
|
181
|
-
event.preventDefault();
|
|
182
|
-
if (this.activeView === 'days') {
|
|
183
|
-
const date = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Week, -1);
|
|
184
|
-
if (this.visibleMonths > 1) {
|
|
185
|
-
const activeDayView = this.daysViews[this.activeDaysViewIndex];
|
|
186
|
-
const activeMonthDate = activeDayView.activeDate;
|
|
187
|
-
if (activeMonthDate.getMonth() !== date.getMonth()) {
|
|
188
|
-
this.activeDaysViewIndex =
|
|
189
|
-
this.activeDaysViewIndex > 0 ? this.activeDaysViewIndex - 1 : 0;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
this.activeDate = date;
|
|
193
|
-
}
|
|
194
|
-
else if (this.activeView === 'months') {
|
|
195
|
-
this.activeDate = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Month, -MONTHS_PER_ROW);
|
|
196
|
-
}
|
|
197
|
-
else if (this.activeView === 'years') {
|
|
198
|
-
this.activeDate = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Year, -YEARS_PER_ROW);
|
|
199
|
-
}
|
|
200
|
-
this[focusActiveDate]();
|
|
201
|
-
break;
|
|
202
|
-
case 'ArrowDown':
|
|
203
|
-
event.preventDefault();
|
|
204
|
-
if (this.activeView === 'days') {
|
|
205
|
-
const date = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Week, 1);
|
|
206
|
-
if (this.visibleMonths > 1) {
|
|
207
|
-
const activeDayView = this.daysViews[this.activeDaysViewIndex];
|
|
208
|
-
const activeMonthDate = activeDayView.activeDate;
|
|
209
|
-
if (activeMonthDate.getMonth() !== date.getMonth()) {
|
|
210
|
-
this.activeDaysViewIndex =
|
|
211
|
-
this.activeDaysViewIndex === this.visibleMonths - 1
|
|
212
|
-
? this.activeDaysViewIndex
|
|
213
|
-
: this.activeDaysViewIndex + 1;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
this.activeDate = date;
|
|
217
|
-
}
|
|
218
|
-
else if (this.activeView === 'months') {
|
|
219
|
-
this.activeDate = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Month, MONTHS_PER_ROW);
|
|
220
|
-
}
|
|
221
|
-
else if (this.activeView === 'years') {
|
|
222
|
-
this.activeDate = this.calendarModel.timedelta(this.activeDate, TimeDeltaInterval.Year, YEARS_PER_ROW);
|
|
223
|
-
}
|
|
224
|
-
this[focusActiveDate]();
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
this.initFormatters();
|
|
38
|
+
get _isMonthView() {
|
|
39
|
+
return this.activeView === 'months';
|
|
229
40
|
}
|
|
230
|
-
get
|
|
231
|
-
return this.
|
|
41
|
+
get _isYearView() {
|
|
42
|
+
return this.activeView === 'years';
|
|
232
43
|
}
|
|
233
44
|
get previousButtonLabel() {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
45
|
+
if (this._isDayView) {
|
|
46
|
+
return this.resourceStrings.previousMonth;
|
|
47
|
+
}
|
|
48
|
+
if (this._isMonthView) {
|
|
49
|
+
return this.resourceStrings.previousYear;
|
|
50
|
+
}
|
|
51
|
+
return formatString(this.resourceStrings.previousYears, YEARS_PER_PAGE);
|
|
241
52
|
}
|
|
242
53
|
get nextButtonLabel() {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
+
});
|
|
258
71
|
}
|
|
259
72
|
async [focusActiveDate]() {
|
|
260
73
|
await this.updateComplete;
|
|
261
|
-
if (this.
|
|
262
|
-
|
|
263
|
-
daysView.focusActiveDate();
|
|
74
|
+
if (this._isDayView) {
|
|
75
|
+
return this.daysViews.item(this.activeDaysViewIndex).focusActiveDate();
|
|
264
76
|
}
|
|
265
|
-
|
|
266
|
-
this.monthsView.focusActiveDate();
|
|
77
|
+
if (this._isMonthView) {
|
|
78
|
+
return this.monthsView.focusActiveDate();
|
|
267
79
|
}
|
|
268
|
-
|
|
269
|
-
this.yearsView.focusActiveDate();
|
|
80
|
+
if (this._isYearView) {
|
|
81
|
+
return this.yearsView.focusActiveDate();
|
|
270
82
|
}
|
|
271
83
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
month: 'short',
|
|
281
|
-
day: 'numeric',
|
|
282
|
-
});
|
|
84
|
+
updateViewIndex(date, delta) {
|
|
85
|
+
if (this.visibleMonths === 1)
|
|
86
|
+
return;
|
|
87
|
+
const index = this.activeDaysViewIndex;
|
|
88
|
+
const view = CalendarDay.from(this.daysViews.item(index).activeDate);
|
|
89
|
+
if (date.month !== view.month) {
|
|
90
|
+
this.activeDaysViewIndex = clamp(index + delta, 0, this.visibleMonths - 1);
|
|
91
|
+
}
|
|
283
92
|
}
|
|
284
|
-
|
|
285
|
-
|
|
93
|
+
getSubsequentActiveDate(start, delta) {
|
|
94
|
+
const disabled = this._disabledDates;
|
|
95
|
+
let beginning = start.clone();
|
|
96
|
+
while (isDateInRanges(beginning, disabled)) {
|
|
97
|
+
beginning = beginning.add('day', delta);
|
|
98
|
+
}
|
|
99
|
+
return beginning;
|
|
286
100
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.value = daysView.value;
|
|
293
|
-
newValue = this.value;
|
|
101
|
+
handleArrowKey(period, delta) {
|
|
102
|
+
if (this._isDayView) {
|
|
103
|
+
const date = this.getSubsequentActiveDate(this._activeDate.add(period, delta), delta);
|
|
104
|
+
this.updateViewIndex(date, delta);
|
|
105
|
+
this._activeDate = date;
|
|
294
106
|
}
|
|
295
107
|
else {
|
|
296
|
-
this.
|
|
297
|
-
|
|
108
|
+
const monthOrYear = this._isMonthView ? 'month' : 'year';
|
|
109
|
+
const monthOrYearDelta = (this._isMonthView ? MONTHS_PER_ROW : YEARS_PER_ROW) * delta;
|
|
110
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.add(monthOrYear, period === 'week' ? monthOrYearDelta : delta), delta);
|
|
298
111
|
}
|
|
299
|
-
this.emitEvent('igcChange', { detail: newValue });
|
|
300
|
-
}
|
|
301
|
-
changeMonth(event) {
|
|
302
|
-
event.stopPropagation();
|
|
303
|
-
this.activeDate = event.target.value;
|
|
304
|
-
this.activeView = 'days';
|
|
305
112
|
this[focusActiveDate]();
|
|
306
113
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
114
|
+
onPageKeys(delta) {
|
|
115
|
+
const unit = this._isDayView ? 'month' : 'year';
|
|
116
|
+
const increment = (this._isYearView ? YEARS_PER_PAGE : 1) * delta;
|
|
117
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.add(unit, increment), increment);
|
|
311
118
|
this[focusActiveDate]();
|
|
312
119
|
}
|
|
313
|
-
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
120
|
+
onShiftPageKeys(delta) {
|
|
121
|
+
if (this._isDayView) {
|
|
122
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.add('year', delta), delta);
|
|
123
|
+
this[focusActiveDate]();
|
|
124
|
+
}
|
|
318
125
|
}
|
|
319
|
-
|
|
320
|
-
if (this.
|
|
321
|
-
this.
|
|
126
|
+
onHomeKey() {
|
|
127
|
+
if (this._isDayView) {
|
|
128
|
+
const first = CalendarDay.from(this.daysViews.item(0).activeDate);
|
|
129
|
+
this._activeDate = this.getSubsequentActiveDate(first.set({ date: 1 }), 1);
|
|
130
|
+
this.activeDaysViewIndex = 0;
|
|
131
|
+
}
|
|
132
|
+
if (this._isMonthView) {
|
|
133
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({ month: 0 }), 1);
|
|
134
|
+
}
|
|
135
|
+
if (this._isYearView) {
|
|
136
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({
|
|
137
|
+
year: getYearRange(this._activeDate, YEARS_PER_PAGE).start,
|
|
138
|
+
}), 1);
|
|
322
139
|
}
|
|
323
|
-
this.activeView = 'years';
|
|
324
|
-
await this.updateComplete;
|
|
325
140
|
this[focusActiveDate]();
|
|
326
141
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const day = event.detail;
|
|
334
|
-
const daysViews = Array.from(this.daysViews);
|
|
335
|
-
this.activeDaysViewIndex = daysViews.indexOf(event.target);
|
|
336
|
-
this.activeDate = day.date;
|
|
337
|
-
if (!day.isCurrentMonth) {
|
|
338
|
-
this[focusActiveDate]();
|
|
142
|
+
onEndKey() {
|
|
143
|
+
if (this._isDayView) {
|
|
144
|
+
const index = this.daysViews.length - 1;
|
|
145
|
+
const last = CalendarDay.from(this.daysViews.item(index).activeDate);
|
|
146
|
+
this._activeDate = this.getSubsequentActiveDate(last.set({ month: last.month + 1, date: 0 }), -1);
|
|
147
|
+
this.activeDaysViewIndex = index;
|
|
339
148
|
}
|
|
149
|
+
if (this._isMonthView) {
|
|
150
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({ month: 11 }), -1);
|
|
151
|
+
}
|
|
152
|
+
if (this._isYearView) {
|
|
153
|
+
this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({
|
|
154
|
+
year: getYearRange(this._activeDate, YEARS_PER_PAGE).end,
|
|
155
|
+
}), -1);
|
|
156
|
+
}
|
|
157
|
+
this[focusActiveDate]();
|
|
340
158
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
nextMonth() {
|
|
345
|
-
this.activeDate = this.calendarModel.getNextMonth(this.activeDate);
|
|
346
|
-
}
|
|
347
|
-
previousMonth() {
|
|
348
|
-
this.activeDate = this.calendarModel.getPrevMonth(this.activeDate);
|
|
349
|
-
}
|
|
350
|
-
nextYear() {
|
|
351
|
-
this.activeDate = this.calendarModel.getNextYear(this.activeDate);
|
|
159
|
+
isNotFromCalendarView(_, event) {
|
|
160
|
+
return !findElementFromEventPath(`${IgcDaysViewComponent.tagName}, ${IgcMonthsViewComponent.tagName}, ${IgcYearsViewComponent.tagName}`, event);
|
|
352
161
|
}
|
|
353
|
-
|
|
354
|
-
|
|
162
|
+
constructor() {
|
|
163
|
+
super();
|
|
164
|
+
this.contentRef = createRef();
|
|
165
|
+
this.activeDaysViewIndex = 0;
|
|
166
|
+
this.hideOutsideDays = false;
|
|
167
|
+
this.hideHeader = false;
|
|
168
|
+
this.headerOrientation = 'horizontal';
|
|
169
|
+
this.orientation = 'horizontal';
|
|
170
|
+
this.visibleMonths = 1;
|
|
171
|
+
this.activeView = 'days';
|
|
172
|
+
this.formatOptions = { month: 'long', weekday: 'narrow' };
|
|
173
|
+
this.resourceStrings = IgcCalendarResourceStringEN;
|
|
174
|
+
this._intl = createDateTimeFormatters(this.locale, {
|
|
175
|
+
month: {
|
|
176
|
+
month: this.formatOptions.month,
|
|
177
|
+
},
|
|
178
|
+
monthLabel: { month: 'long' },
|
|
179
|
+
weekday: { weekday: 'short' },
|
|
180
|
+
monthDay: { month: 'short', day: 'numeric' },
|
|
181
|
+
yearLabel: { month: 'long', year: 'numeric' },
|
|
182
|
+
});
|
|
183
|
+
addKeybindings(this, {
|
|
184
|
+
skip: this.isNotFromCalendarView,
|
|
185
|
+
ref: this.contentRef,
|
|
186
|
+
bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },
|
|
187
|
+
})
|
|
188
|
+
.set(arrowLeft, this.handleArrowKey.bind(this, 'day', -1))
|
|
189
|
+
.set(arrowRight, this.handleArrowKey.bind(this, 'day', 1))
|
|
190
|
+
.set(arrowUp, this.handleArrowKey.bind(this, 'week', -1))
|
|
191
|
+
.set(arrowDown, this.handleArrowKey.bind(this, 'week', 1))
|
|
192
|
+
.set([shiftKey, pageUpKey], this.onShiftPageKeys.bind(this, -1))
|
|
193
|
+
.set([shiftKey, pageDownKey], this.onShiftPageKeys.bind(this, 1))
|
|
194
|
+
.set(pageUpKey, this.onPageKeys.bind(this, -1))
|
|
195
|
+
.set(pageDownKey, this.onPageKeys.bind(this, 1))
|
|
196
|
+
.set(homeKey, this.onHomeKey)
|
|
197
|
+
.set(endKey, this.onEndKey);
|
|
355
198
|
}
|
|
356
|
-
|
|
357
|
-
|
|
199
|
+
renderNavigationButtons() {
|
|
200
|
+
const parts = partNameMap({
|
|
201
|
+
'navigation-button': true,
|
|
202
|
+
vertical: this.orientation === 'vertical',
|
|
203
|
+
});
|
|
204
|
+
return html `
|
|
205
|
+
<div part="navigation-buttons">
|
|
206
|
+
<button
|
|
207
|
+
part=${parts}
|
|
208
|
+
aria-label=${this.previousButtonLabel}
|
|
209
|
+
@click=${this.navigatePrevious}
|
|
210
|
+
>
|
|
211
|
+
<igc-icon
|
|
212
|
+
aria-hidden="true"
|
|
213
|
+
name="arrow_prev"
|
|
214
|
+
collection="default"
|
|
215
|
+
></igc-icon>
|
|
216
|
+
</button>
|
|
217
|
+
|
|
218
|
+
<button
|
|
219
|
+
part=${parts}
|
|
220
|
+
aria-label=${this.nextButtonLabel}
|
|
221
|
+
@click=${this.navigateNext}
|
|
222
|
+
>
|
|
223
|
+
<igc-icon
|
|
224
|
+
aria-hidden="true"
|
|
225
|
+
name="arrow_next"
|
|
226
|
+
collection="default"
|
|
227
|
+
></igc-icon>
|
|
228
|
+
</button>
|
|
229
|
+
</div>
|
|
230
|
+
`;
|
|
358
231
|
}
|
|
359
|
-
|
|
360
|
-
|
|
232
|
+
renderMonthButtonNavigation(active, viewIndex) {
|
|
233
|
+
const labelFmt = this._intl.get('monthLabel').format;
|
|
234
|
+
const valueFmt = this._intl.get('month').format;
|
|
235
|
+
const ariaLabel = `${labelFmt(active.native)}, ${this.resourceStrings.selectMonth}`;
|
|
236
|
+
return html `
|
|
237
|
+
<button
|
|
238
|
+
part="months-navigation"
|
|
239
|
+
aria-label=${ariaLabel}
|
|
240
|
+
@click=${() => this.switchToMonths(viewIndex)}
|
|
241
|
+
>
|
|
242
|
+
${valueFmt(active.native)}
|
|
243
|
+
</button>
|
|
244
|
+
`;
|
|
361
245
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
246
|
+
renderYearButtonNavigation(active, viewIndex) {
|
|
247
|
+
const fmt = this._intl.get('yearLabel').format;
|
|
248
|
+
const ariaLabel = `${active.year}, ${this.resourceStrings.selectYear}`;
|
|
249
|
+
const ariaSkip = this._isDayView ? fmt(active.native) : active.year;
|
|
250
|
+
return html `
|
|
251
|
+
<span class="aria-off-screen" aria-live="polite">${ariaSkip}</span>
|
|
252
|
+
<button
|
|
253
|
+
part="years-navigation"
|
|
254
|
+
aria-label=${ariaLabel}
|
|
255
|
+
@click=${() => this.switchToYears(viewIndex)}
|
|
256
|
+
>
|
|
257
|
+
${active.year}
|
|
258
|
+
</button>
|
|
259
|
+
`;
|
|
372
260
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
this.previousYear();
|
|
379
|
-
}
|
|
380
|
-
else if (this.activeView === 'years') {
|
|
381
|
-
this.previousYearsPage();
|
|
382
|
-
}
|
|
261
|
+
renderYearRangeNavigation(active) {
|
|
262
|
+
const { start, end } = getYearRange(active, YEARS_PER_PAGE);
|
|
263
|
+
return html `
|
|
264
|
+
<span part="years-range" aria-live="polite"> ${start} - ${end} </span>
|
|
265
|
+
`;
|
|
383
266
|
}
|
|
384
|
-
renderNavigation(
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
?
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
>
|
|
401
|
-
${this.formattedMonth(activeDate)}
|
|
402
|
-
</button>`
|
|
403
|
-
: ''}
|
|
404
|
-
${this.activeView === 'days' || this.activeView === 'months'
|
|
405
|
-
? html `<span class="aria-off-screen" aria-live="polite">
|
|
406
|
-
${this.activeView === 'days'
|
|
407
|
-
? activeDate.toLocaleString(this.locale, {
|
|
408
|
-
month: 'long',
|
|
409
|
-
year: 'numeric',
|
|
410
|
-
})
|
|
411
|
-
: activeDate.getFullYear()}
|
|
412
|
-
</span>
|
|
413
|
-
<button
|
|
414
|
-
part="years-navigation"
|
|
415
|
-
aria-label=${this.yearSelectLabel(activeDate)}
|
|
416
|
-
@click=${() => this.switchToYears(daysViewIndex)}
|
|
417
|
-
>
|
|
418
|
-
${activeDate.getFullYear()}
|
|
419
|
-
</button>`
|
|
420
|
-
: ''}
|
|
421
|
-
${this.activeView === 'years'
|
|
422
|
-
? html `<span part="years-range" aria-live="polite"
|
|
423
|
-
>${`${startYear} - ${endYear}`}</span
|
|
424
|
-
>`
|
|
425
|
-
: ''}
|
|
267
|
+
renderNavigation(date, showButtons = true, viewIndex = 0) {
|
|
268
|
+
const activeDate = date ?? this._activeDate;
|
|
269
|
+
return html `
|
|
270
|
+
<div part="navigation">
|
|
271
|
+
<div part="picker-dates">
|
|
272
|
+
${this._isDayView
|
|
273
|
+
? this.renderMonthButtonNavigation(activeDate, viewIndex)
|
|
274
|
+
: nothing}
|
|
275
|
+
${this._isDayView || this._isMonthView
|
|
276
|
+
? this.renderYearButtonNavigation(activeDate, viewIndex)
|
|
277
|
+
: nothing}
|
|
278
|
+
${this._isYearView
|
|
279
|
+
? this.renderYearRangeNavigation(activeDate)
|
|
280
|
+
: nothing}
|
|
281
|
+
</div>
|
|
282
|
+
${showButtons ? this.renderNavigationButtons() : nothing}
|
|
426
283
|
</div>
|
|
427
|
-
|
|
428
|
-
? html `<div part="navigation-buttons">
|
|
429
|
-
<button
|
|
430
|
-
part=${partNameMap({
|
|
431
|
-
'navigation-button': true,
|
|
432
|
-
vertical: this.orientation === 'vertical',
|
|
433
|
-
})}
|
|
434
|
-
aria-label=${this.previousButtonLabel}
|
|
435
|
-
@click=${this.navigatePrevious}
|
|
436
|
-
>
|
|
437
|
-
<igc-icon
|
|
438
|
-
aria-hidden="true"
|
|
439
|
-
name=${prev_icon}
|
|
440
|
-
collection="internal"
|
|
441
|
-
></igc-icon>
|
|
442
|
-
</button>
|
|
443
|
-
<button
|
|
444
|
-
part=${partNameMap({
|
|
445
|
-
'navigation-button': true,
|
|
446
|
-
vertical: this.orientation === 'vertical',
|
|
447
|
-
})}
|
|
448
|
-
aria-label=${this.nextButtonLabel}
|
|
449
|
-
@click=${this.navigateNext}
|
|
450
|
-
>
|
|
451
|
-
<igc-icon
|
|
452
|
-
aria-hidden="true"
|
|
453
|
-
name=${next_icon}
|
|
454
|
-
collection="internal"
|
|
455
|
-
></igc-icon>
|
|
456
|
-
</button>
|
|
457
|
-
</div>`
|
|
458
|
-
: ''}
|
|
459
|
-
</div>`;
|
|
284
|
+
`;
|
|
460
285
|
}
|
|
461
286
|
renderHeader() {
|
|
462
|
-
if (this.hideHeader || this.
|
|
463
|
-
return
|
|
287
|
+
if (this.hideHeader || this._isMultiple) {
|
|
288
|
+
return nothing;
|
|
464
289
|
}
|
|
465
|
-
|
|
466
|
-
<h5 part="header-title">
|
|
467
|
-
<slot name="title"
|
|
468
|
-
>${this.selection === 'single'
|
|
290
|
+
const title = this._isSingle
|
|
469
291
|
? this.resourceStrings.selectDate
|
|
470
|
-
: this.resourceStrings.selectRange
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
292
|
+
: this.resourceStrings.selectRange;
|
|
293
|
+
return html `
|
|
294
|
+
<div part="header">
|
|
295
|
+
<h5 part="header-title">
|
|
296
|
+
<slot name="title">${title}</slot>
|
|
297
|
+
</h5>
|
|
298
|
+
<h2 part="header-date">${this.renderHeaderDate()}</h2>
|
|
299
|
+
</div>
|
|
300
|
+
`;
|
|
475
301
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
302
|
+
renderHeaderDateSingle() {
|
|
303
|
+
const date = this.value;
|
|
304
|
+
const weekDayFmt = this._intl.get('weekday').format;
|
|
305
|
+
const monthDayFmt = this._intl.get('monthDay').format;
|
|
306
|
+
const separator = this.headerOrientation === 'vertical' ? html `<br />` : ' ';
|
|
307
|
+
return date
|
|
308
|
+
? html `${weekDayFmt(date)},${separator}${monthDayFmt(date)}`
|
|
309
|
+
: this.resourceStrings.selectedDate;
|
|
310
|
+
}
|
|
311
|
+
renderHeaderDateRange() {
|
|
312
|
+
const values = this.values;
|
|
313
|
+
const fmt = this._intl.get('monthDay').format;
|
|
314
|
+
const { startDate, endDate } = this.resourceStrings;
|
|
315
|
+
const start = this._hasValues ? fmt(first(values)) : startDate;
|
|
316
|
+
const end = this._hasValues && values.length > 1 ? fmt(last(values)) : endDate;
|
|
317
|
+
return html `
|
|
318
|
+
<span>${start}</span>
|
|
492
319
|
<span> - </span>
|
|
493
|
-
<span
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
320
|
+
<span>${end}</span>
|
|
321
|
+
`;
|
|
322
|
+
}
|
|
323
|
+
renderHeaderDate() {
|
|
324
|
+
return this._isSingle
|
|
325
|
+
? this.renderHeaderDateSingle()
|
|
326
|
+
: this.renderHeaderDateRange();
|
|
327
|
+
}
|
|
328
|
+
renderDaysView() {
|
|
329
|
+
const activeDates = this.getActiveDates();
|
|
330
|
+
const horizontal = this.orientation === 'horizontal';
|
|
331
|
+
const length = activeDates.length - 1;
|
|
332
|
+
const format = this.formatOptions
|
|
333
|
+
.weekday;
|
|
334
|
+
return html `${activeDates.map((date, idx) => html `
|
|
335
|
+
<div part="days-view-container">
|
|
336
|
+
${this.renderNavigation(date, horizontal ? idx === length : idx === 0, idx)}
|
|
337
|
+
<igc-days-view
|
|
338
|
+
@igcChange=${this.changeValue}
|
|
339
|
+
@igcActiveDateChange=${this.activeDateChanged}
|
|
340
|
+
@igcRangePreviewDateChange=${this.rangePreviewDateChanged}
|
|
341
|
+
part="days-view"
|
|
342
|
+
exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, weekend, range, special, disabled, single, preview"
|
|
343
|
+
.active=${this.activeDaysViewIndex === idx}
|
|
344
|
+
.activeDate=${date.native}
|
|
345
|
+
.disabledDates=${this.disabledDates}
|
|
346
|
+
.hideLeadingDays=${this.hideOutsideDays || idx !== 0}
|
|
347
|
+
.hideTrailingDays=${this.hideOutsideDays || idx !== length}
|
|
348
|
+
.locale=${this.locale}
|
|
349
|
+
.rangePreviewDate=${this._rangePreviewDate?.native}
|
|
350
|
+
.resourceStrings=${this.resourceStrings}
|
|
351
|
+
.selection=${this.selection}
|
|
352
|
+
.showWeekNumbers=${this.showWeekNumbers}
|
|
353
|
+
.specialDates=${this._specialDates}
|
|
354
|
+
.value=${this.value}
|
|
355
|
+
.values=${this.values}
|
|
356
|
+
.weekDayFormat=${format}
|
|
357
|
+
.weekStart=${this.weekStart}
|
|
358
|
+
></igc-days-view>
|
|
359
|
+
</div>
|
|
360
|
+
`)}`;
|
|
361
|
+
}
|
|
362
|
+
renderMonthView() {
|
|
363
|
+
const format = this.formatOptions
|
|
364
|
+
.month;
|
|
365
|
+
return html `
|
|
366
|
+
${this.renderNavigation()}
|
|
367
|
+
<igc-months-view
|
|
368
|
+
part="months-view"
|
|
369
|
+
exportparts="month, selected, month-inner, current"
|
|
370
|
+
@igcChange=${this.changeMonth}
|
|
371
|
+
.value=${this.activeDate}
|
|
372
|
+
.locale=${this.locale}
|
|
373
|
+
.monthFormat=${format}
|
|
374
|
+
></igc-months-view>
|
|
375
|
+
`;
|
|
376
|
+
}
|
|
377
|
+
renderYearView() {
|
|
378
|
+
return html `
|
|
379
|
+
${this.renderNavigation()}
|
|
380
|
+
<igc-years-view
|
|
381
|
+
part="years-view"
|
|
382
|
+
exportparts="year, selected, year-inner, current"
|
|
383
|
+
@igcChange=${this.changeYear}
|
|
384
|
+
.value=${this.activeDate}
|
|
385
|
+
.yearsPerPage=${YEARS_PER_PAGE}
|
|
386
|
+
></igc-years-view>
|
|
387
|
+
`;
|
|
498
388
|
}
|
|
499
389
|
render() {
|
|
500
|
-
const
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
390
|
+
const direction = this._isDayView && this.orientation === 'horizontal';
|
|
391
|
+
const styles = {
|
|
392
|
+
display: 'flex',
|
|
393
|
+
flexGrow: 1,
|
|
394
|
+
flexDirection: direction ? 'row' : 'column',
|
|
395
|
+
};
|
|
505
396
|
return html `
|
|
506
397
|
${this.renderHeader()}
|
|
507
|
-
<div
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
? this.orientation === 'horizontal'
|
|
514
|
-
? 'row'
|
|
515
|
-
: 'column'
|
|
516
|
-
: 'column',
|
|
517
|
-
})}
|
|
518
|
-
@keydown=${this.handleKeyDown}
|
|
519
|
-
>
|
|
520
|
-
${this.activeView === 'days'
|
|
521
|
-
? activeDates.map((activeDate, i) => html `<div part="days-view-container">
|
|
522
|
-
${this.renderNavigation(activeDate, this.orientation === 'horizontal'
|
|
523
|
-
? i === activeDates.length - 1
|
|
524
|
-
: i === 0, i)}
|
|
525
|
-
<igc-days-view
|
|
526
|
-
part="days-view"
|
|
527
|
-
.active=${this.activeDaysViewIndex === i}
|
|
528
|
-
.activeDate=${activeDate}
|
|
529
|
-
.weekStart=${this.weekStart}
|
|
530
|
-
.weekDayFormat=${this.formatOptions.weekday}
|
|
531
|
-
.locale=${this.locale}
|
|
532
|
-
.selection=${this.selection}
|
|
533
|
-
.value=${this.value}
|
|
534
|
-
.values=${this.values}
|
|
535
|
-
.hideLeadingDays=${this.hideOutsideDays || i !== 0}
|
|
536
|
-
.hideTrailingDays=${this.hideOutsideDays ||
|
|
537
|
-
i !== activeDates.length - 1}
|
|
538
|
-
.showWeekNumbers=${this.showWeekNumbers}
|
|
539
|
-
.disabledDates=${this.disabledDates}
|
|
540
|
-
.specialDates=${this.specialDates}
|
|
541
|
-
.rangePreviewDate=${this.rangePreviewDate}
|
|
542
|
-
.resourceStrings=${this.resourceStrings}
|
|
543
|
-
exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, weekend, range, special, disabled, single, preview"
|
|
544
|
-
@igcChange=${this.changeValue}
|
|
545
|
-
@igcActiveDateChange=${this.activeDateChanged}
|
|
546
|
-
@igcRangePreviewDateChange=${this.rangePreviewDateChange}
|
|
547
|
-
></igc-days-view>
|
|
548
|
-
</div>`)
|
|
549
|
-
: ''}
|
|
550
|
-
${this.activeView === 'months'
|
|
551
|
-
? html ` ${this.renderNavigation()}
|
|
552
|
-
<igc-months-view
|
|
553
|
-
part="months-view"
|
|
554
|
-
.value=${this.activeDate}
|
|
555
|
-
.locale=${this.locale}
|
|
556
|
-
.monthFormat=${this.formatOptions.month}
|
|
557
|
-
exportparts="month, selected, month-inner, current"
|
|
558
|
-
@igcChange=${this.changeMonth}
|
|
559
|
-
></igc-months-view>`
|
|
560
|
-
: ''}
|
|
561
|
-
${this.activeView === 'years'
|
|
562
|
-
? html `${this.renderNavigation()}
|
|
563
|
-
<igc-years-view
|
|
564
|
-
part="years-view"
|
|
565
|
-
.value=${this.activeDate}
|
|
566
|
-
.yearsPerPage=${this.yearPerPage}
|
|
567
|
-
exportparts="year, selected, year-inner, current"
|
|
568
|
-
@igcChange=${this.changeYear}
|
|
569
|
-
></igc-years-view>`
|
|
570
|
-
: ''}
|
|
398
|
+
<div ${ref(this.contentRef)} part="content" style=${styleMap(styles)}>
|
|
399
|
+
${choose(this.activeView, [
|
|
400
|
+
['days', () => this.renderDaysView()],
|
|
401
|
+
['months', () => this.renderMonthView()],
|
|
402
|
+
['years', () => this.renderYearView()],
|
|
403
|
+
])}
|
|
571
404
|
</div>
|
|
572
405
|
`;
|
|
573
406
|
}
|
|
407
|
+
changeMonth(event) {
|
|
408
|
+
event.stopPropagation();
|
|
409
|
+
this.activeDate = event.detail;
|
|
410
|
+
this.activeView = 'days';
|
|
411
|
+
this[focusActiveDate]();
|
|
412
|
+
}
|
|
413
|
+
changeYear(event) {
|
|
414
|
+
event.stopPropagation();
|
|
415
|
+
this.activeDate = event.detail;
|
|
416
|
+
this.activeView = 'months';
|
|
417
|
+
this[focusActiveDate]();
|
|
418
|
+
}
|
|
419
|
+
changeValue(event) {
|
|
420
|
+
event.stopPropagation();
|
|
421
|
+
const view = event.target;
|
|
422
|
+
if (this._isSingle) {
|
|
423
|
+
this.value = view.value;
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
this.values = view.values;
|
|
427
|
+
}
|
|
428
|
+
this.emitEvent('igcChange', {
|
|
429
|
+
detail: this._isSingle ? this.value : this.values,
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
activeDateChanged(event) {
|
|
433
|
+
const view = event.target;
|
|
434
|
+
const views = Array.from(this.daysViews);
|
|
435
|
+
this.activeDaysViewIndex = views.indexOf(view);
|
|
436
|
+
this.activeDate = event.detail;
|
|
437
|
+
if (!areSameMonth(this.activeDate, view.activeDate)) {
|
|
438
|
+
this[focusActiveDate]();
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
rangePreviewDateChanged(event) {
|
|
442
|
+
this._rangePreviewDate = event.detail
|
|
443
|
+
? CalendarDay.from(event.detail)
|
|
444
|
+
: undefined;
|
|
445
|
+
}
|
|
446
|
+
getActiveDates() {
|
|
447
|
+
const current = this.activeDaysViewIndex;
|
|
448
|
+
const length = Math.max(this.visibleMonths, 1);
|
|
449
|
+
return Array.from({ length }, (_, i) => this._activeDate.add('month', i - current));
|
|
450
|
+
}
|
|
451
|
+
activateDaysView(index) {
|
|
452
|
+
const view = this.daysViews.item(index);
|
|
453
|
+
this.activeDate = view.activeDate;
|
|
454
|
+
this.activeDaysViewIndex = index;
|
|
455
|
+
}
|
|
456
|
+
navigatePrevious() {
|
|
457
|
+
const unit = this._isDayView ? 'month' : 'year';
|
|
458
|
+
const delta = this._isYearView ? YEARS_PER_PAGE : 1;
|
|
459
|
+
this._activeDate = this._activeDate.add(unit, -delta);
|
|
460
|
+
}
|
|
461
|
+
navigateNext() {
|
|
462
|
+
const unit = this._isDayView ? 'month' : 'year';
|
|
463
|
+
const delta = this._isYearView ? YEARS_PER_PAGE : 1;
|
|
464
|
+
this._activeDate = this._activeDate.add(unit, delta);
|
|
465
|
+
}
|
|
466
|
+
switchToMonths(viewIndex) {
|
|
467
|
+
this.activateDaysView(viewIndex);
|
|
468
|
+
this.activeView = 'months';
|
|
469
|
+
this[focusActiveDate]();
|
|
470
|
+
}
|
|
471
|
+
switchToYears(viewIndex) {
|
|
472
|
+
if (this._isDayView) {
|
|
473
|
+
this.activateDaysView(viewIndex);
|
|
474
|
+
}
|
|
475
|
+
this.activeView = 'years';
|
|
476
|
+
this[focusActiveDate]();
|
|
477
|
+
}
|
|
574
478
|
};
|
|
575
479
|
IgcCalendarComponent.tagName = 'igc-calendar';
|
|
576
480
|
IgcCalendarComponent.styles = styles;
|
|
577
|
-
__decorate([
|
|
578
|
-
state()
|
|
579
|
-
], IgcCalendarComponent.prototype, "rangePreviewDate", void 0);
|
|
580
481
|
__decorate([
|
|
581
482
|
state()
|
|
582
483
|
], IgcCalendarComponent.prototype, "activeDaysViewIndex", void 0);
|
|
583
484
|
__decorate([
|
|
584
|
-
queryAll(
|
|
485
|
+
queryAll(IgcDaysViewComponent.tagName)
|
|
585
486
|
], IgcCalendarComponent.prototype, "daysViews", void 0);
|
|
586
487
|
__decorate([
|
|
587
|
-
query(
|
|
488
|
+
query(IgcMonthsViewComponent.tagName)
|
|
588
489
|
], IgcCalendarComponent.prototype, "monthsView", void 0);
|
|
589
490
|
__decorate([
|
|
590
|
-
query(
|
|
491
|
+
query(IgcYearsViewComponent.tagName)
|
|
591
492
|
], IgcCalendarComponent.prototype, "yearsView", void 0);
|
|
592
493
|
__decorate([
|
|
593
|
-
property({ type: Boolean, attribute: 'hide-outside-days' })
|
|
494
|
+
property({ type: Boolean, attribute: 'hide-outside-days', reflect: true })
|
|
594
495
|
], IgcCalendarComponent.prototype, "hideOutsideDays", void 0);
|
|
595
496
|
__decorate([
|
|
596
|
-
property({ type: Boolean, attribute: 'hide-header' })
|
|
497
|
+
property({ type: Boolean, attribute: 'hide-header', reflect: true })
|
|
597
498
|
], IgcCalendarComponent.prototype, "hideHeader", void 0);
|
|
598
499
|
__decorate([
|
|
599
|
-
property({ attribute: 'header-orientation'
|
|
500
|
+
property({ reflect: true, attribute: 'header-orientation' })
|
|
600
501
|
], IgcCalendarComponent.prototype, "headerOrientation", void 0);
|
|
601
502
|
__decorate([
|
|
602
503
|
property()
|
|
@@ -614,9 +515,11 @@ __decorate([
|
|
|
614
515
|
property({ attribute: false })
|
|
615
516
|
], IgcCalendarComponent.prototype, "resourceStrings", void 0);
|
|
616
517
|
__decorate([
|
|
617
|
-
watch('formatOptions'),
|
|
618
518
|
watch('locale')
|
|
619
|
-
], IgcCalendarComponent.prototype, "
|
|
519
|
+
], IgcCalendarComponent.prototype, "localeChange", null);
|
|
520
|
+
__decorate([
|
|
521
|
+
watch('formatOptions')
|
|
522
|
+
], IgcCalendarComponent.prototype, "formatOptionsChange", null);
|
|
620
523
|
IgcCalendarComponent = IgcCalendarComponent_1 = __decorate([
|
|
621
524
|
themes(all)
|
|
622
525
|
], IgcCalendarComponent);
|