@melodicdev/components 3.1.0 → 4.0.1
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/assets/melodic-components.js +8081 -5910
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.js +9250 -7326
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.js +83 -78
- package/lib/components/data-display/activity-feed/activity-feed.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed.styles.js +10 -5
- package/lib/components/data-display/avatar/avatar.styles.d.ts.map +1 -1
- package/lib/components/data-display/avatar/avatar.styles.js +23 -18
- package/lib/components/data-display/badge/badge.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge/badge.styles.js +54 -48
- package/lib/components/data-display/badge-group/badge-group.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge-group/badge-group.styles.js +34 -29
- package/lib/components/data-display/calendar-view/calendar-view-month.template.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view-month.template.js +17 -0
- package/lib/components/data-display/calendar-view/calendar-view.component.d.ts +23 -3
- package/lib/components/data-display/calendar-view/calendar-view.component.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.component.js +76 -21
- package/lib/components/data-display/calendar-view/calendar-view.styles.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.styles.js +160 -155
- package/lib/components/data-display/calendar-view/calendar-view.utils.d.ts +9 -0
- package/lib/components/data-display/calendar-view/calendar-view.utils.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.utils.js +68 -19
- package/lib/components/data-display/data-grid/data-grid.component.d.ts +24 -0
- package/lib/components/data-display/data-grid/data-grid.component.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.component.js +104 -31
- package/lib/components/data-display/data-grid/data-grid.styles.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.styles.js +122 -117
- package/lib/components/data-display/data-grid/data-grid.template.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.template.js +3 -0
- package/lib/components/data-display/list/list-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list-item.styles.js +39 -34
- package/lib/components/data-display/list/list.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list.styles.js +10 -5
- package/lib/components/data-display/profile-card/profile-card.styles.d.ts.map +1 -1
- package/lib/components/data-display/profile-card/profile-card.styles.js +71 -66
- package/lib/components/data-display/stat-card/stat-card.styles.d.ts.map +1 -1
- package/lib/components/data-display/stat-card/stat-card.styles.js +67 -63
- package/lib/components/data-display/table/table.component.d.ts +7 -0
- package/lib/components/data-display/table/table.component.d.ts.map +1 -1
- package/lib/components/data-display/table/table.component.js +20 -5
- package/lib/components/data-display/table/table.styles.d.ts.map +1 -1
- package/lib/components/data-display/table/table.styles.js +94 -89
- package/lib/components/data-display/table/table.template.d.ts.map +1 -1
- package/lib/components/data-display/table/table.template.js +3 -0
- package/lib/components/data-display/table-core/index.d.ts +1 -0
- package/lib/components/data-display/table-core/index.d.ts.map +1 -1
- package/lib/components/data-display/table-core/index.js +1 -0
- package/lib/components/data-display/table-core/memo.d.ts +10 -0
- package/lib/components/data-display/table-core/memo.d.ts.map +1 -0
- package/lib/components/data-display/table-core/memo.js +20 -0
- package/lib/components/data-display/tag/tag.styles.d.ts.map +1 -1
- package/lib/components/data-display/tag/tag.styles.js +67 -62
- package/lib/components/feedback/alert/alert.styles.d.ts.map +1 -1
- package/lib/components/feedback/alert/alert.styles.js +83 -56
- package/lib/components/feedback/progress/progress.styles.d.ts.map +1 -1
- package/lib/components/feedback/progress/progress.styles.js +110 -101
- package/lib/components/feedback/spinner/spinner.styles.d.ts.map +1 -1
- package/lib/components/feedback/spinner/spinner.styles.js +20 -24
- package/lib/components/feedback/toast/toast-container.template.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast-container.template.js +4 -0
- package/lib/components/feedback/toast/toast.component.d.ts +3 -2
- package/lib/components/feedback/toast/toast.component.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.component.js +10 -0
- package/lib/components/feedback/toast/toast.service.d.ts +26 -6
- package/lib/components/feedback/toast/toast.service.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.service.js +53 -18
- package/lib/components/feedback/toast/toast.styles.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.styles.js +74 -69
- package/lib/components/feedback/toast/toast.template.js +1 -1
- package/lib/components/forms/autocomplete/autocomplete.component.d.ts +7 -0
- package/lib/components/forms/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.component.js +39 -0
- package/lib/components/forms/autocomplete/autocomplete.styles.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.styles.js +169 -164
- package/lib/components/forms/autocomplete/autocomplete.template.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.template.js +5 -1
- package/lib/components/forms/button/button.styles.d.ts.map +1 -1
- package/lib/components/forms/button/button.styles.js +62 -57
- package/lib/components/forms/button-group/button-group.component.d.ts +3 -2
- package/lib/components/forms/button-group/button-group.component.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.component.js +11 -1
- package/lib/components/forms/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.styles.js +23 -18
- package/lib/components/forms/checkbox/checkbox.component.d.ts +4 -0
- package/lib/components/forms/checkbox/checkbox.component.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.component.js +5 -1
- package/lib/components/forms/checkbox/checkbox.styles.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.styles.js +83 -78
- package/lib/components/forms/checkbox/checkbox.template.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.template.js +2 -0
- package/lib/components/forms/date-picker/calendar.component.d.ts +21 -0
- package/lib/components/forms/date-picker/calendar.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.component.js +69 -2
- package/lib/components/forms/date-picker/calendar.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.styles.js +152 -147
- package/lib/components/forms/date-picker/calendar.template.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.template.js +6 -3
- package/lib/components/forms/date-picker/date-picker.component.d.ts +6 -0
- package/lib/components/forms/date-picker/date-picker.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.component.js +41 -12
- package/lib/components/forms/date-picker/date-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.styles.js +97 -91
- package/lib/components/forms/date-time-picker/date-time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-time-picker/date-time-picker.styles.js +87 -82
- package/lib/components/forms/file-upload/file-upload.component.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.component.js +15 -5
- package/lib/components/forms/file-upload/file-upload.styles.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.styles.js +97 -92
- package/lib/components/forms/form-field/form-field.component.d.ts +8 -0
- package/lib/components/forms/form-field/form-field.component.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.component.js +41 -6
- package/lib/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.styles.js +77 -72
- package/lib/components/forms/form-field/form-field.template.js +1 -1
- package/lib/components/forms/input/input.component.d.ts +26 -3
- package/lib/components/forms/input/input.component.d.ts.map +1 -1
- package/lib/components/forms/input/input.component.js +46 -6
- package/lib/components/forms/input/input.styles.d.ts.map +1 -1
- package/lib/components/forms/input/input.styles.js +86 -81
- package/lib/components/forms/input/input.template.d.ts.map +1 -1
- package/lib/components/forms/input/input.template.js +9 -0
- package/lib/components/forms/radio/radio.styles.d.ts.map +1 -1
- package/lib/components/forms/radio/radio.styles.js +78 -73
- package/lib/components/forms/radio-card-group/radio-card-group.component.d.ts +6 -0
- package/lib/components/forms/radio-card-group/radio-card-group.component.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card-group.component.js +34 -0
- package/lib/components/forms/radio-card-group/radio-card-group.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card-group.styles.js +39 -34
- package/lib/components/forms/radio-card-group/radio-card.component.d.ts +6 -0
- package/lib/components/forms/radio-card-group/radio-card.component.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card.component.js +7 -1
- package/lib/components/forms/radio-card-group/radio-card.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card.styles.js +113 -108
- package/lib/components/forms/radio-card-group/radio-card.template.js +1 -1
- package/lib/components/forms/select/select.component.d.ts.map +1 -1
- package/lib/components/forms/select/select.component.js +13 -1
- package/lib/components/forms/select/select.styles.d.ts.map +1 -1
- package/lib/components/forms/select/select.styles.js +158 -153
- package/lib/components/forms/select/select.template.d.ts.map +1 -1
- package/lib/components/forms/select/select.template.js +5 -1
- package/lib/components/forms/slider/slider.styles.d.ts.map +1 -1
- package/lib/components/forms/slider/slider.styles.js +82 -77
- package/lib/components/forms/textarea/textarea.component.d.ts +10 -3
- package/lib/components/forms/textarea/textarea.component.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.component.js +10 -5
- package/lib/components/forms/textarea/textarea.styles.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.styles.js +84 -79
- package/lib/components/forms/textarea/textarea.template.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.template.js +2 -0
- package/lib/components/forms/time-picker/time-picker.component.d.ts +16 -0
- package/lib/components/forms/time-picker/time-picker.component.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.component.js +43 -3
- package/lib/components/forms/time-picker/time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.styles.js +197 -191
- package/lib/components/forms/toggle/toggle.styles.d.ts.map +1 -1
- package/lib/components/forms/toggle/toggle.styles.js +84 -79
- package/lib/components/foundation/card/card.styles.d.ts.map +1 -1
- package/lib/components/foundation/card/card.styles.js +51 -46
- package/lib/components/foundation/container/container.component.js +5 -5
- package/lib/components/foundation/container/container.styles.d.ts.map +1 -1
- package/lib/components/foundation/container/container.styles.js +15 -0
- package/lib/components/foundation/divider/divider.styles.d.ts.map +1 -1
- package/lib/components/foundation/divider/divider.styles.js +29 -24
- package/lib/components/foundation/stack/stack.component.d.ts +6 -0
- package/lib/components/foundation/stack/stack.component.d.ts.map +1 -1
- package/lib/components/foundation/stack/stack.component.js +11 -5
- package/lib/components/foundation/stack/stack.styles.d.ts.map +1 -1
- package/lib/components/foundation/stack/stack.styles.js +20 -0
- package/lib/components/general/icon/icon.styles.d.ts.map +1 -1
- package/lib/components/general/icon/icon.styles.js +12 -8
- package/lib/components/general/icon/icon.template.d.ts.map +1 -1
- package/lib/components/general/icon/icon.template.js +7 -1
- package/lib/components/navigation/breadcrumb/breadcrumb-item.template.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb-item.template.js +2 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.js +9 -4
- package/lib/components/navigation/functions/match-by-route.function.d.ts +16 -0
- package/lib/components/navigation/functions/match-by-route.function.d.ts.map +1 -0
- package/lib/components/navigation/functions/match-by-route.function.js +34 -0
- package/lib/components/navigation/functions/route-link.function.d.ts +20 -0
- package/lib/components/navigation/functions/route-link.function.d.ts.map +1 -0
- package/lib/components/navigation/functions/route-link.function.js +34 -0
- package/lib/components/navigation/pagination/pagination.component.d.ts +8 -0
- package/lib/components/navigation/pagination/pagination.component.d.ts.map +1 -1
- package/lib/components/navigation/pagination/pagination.component.js +12 -2
- package/lib/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/lib/components/navigation/pagination/pagination.styles.js +77 -62
- package/lib/components/navigation/pagination/pagination.template.js +2 -2
- package/lib/components/navigation/sidebar/sidebar-group.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-group.styles.js +23 -18
- package/lib/components/navigation/sidebar/sidebar-item.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.styles.js +104 -99
- package/lib/components/navigation/sidebar/sidebar-item.template.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.template.js +5 -1
- package/lib/components/navigation/sidebar/sidebar.component.d.ts +12 -6
- package/lib/components/navigation/sidebar/sidebar.component.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.component.js +20 -12
- package/lib/components/navigation/sidebar/sidebar.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.styles.js +179 -174
- package/lib/components/navigation/sidebar/sidebar.template.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.template.js +5 -1
- package/lib/components/navigation/steps/step.component.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.component.js +19 -1
- package/lib/components/navigation/steps/step.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.styles.js +154 -149
- package/lib/components/navigation/steps/step.template.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.template.js +6 -0
- package/lib/components/navigation/steps/steps.component.d.ts +10 -0
- package/lib/components/navigation/steps/steps.component.d.ts.map +1 -1
- package/lib/components/navigation/steps/steps.component.js +42 -9
- package/lib/components/navigation/steps/steps.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/steps.styles.js +174 -169
- package/lib/components/navigation/steps/steps.template.js +9 -0
- package/lib/components/navigation/tabs/tab-panel.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab-panel.styles.js +12 -2
- package/lib/components/navigation/tabs/tab.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab.styles.js +41 -36
- package/lib/components/navigation/tabs/tabs.component.d.ts +10 -0
- package/lib/components/navigation/tabs/tabs.component.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.component.js +36 -7
- package/lib/components/navigation/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.styles.js +131 -126
- package/lib/components/overlays/dialog/dialog-ref.class.d.ts +19 -9
- package/lib/components/overlays/dialog/dialog-ref.class.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog-ref.class.js +37 -5
- package/lib/components/overlays/dialog/dialog.styles.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.styles.js +78 -73
- package/lib/components/overlays/drawer/drawer.styles.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.styles.js +82 -77
- package/lib/components/overlays/dropdown/dropdown-item.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown-item.styles.js +48 -43
- package/lib/components/overlays/dropdown/dropdown.component.d.ts +7 -0
- package/lib/components/overlays/dropdown/dropdown.component.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown.component.js +26 -11
- package/lib/components/overlays/dropdown/dropdown.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown.styles.js +35 -30
- package/lib/components/overlays/popover/popover.component.d.ts +8 -0
- package/lib/components/overlays/popover/popover.component.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.component.js +17 -0
- package/lib/components/overlays/popover/popover.styles.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.styles.js +36 -31
- package/lib/components/overlays/tooltip/tooltip.component.d.ts +6 -5
- package/lib/components/overlays/tooltip/tooltip.component.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.component.js +14 -10
- package/lib/components/overlays/tooltip/tooltip.styles.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.styles.js +34 -28
- package/lib/components/pages/auth/auth-layout.styles.d.ts +1 -1
- package/lib/components/pages/auth/auth-layout.styles.d.ts.map +1 -1
- package/lib/components/pages/auth/auth-layout.styles.js +86 -81
- package/lib/components/pages/dashboard/dashboard-page.styles.d.ts.map +1 -1
- package/lib/components/pages/dashboard/dashboard-page.styles.js +39 -34
- package/lib/components/sections/app-shell/app-shell.component.d.ts +13 -0
- package/lib/components/sections/app-shell/app-shell.component.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.component.js +45 -1
- package/lib/components/sections/app-shell/app-shell.styles.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.styles.js +74 -53
- package/lib/components/sections/app-shell/app-shell.template.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.template.js +5 -0
- package/lib/components/sections/hero/hero-section.styles.js +97 -97
- package/lib/components/sections/page-header/page-header.styles.d.ts.map +1 -1
- package/lib/components/sections/page-header/page-header.styles.js +69 -64
- package/lib/components/sections/page-section/page-section.styles.d.ts.map +1 -1
- package/lib/components/sections/page-section/page-section.styles.js +56 -51
- package/lib/components/sections/page-section/page-section.template.d.ts.map +1 -1
- package/lib/components/sections/page-section/page-section.template.js +6 -1
- package/lib/directives/tooltip.directive.d.ts.map +1 -1
- package/lib/directives/tooltip.directive.js +39 -6
- package/lib/theme/functions/apply-theme.function.d.ts +4 -1
- package/lib/theme/functions/apply-theme.function.d.ts.map +1 -1
- package/lib/theme/functions/apply-theme.function.js +20 -4
- package/lib/theme/functions/create-theme.function.js +0 -1
- package/lib/utils/accessibility/cross-root-aria.d.ts +40 -0
- package/lib/utils/accessibility/cross-root-aria.d.ts.map +1 -0
- package/lib/utils/accessibility/cross-root-aria.js +97 -0
- package/lib/utils/accessibility/index.d.ts +1 -0
- package/lib/utils/accessibility/index.d.ts.map +1 -1
- package/lib/utils/accessibility/index.js +1 -0
- package/lib/utils/directives/index.d.ts +1 -0
- package/lib/utils/directives/index.d.ts.map +1 -1
- package/lib/utils/directives/index.js +1 -0
- package/lib/utils/directives/watch-light-slots.d.ts +20 -0
- package/lib/utils/directives/watch-light-slots.d.ts.map +1 -0
- package/lib/utils/directives/watch-light-slots.js +36 -0
- package/package.json +2 -2
|
@@ -20,6 +20,13 @@ export declare class CalendarViewComponent implements IElementRef, OnCreate, OnD
|
|
|
20
20
|
view: CalendarViewMode;
|
|
21
21
|
/** Navigated date (ISO date string) */
|
|
22
22
|
date: string;
|
|
23
|
+
/**
|
|
24
|
+
* BCP 47 locale for month and weekday names. Defaults to the document's
|
|
25
|
+
* `lang` (then the browser's) — these used to be hardcoded English arrays,
|
|
26
|
+
* so the calendar showed "January" and "Mon" on every page regardless of
|
|
27
|
+
* language.
|
|
28
|
+
*/
|
|
29
|
+
locale: string;
|
|
23
30
|
/** Day the week starts on (0=Sunday, 1=Monday) */
|
|
24
31
|
weekStartsOn: number;
|
|
25
32
|
/** Maximum visible events per day cell in month view */
|
|
@@ -42,9 +49,15 @@ export declare class CalendarViewComponent implements IElementRef, OnCreate, OnD
|
|
|
42
49
|
get hasHeaderLeftSlot(): boolean;
|
|
43
50
|
/** Check if header-actions slot has consumer content */
|
|
44
51
|
get hasHeaderActionsSlot(): boolean;
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Mini calendar state for the day-view sidebar.
|
|
54
|
+
*
|
|
55
|
+
* Public (not `_`-prefixed) on purpose: `_` fields are excluded from
|
|
56
|
+
* reactivity, so the previous/next buttons changed the month and nothing
|
|
57
|
+
* re-rendered — the mini calendar simply never moved.
|
|
58
|
+
*/
|
|
59
|
+
miniCalYear: number;
|
|
60
|
+
miniCalMonth: number;
|
|
48
61
|
private _hasScrolledToTime;
|
|
49
62
|
private _boundCloseDropdown;
|
|
50
63
|
private get _currentDate();
|
|
@@ -81,6 +94,13 @@ export declare class CalendarViewComponent implements IElementRef, OnCreate, OnD
|
|
|
81
94
|
toggleViewDropdown: () => void;
|
|
82
95
|
setView: (view: CalendarViewMode) => void;
|
|
83
96
|
handleEventClick: (event: CalendarEvent) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Key of the single tabbable day cell. A month grid is one tab stop;
|
|
99
|
+
* arrows move within it (the cells were previously not focusable at all).
|
|
100
|
+
*/
|
|
101
|
+
rovingDay: string;
|
|
102
|
+
get dayTabStop(): string;
|
|
103
|
+
handleDayKeyDown: (iso: string, event: KeyboardEvent) => void;
|
|
84
104
|
handleDateClick: (iso: string) => void;
|
|
85
105
|
handleAddEvent: () => void;
|
|
86
106
|
handleAddEventOnDate: (iso: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-view.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/calendar-view/calendar-view.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"calendar-view.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/calendar-view/calendar-view.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ 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
|
import { MelodicComponent } from '@melodicdev/core';
|
|
8
|
-
import { toIsoDate, parseDate, addDays, addMonths, startOfWeek, getMonthGrid, getWeekColumns, getDayColumn, getWeekdayHeaders, getISOWeekNumber, formatMonthYear, formatDateRange, getMonthAbbrev, getDayName, getEventsForDate, getTimeSlots, getMonthGrid as getMiniGrid, getMiniCalendarDots } from './calendar-view.utils.js';
|
|
8
|
+
import { setCalendarLocale, toIsoDate, parseDate, addDays, addMonths, startOfWeek, getMonthGrid, getWeekColumns, getDayColumn, getWeekdayHeaders, getISOWeekNumber, formatMonthYear, formatDateRange, getMonthAbbrev, getDayName, getEventsForDate, getTimeSlots, getMonthGrid as getMiniGrid, getMiniCalendarDots } from './calendar-view.utils.js';
|
|
9
9
|
import { calendarViewTemplate } from './calendar-view.template.js';
|
|
10
10
|
import { calendarViewStyles } from './calendar-view.styles.js';
|
|
11
11
|
/**
|
|
@@ -28,6 +28,13 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
28
28
|
this.view = 'month';
|
|
29
29
|
/** Navigated date (ISO date string) */
|
|
30
30
|
this.date = '';
|
|
31
|
+
/**
|
|
32
|
+
* BCP 47 locale for month and weekday names. Defaults to the document's
|
|
33
|
+
* `lang` (then the browser's) — these used to be hardcoded English arrays,
|
|
34
|
+
* so the calendar showed "January" and "Mon" on every page regardless of
|
|
35
|
+
* language.
|
|
36
|
+
*/
|
|
37
|
+
this.locale = '';
|
|
31
38
|
/** Day the week starts on (0=Sunday, 1=Monday) */
|
|
32
39
|
this.weekStartsOn = 0;
|
|
33
40
|
/** Maximum visible events per day cell in month view */
|
|
@@ -46,9 +53,15 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
46
53
|
this.events = [];
|
|
47
54
|
/** Whether the view dropdown is open */
|
|
48
55
|
this.isViewDropdownOpen = false;
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Mini calendar state for the day-view sidebar.
|
|
58
|
+
*
|
|
59
|
+
* Public (not `_`-prefixed) on purpose: `_` fields are excluded from
|
|
60
|
+
* reactivity, so the previous/next buttons changed the month and nothing
|
|
61
|
+
* re-rendered — the mini calendar simply never moved.
|
|
62
|
+
*/
|
|
63
|
+
this.miniCalYear = 0;
|
|
64
|
+
this.miniCalMonth = 0;
|
|
52
65
|
this._hasScrolledToTime = false;
|
|
53
66
|
this._boundCloseDropdown = null;
|
|
54
67
|
/* ── Navigation handlers ── */
|
|
@@ -105,6 +118,33 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
105
118
|
detail: { event }
|
|
106
119
|
}));
|
|
107
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Key of the single tabbable day cell. A month grid is one tab stop;
|
|
123
|
+
* arrows move within it (the cells were previously not focusable at all).
|
|
124
|
+
*/
|
|
125
|
+
this.rovingDay = '';
|
|
126
|
+
this.handleDayKeyDown = (iso, event) => {
|
|
127
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
this.handleDateClick(iso);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const deltas = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -7, ArrowDown: 7 };
|
|
133
|
+
const delta = deltas[event.key];
|
|
134
|
+
if (delta === undefined) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const grid = this.monthGrid;
|
|
138
|
+
const index = grid.findIndex((day) => day.iso === iso);
|
|
139
|
+
const next = grid[index + delta];
|
|
140
|
+
if (index === -1 || !next) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
this.rovingDay = next.iso;
|
|
145
|
+
const cell = this.elementRef.shadowRoot?.querySelector(`.ml-cv__day-cell[data-key="${next.iso}"]`);
|
|
146
|
+
cell?.focus();
|
|
147
|
+
};
|
|
108
148
|
this.handleDateClick = (iso) => {
|
|
109
149
|
this.elementRef.dispatchEvent(new CustomEvent('ml:date-click', {
|
|
110
150
|
bubbles: true,
|
|
@@ -133,21 +173,21 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
133
173
|
};
|
|
134
174
|
/* ── Mini calendar handlers ── */
|
|
135
175
|
this.miniCalPrevMonth = () => {
|
|
136
|
-
if (this.
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
176
|
+
if (this.miniCalMonth === 0) {
|
|
177
|
+
this.miniCalMonth = 11;
|
|
178
|
+
this.miniCalYear--;
|
|
139
179
|
}
|
|
140
180
|
else {
|
|
141
|
-
this.
|
|
181
|
+
this.miniCalMonth--;
|
|
142
182
|
}
|
|
143
183
|
};
|
|
144
184
|
this.miniCalNextMonth = () => {
|
|
145
|
-
if (this.
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
185
|
+
if (this.miniCalMonth === 11) {
|
|
186
|
+
this.miniCalMonth = 0;
|
|
187
|
+
this.miniCalYear++;
|
|
148
188
|
}
|
|
149
189
|
else {
|
|
150
|
-
this.
|
|
190
|
+
this.miniCalMonth++;
|
|
151
191
|
}
|
|
152
192
|
};
|
|
153
193
|
this.handleMiniCalSelect = (iso) => {
|
|
@@ -169,6 +209,7 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
169
209
|
return new Date();
|
|
170
210
|
}
|
|
171
211
|
onCreate() {
|
|
212
|
+
setCalendarLocale(this.locale);
|
|
172
213
|
// Initialize date if not set
|
|
173
214
|
if (!this.date) {
|
|
174
215
|
const now = new Date();
|
|
@@ -176,8 +217,8 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
176
217
|
}
|
|
177
218
|
// Init mini cal to current date's month
|
|
178
219
|
const d = this._currentDate;
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
220
|
+
this.miniCalYear = d.getFullYear();
|
|
221
|
+
this.miniCalMonth = d.getMonth();
|
|
181
222
|
// Close dropdown on outside click
|
|
182
223
|
this._boundCloseDropdown = (e) => {
|
|
183
224
|
if (!this.isViewDropdownOpen)
|
|
@@ -199,6 +240,9 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
199
240
|
}
|
|
200
241
|
}
|
|
201
242
|
onRender() {
|
|
243
|
+
// Re-apply before every render, so a later `locale` write is picked up
|
|
244
|
+
// by the month/weekday getters the template is about to read.
|
|
245
|
+
setCalendarLocale(this.locale);
|
|
202
246
|
// Auto-scroll time grid to ~6 AM on initial load
|
|
203
247
|
if ((this.view === 'week' || this.view === 'day') && !this._hasScrolledToTime) {
|
|
204
248
|
const shadow = this.elementRef.shadowRoot;
|
|
@@ -270,26 +314,36 @@ let CalendarViewComponent = class CalendarViewComponent {
|
|
|
270
314
|
}
|
|
271
315
|
get dayViewDateLabel() {
|
|
272
316
|
const d = this._currentDate;
|
|
273
|
-
return d.toLocaleDateString(
|
|
317
|
+
return d.toLocaleDateString(this.locale || undefined, { weekday: 'long', month: 'long', day: 'numeric' });
|
|
274
318
|
}
|
|
275
319
|
/* ── Mini calendar getters (day view sidebar) ── */
|
|
276
320
|
get miniCalendarTitle() {
|
|
277
|
-
return formatMonthYear(new Date(this.
|
|
321
|
+
return formatMonthYear(new Date(this.miniCalYear, this.miniCalMonth, 1));
|
|
278
322
|
}
|
|
279
323
|
get miniCalendarWeekdays() {
|
|
280
324
|
return getWeekdayHeaders(this.weekStartsOn).map((h) => h.short.charAt(0));
|
|
281
325
|
}
|
|
282
326
|
get miniCalendarGrid() {
|
|
283
|
-
return getMiniGrid(this.
|
|
327
|
+
return getMiniGrid(this.miniCalYear, this.miniCalMonth, this.weekStartsOn);
|
|
284
328
|
}
|
|
285
329
|
get miniCalendarDots() {
|
|
286
|
-
return getMiniCalendarDots(this.
|
|
330
|
+
return getMiniCalendarDots(this.miniCalYear, this.miniCalMonth, this.events);
|
|
331
|
+
}
|
|
332
|
+
get dayTabStop() {
|
|
333
|
+
const grid = this.monthGrid;
|
|
334
|
+
if (grid.length === 0) {
|
|
335
|
+
return '';
|
|
336
|
+
}
|
|
337
|
+
if (this.rovingDay && grid.some((day) => day.iso === this.rovingDay)) {
|
|
338
|
+
return this.rovingDay;
|
|
339
|
+
}
|
|
340
|
+
return (grid.find((day) => day.isToday) ?? grid.find((day) => day.isCurrentMonth) ?? grid[0]).iso;
|
|
287
341
|
}
|
|
288
342
|
/* ── Private helpers ── */
|
|
289
343
|
setDate(d) {
|
|
290
344
|
this.date = toIsoDate(d.getFullYear(), d.getMonth(), d.getDate());
|
|
291
|
-
this.
|
|
292
|
-
this.
|
|
345
|
+
this.miniCalYear = d.getFullYear();
|
|
346
|
+
this.miniCalMonth = d.getMonth();
|
|
293
347
|
this.elementRef.dispatchEvent(new CustomEvent('ml:date-change', {
|
|
294
348
|
bubbles: true,
|
|
295
349
|
composed: true,
|
|
@@ -311,7 +365,8 @@ CalendarViewComponent = __decorate([
|
|
|
311
365
|
'hide-nav',
|
|
312
366
|
'hide-today-button',
|
|
313
367
|
'hide-view-selector',
|
|
314
|
-
'hide-add-button'
|
|
368
|
+
'hide-add-button',
|
|
369
|
+
'locale'
|
|
315
370
|
]
|
|
316
371
|
})
|
|
317
372
|
], CalendarViewComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-view.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/calendar-view/calendar-view.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"calendar-view.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/calendar-view/calendar-view.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,iDAq0B9B,CAAC"}
|