@mesgflow/ui-kit 0.6.0 → 0.8.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/README.md +56 -5
- package/fesm2022/mesgflow-ui-kit-accordion.mjs +9 -8
- package/fesm2022/mesgflow-ui-kit-accordion.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-agenda.mjs +208 -0
- package/fesm2022/mesgflow-ui-kit-agenda.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-alert.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-aspect-ratio.mjs +37 -0
- package/fesm2022/mesgflow-ui-kit-aspect-ratio.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-avatar-group.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-avatar.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-badge.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-banner.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-blocks.mjs +207 -0
- package/fesm2022/mesgflow-ui-kit-blocks.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-box-input.mjs +4 -4
- package/fesm2022/mesgflow-ui-kit-box-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-brand.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-breadcrumb.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-button-group.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-button.mjs +190 -244
- package/fesm2022/mesgflow-ui-kit-button.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-card.mjs +48 -27
- package/fesm2022/mesgflow-ui-kit-card.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-carousel.mjs +308 -0
- package/fesm2022/mesgflow-ui-kit-carousel.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-chart.mjs +12 -12
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs +18 -23
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-chip.mjs +5 -5
- package/fesm2022/mesgflow-ui-kit-chip.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-code-block.mjs +11 -7
- package/fesm2022/mesgflow-ui-kit-code-block.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-collapsible.mjs +9 -9
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs +9 -7
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-combobox.mjs +147 -67
- package/fesm2022/mesgflow-ui-kit-combobox.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-command.mjs +15 -16
- package/fesm2022/mesgflow-ui-kit-command.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs +7 -9
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-copy-button.mjs +6 -6
- package/fesm2022/mesgflow-ui-kit-core.mjs +446 -128
- package/fesm2022/mesgflow-ui-kit-core.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-countdown.mjs +149 -0
- package/fesm2022/mesgflow-ui-kit-countdown.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs +140 -19
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-description-list.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-dialog.mjs +310 -64
- package/fesm2022/mesgflow-ui-kit-dialog.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-divider.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-drawer.mjs +109 -0
- package/fesm2022/mesgflow-ui-kit-drawer.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs +6 -6
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-empty-state.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-field.mjs +55 -14
- package/fesm2022/mesgflow-ui-kit-field.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-file-upload.mjs +356 -0
- package/fesm2022/mesgflow-ui-kit-file-upload.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-hover-card.mjs +6 -6
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs +135 -0
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-icon.mjs +8 -3
- package/fesm2022/mesgflow-ui-kit-icon.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-icons-lucide.mjs +371 -0
- package/fesm2022/mesgflow-ui-kit-icons-lucide.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-inline-edit.mjs +279 -0
- package/fesm2022/mesgflow-ui-kit-inline-edit.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-input.mjs +162 -19
- package/fesm2022/mesgflow-ui-kit-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-kbd.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-lightbox.mjs +299 -0
- package/fesm2022/mesgflow-ui-kit-lightbox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-link.mjs +5 -5
- package/fesm2022/mesgflow-ui-kit-link.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-listbox.mjs +151 -0
- package/fesm2022/mesgflow-ui-kit-listbox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-mention.mjs +283 -0
- package/fesm2022/mesgflow-ui-kit-mention.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-menu.mjs +178 -14
- package/fesm2022/mesgflow-ui-kit-menu.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-nav-menu.mjs +276 -0
- package/fesm2022/mesgflow-ui-kit-nav-menu.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-notification-center.mjs +281 -0
- package/fesm2022/mesgflow-ui-kit-notification-center.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-number-input.mjs +9 -6
- package/fesm2022/mesgflow-ui-kit-number-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-otp-input.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-page-header.mjs +6 -6
- package/fesm2022/mesgflow-ui-kit-pagination.mjs +7 -6
- package/fesm2022/mesgflow-ui-kit-pagination.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-password-input.mjs +38 -68
- package/fesm2022/mesgflow-ui-kit-password-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-popover.mjs +12 -52
- package/fesm2022/mesgflow-ui-kit-popover.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-progress.mjs +164 -23
- package/fesm2022/mesgflow-ui-kit-progress.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-qr-code.mjs +766 -0
- package/fesm2022/mesgflow-ui-kit-qr-code.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-radio.mjs +10 -12
- package/fesm2022/mesgflow-ui-kit-radio.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-rating.mjs +4 -4
- package/fesm2022/mesgflow-ui-kit-rating.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-scroll-area.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-search-input.mjs +11 -7
- package/fesm2022/mesgflow-ui-kit-search-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs +15 -11
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-select.mjs +6 -5
- package/fesm2022/mesgflow-ui-kit-select.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs +24 -21
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs +6 -5
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-slider.mjs +253 -6
- package/fesm2022/mesgflow-ui-kit-slider.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-sortable.mjs +526 -0
- package/fesm2022/mesgflow-ui-kit-sortable.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-spinner.mjs +44 -15
- package/fesm2022/mesgflow-ui-kit-spinner.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-split-button.mjs +205 -0
- package/fesm2022/mesgflow-ui-kit-split-button.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-splitter.mjs +213 -6
- package/fesm2022/mesgflow-ui-kit-splitter.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs +13 -6
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-stepper.mjs +171 -64
- package/fesm2022/mesgflow-ui-kit-stepper.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-switch.mjs +4 -4
- package/fesm2022/mesgflow-ui-kit-switch.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-table.mjs +34 -28
- package/fesm2022/mesgflow-ui-kit-table.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tabs.mjs +421 -180
- package/fesm2022/mesgflow-ui-kit-tabs.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs +9 -4
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-theme-switcher.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-theming.mjs +7 -7
- package/fesm2022/mesgflow-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs +6 -6
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-timeline.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-toast.mjs +118 -35
- package/fesm2022/mesgflow-ui-kit-toast.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-toggle.mjs +12 -11
- package/fesm2022/mesgflow-ui-kit-toggle.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs +13 -11
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs +76 -53
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tour.mjs +17 -29
- package/fesm2022/mesgflow-ui-kit-tour.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-transfer-list.mjs +288 -0
- package/fesm2022/mesgflow-ui-kit-transfer-list.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tree-select.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-tree.mjs +4 -4
- package/fesm2022/mesgflow-ui-kit-tree.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-virtual-list.mjs +109 -0
- package/fesm2022/mesgflow-ui-kit-virtual-list.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit.mjs +93 -12836
- package/fesm2022/mesgflow-ui-kit.mjs.map +1 -1
- package/package.json +91 -3
- package/schematics/collection.json +10 -0
- package/schematics/migration.json +10 -0
- package/schematics/migrations/v0-7.cjs +70 -0
- package/schematics/ng-add/index.cjs +234 -0
- package/schematics/ng-add/schema.json +43 -0
- package/tokens/color.css +96 -0
- package/tokens/controls.css +145 -0
- package/tokens/elevation.css +62 -6
- package/tokens/motion.css +304 -66
- package/tokens/radius.css +14 -0
- package/tokens.css +1 -0
- package/tokens.json +1583 -0
- package/types/mesgflow-ui-kit-agenda.d.ts +49 -0
- package/types/mesgflow-ui-kit-aspect-ratio.d.ts +18 -0
- package/types/mesgflow-ui-kit-blocks.d.ts +128 -0
- package/types/mesgflow-ui-kit-button.d.ts +23 -38
- package/types/mesgflow-ui-kit-card.d.ts +26 -16
- package/types/mesgflow-ui-kit-carousel.d.ts +51 -0
- package/types/mesgflow-ui-kit-checkbox.d.ts +8 -5
- package/types/mesgflow-ui-kit-code-block.d.ts +4 -1
- package/types/mesgflow-ui-kit-combobox.d.ts +47 -22
- package/types/mesgflow-ui-kit-command.d.ts +2 -2
- package/types/mesgflow-ui-kit-core.d.ts +279 -21
- package/types/mesgflow-ui-kit-countdown.d.ts +47 -0
- package/types/mesgflow-ui-kit-date-picker.d.ts +31 -1
- package/types/mesgflow-ui-kit-dialog.d.ts +122 -14
- package/types/mesgflow-ui-kit-drawer.d.ts +45 -0
- package/types/mesgflow-ui-kit-field.d.ts +17 -8
- package/types/mesgflow-ui-kit-file-upload.d.ts +64 -0
- package/types/mesgflow-ui-kit-hover-card.d.ts +2 -2
- package/types/mesgflow-ui-kit-icons-lucide.d.ts +27 -0
- package/types/mesgflow-ui-kit-inline-edit.d.ts +42 -0
- package/types/mesgflow-ui-kit-input.d.ts +64 -2
- package/types/mesgflow-ui-kit-lightbox.d.ts +54 -0
- package/types/mesgflow-ui-kit-listbox.d.ts +30 -0
- package/types/mesgflow-ui-kit-mention.d.ts +59 -0
- package/types/mesgflow-ui-kit-menu.d.ts +41 -2
- package/types/mesgflow-ui-kit-nav-menu.d.ts +58 -0
- package/types/mesgflow-ui-kit-notification-center.d.ts +41 -0
- package/types/mesgflow-ui-kit-number-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-password-input.d.ts +35 -5
- package/types/mesgflow-ui-kit-popover.d.ts +13 -5
- package/types/mesgflow-ui-kit-progress.d.ts +33 -12
- package/types/mesgflow-ui-kit-qr-code.d.ts +160 -0
- package/types/mesgflow-ui-kit-radio.d.ts +2 -2
- package/types/mesgflow-ui-kit-search-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-segmented-control.d.ts +4 -0
- package/types/mesgflow-ui-kit-sidebar.d.ts +1 -1
- package/types/mesgflow-ui-kit-slider.d.ts +60 -1
- package/types/mesgflow-ui-kit-sortable.d.ts +103 -0
- package/types/mesgflow-ui-kit-spinner.d.ts +5 -8
- package/types/mesgflow-ui-kit-split-button.d.ts +47 -0
- package/types/mesgflow-ui-kit-splitter.d.ts +64 -1
- package/types/mesgflow-ui-kit-stat-tile.d.ts +3 -0
- package/types/mesgflow-ui-kit-stepper.d.ts +54 -32
- package/types/mesgflow-ui-kit-table.d.ts +2 -0
- package/types/mesgflow-ui-kit-tabs.d.ts +193 -93
- package/types/mesgflow-ui-kit-tag-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-toast.d.ts +48 -22
- package/types/mesgflow-ui-kit-tooltip.d.ts +15 -12
- package/types/mesgflow-ui-kit-transfer-list.d.ts +34 -0
- package/types/mesgflow-ui-kit-virtual-list.d.ts +35 -0
- package/types/mesgflow-ui-kit.d.ts +88 -5444
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, input, output, inject, computed, signal, viewChild, effect, untracked, afterRenderEffect, Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { model, input, output, inject, computed, signal, viewChild, effect, untracked, afterRenderEffect, Component, forwardRef, booleanAttribute } from '@angular/core';
|
|
3
3
|
import { startOfDay, startOfMonth, subDays, startOfWeek, endOfWeek, endOfMonth, eachDayOfInterval, isSameMonth, isSameDay as isSameDay$1, isWithinInterval, addMonths, subMonths, addYears, subYears, format, parse, isValid, addDays } from 'date-fns';
|
|
4
4
|
import { Button } from '@mesgflow/ui-kit/button';
|
|
5
5
|
import { Icon } from '@mesgflow/ui-kit/icon';
|
|
6
|
-
import { MF_DATE_LOCALE, MF_DATE_PICKER_LABELS, cn, ValueAccessorBase } from '@mesgflow/ui-kit/core';
|
|
6
|
+
import { MF_DATE_LOCALE, MF_DATE_PICKER_LABELS, cn, focusRecipe, ValueAccessorBase } from '@mesgflow/ui-kit/core';
|
|
7
7
|
import * as i1 from '@angular/cdk/overlay';
|
|
8
8
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
9
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
10
|
import { Input, InputGroup, InputPrefix, InputSuffix } from '@mesgflow/ui-kit/input';
|
|
11
11
|
import { Popover } from '@mesgflow/ui-kit/popover';
|
|
12
|
+
import { TimePicker } from '@mesgflow/ui-kit/time-picker';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Hazır tarih aralıkları — kurumsal panellerde tarih filtresinin %90'ı bunlar
|
|
@@ -216,15 +217,16 @@ class Calendar {
|
|
|
216
217
|
const inRange = isRangeMode && isWithinRange(day, this.rangeStart(), effectiveEnd);
|
|
217
218
|
const isSelectedSingle = !isRangeMode && isSameDay(day, this.selected());
|
|
218
219
|
return cn('relative flex h-9 w-9 shrink-0 appearance-none items-center justify-center rounded-sm border-0 bg-transparent text-sm tabular-nums text-fg transition-colors duration-fast ease-emphasis ' +
|
|
219
|
-
|
|
220
|
-
'
|
|
220
|
+
focusRecipe +
|
|
221
|
+
' ' +
|
|
222
|
+
'disabled:pointer-events-none disabled:opacity-40', outside && 'text-fg-subtle', !isSelectedSingle && !isEdge && 'hover:bg-state-hover', inRange && 'rounded-none bg-primary-tint', inRange && isStart && 'rounded-s-sm', inRange && isEnd && 'rounded-e-sm', (isSelectedSingle || isEdge) &&
|
|
221
223
|
'rounded-sm bg-primary-tint font-semibold text-primary-tint-fg', today &&
|
|
222
224
|
!isSelectedSingle &&
|
|
223
225
|
!isEdge &&
|
|
224
226
|
"after:absolute after:bottom-1 after:h-1 after:w-1 after:rounded-full after:bg-accent after:content-['']");
|
|
225
227
|
}
|
|
226
228
|
cellClasses(active) {
|
|
227
|
-
return cn('rounded-sm px-2 py-2.5 text-sm text-fg capitalize transition-colors duration-fast ease-emphasis', active ? 'bg-primary-tint font-semibold text-primary-tint-fg' : 'hover:bg-
|
|
229
|
+
return cn('rounded-sm px-2 py-2.5 text-sm text-fg capitalize transition-colors duration-fast ease-emphasis', active ? 'bg-primary-tint font-semibold text-primary-tint-fg' : 'hover:bg-state-hover');
|
|
228
230
|
}
|
|
229
231
|
monthLabel(m) {
|
|
230
232
|
return format(m, 'LLL', { locale: this.effectiveLocale() });
|
|
@@ -305,10 +307,10 @@ class Calendar {
|
|
|
305
307
|
if (!isCurrentMonth(day, this.month()))
|
|
306
308
|
this.month.set(startOfMonth(day));
|
|
307
309
|
}
|
|
308
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
309
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
311
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Calendar, isStandalone: true, selector: "mf-calendar", inputs: { month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, rangeStart: { classPropertyName: "rangeStart", publicName: "rangeStart", isSignal: true, isRequired: false, transformFunction: null }, rangeEnd: { classPropertyName: "rangeEnd", publicName: "rangeEnd", isSignal: true, isRequired: false, transformFunction: null }, hoverEnd: { classPropertyName: "hoverEnd", publicName: "hoverEnd", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { month: "monthChange", dayPick: "dayPick", dayHover: "dayHover" }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "gridEl", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex w-64 flex-col gap-2\">\r\n @switch (view()) {\r\n @case ('day') {\r\n <div class=\"flex items-center justify-between\">\r\n @if (navigable()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousMonth\"\r\n (click)=\"month.set(shiftMonth(month(), -1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-0.5 border-0 bg-transparent px-1 font-display text-title-sm text-fg capitalize transition-colors duration-fast ease-emphasis hover:text-accent\"\r\n [attr.aria-label]=\"effectiveLabels().chooseMonth\"\r\n (click)=\"openMonthView()\"\r\n >\r\n {{ monthYearLabel() }}\r\n <span mfIcon [size]=\"16\">expand_more</span>\r\n </button>\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextMonth\"\r\n (click)=\"month.set(shiftMonth(month(), 1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n } @else {\r\n <span class=\"px-1 font-display text-title-sm text-fg capitalize\">{{\r\n monthYearLabel()\r\n }}</span>\r\n }\r\n </div>\r\n\r\n <div class=\"grid grid-cols-7\">\r\n @for (label of weekdayLabels(); track $index) {\r\n <span class=\"text-eyebrow flex h-6 items-center justify-center text-fg-subtle\">{{\r\n label\r\n }}</span>\r\n }\r\n </div>\r\n\r\n <!--\r\n `role=\"grid\"` kapsay\u0131c\u0131s\u0131 odaklanabilir DE\u011E\u0130L \u2014 h\u00FCcreler (`role=\"gridcell\"`)\r\n ger\u00E7ek `<button>` elemanlar\u0131, roving tabindex ile kendi odaklar\u0131n\u0131 ta\u015F\u0131r;\r\n bu `(keydown)` yaln\u0131zca ok tu\u015Fu gezinmesini merkezi y\u00F6netmek i\u00E7in.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n #grid\r\n role=\"grid\"\r\n [attr.aria-label]=\"monthYearLabel()\"\r\n class=\"grid grid-cols-7 gap-y-1\"\r\n (keydown)=\"onGridKeydown($event)\"\r\n (mouseleave)=\"dayHover.emit(null)\"\r\n >\r\n @for (week of weeks(); track $index) {\r\n <div role=\"row\" class=\"contents\">\r\n @for (day of week; track day.getTime()) {\r\n <button\r\n type=\"button\"\r\n role=\"gridcell\"\r\n [attr.data-day-key]=\"dayKey(day)\"\r\n [attr.aria-selected]=\"isSameDaySafe(day)\"\r\n [tabindex]=\"tabIndexFor(day)\"\r\n [disabled]=\"isDisabled(day)\"\r\n [class]=\"dayClasses(day)\"\r\n (click)=\"pick(day)\"\r\n (mouseenter)=\"onDayMouseEnter(day)\"\r\n >\r\n {{ day.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case ('month') {\r\n <div class=\"flex items-center justify-between\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousYear\"\r\n (click)=\"month.set(shiftYear(month(), -1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-0.5 border-0 bg-transparent px-1 font-display text-title-sm tabular-nums text-fg transition-colors duration-fast ease-emphasis hover:text-accent\"\r\n [attr.aria-label]=\"effectiveLabels().chooseYear\"\r\n (click)=\"openYearView()\"\r\n >\r\n {{ month().getFullYear() }}\r\n <span mfIcon [size]=\"16\">expand_more</span>\r\n </button>\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextYear\"\r\n (click)=\"month.set(shiftYear(month(), 1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-3 gap-1 py-1\">\r\n @for (m of monthGrid(); track m.getMonth()) {\r\n <button\r\n type=\"button\"\r\n [class]=\"cellClasses(m.getMonth() === month().getMonth())\"\r\n (click)=\"pickMonth(m)\"\r\n >\r\n {{ monthLabel(m) }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n @case ('year') {\r\n <div class=\"flex items-center justify-between\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousYear\"\r\n (click)=\"shiftYearPage(-1)\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <span class=\"font-display text-title-sm tabular-nums text-fg\"\r\n >{{ yearGrid()[0] }}\u2013{{ yearGrid()[11] }}</span\r\n >\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextYear\"\r\n (click)=\"shiftYearPage(1)\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-3 gap-1 py-1\">\r\n @for (y of yearGrid(); track y) {\r\n <button\r\n type=\"button\"\r\n class=\"tabular-nums\"\r\n [class]=\"cellClasses(y === month().getFullYear())\"\r\n (click)=\"pickYear(y)\"\r\n >\r\n {{ y }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }] });
|
|
310
312
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Calendar, decorators: [{
|
|
312
314
|
type: Component,
|
|
313
315
|
args: [{ selector: 'mf-calendar', imports: [Button, Icon], host: { class: 'block' }, template: "<div class=\"flex w-64 flex-col gap-2\">\r\n @switch (view()) {\r\n @case ('day') {\r\n <div class=\"flex items-center justify-between\">\r\n @if (navigable()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousMonth\"\r\n (click)=\"month.set(shiftMonth(month(), -1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-0.5 border-0 bg-transparent px-1 font-display text-title-sm text-fg capitalize transition-colors duration-fast ease-emphasis hover:text-accent\"\r\n [attr.aria-label]=\"effectiveLabels().chooseMonth\"\r\n (click)=\"openMonthView()\"\r\n >\r\n {{ monthYearLabel() }}\r\n <span mfIcon [size]=\"16\">expand_more</span>\r\n </button>\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextMonth\"\r\n (click)=\"month.set(shiftMonth(month(), 1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n } @else {\r\n <span class=\"px-1 font-display text-title-sm text-fg capitalize\">{{\r\n monthYearLabel()\r\n }}</span>\r\n }\r\n </div>\r\n\r\n <div class=\"grid grid-cols-7\">\r\n @for (label of weekdayLabels(); track $index) {\r\n <span class=\"text-eyebrow flex h-6 items-center justify-center text-fg-subtle\">{{\r\n label\r\n }}</span>\r\n }\r\n </div>\r\n\r\n <!--\r\n `role=\"grid\"` kapsay\u0131c\u0131s\u0131 odaklanabilir DE\u011E\u0130L \u2014 h\u00FCcreler (`role=\"gridcell\"`)\r\n ger\u00E7ek `<button>` elemanlar\u0131, roving tabindex ile kendi odaklar\u0131n\u0131 ta\u015F\u0131r;\r\n bu `(keydown)` yaln\u0131zca ok tu\u015Fu gezinmesini merkezi y\u00F6netmek i\u00E7in.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n #grid\r\n role=\"grid\"\r\n [attr.aria-label]=\"monthYearLabel()\"\r\n class=\"grid grid-cols-7 gap-y-1\"\r\n (keydown)=\"onGridKeydown($event)\"\r\n (mouseleave)=\"dayHover.emit(null)\"\r\n >\r\n @for (week of weeks(); track $index) {\r\n <div role=\"row\" class=\"contents\">\r\n @for (day of week; track day.getTime()) {\r\n <button\r\n type=\"button\"\r\n role=\"gridcell\"\r\n [attr.data-day-key]=\"dayKey(day)\"\r\n [attr.aria-selected]=\"isSameDaySafe(day)\"\r\n [tabindex]=\"tabIndexFor(day)\"\r\n [disabled]=\"isDisabled(day)\"\r\n [class]=\"dayClasses(day)\"\r\n (click)=\"pick(day)\"\r\n (mouseenter)=\"onDayMouseEnter(day)\"\r\n >\r\n {{ day.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case ('month') {\r\n <div class=\"flex items-center justify-between\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousYear\"\r\n (click)=\"month.set(shiftYear(month(), -1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-0.5 border-0 bg-transparent px-1 font-display text-title-sm tabular-nums text-fg transition-colors duration-fast ease-emphasis hover:text-accent\"\r\n [attr.aria-label]=\"effectiveLabels().chooseYear\"\r\n (click)=\"openYearView()\"\r\n >\r\n {{ month().getFullYear() }}\r\n <span mfIcon [size]=\"16\">expand_more</span>\r\n </button>\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextYear\"\r\n (click)=\"month.set(shiftYear(month(), 1))\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-3 gap-1 py-1\">\r\n @for (m of monthGrid(); track m.getMonth()) {\r\n <button\r\n type=\"button\"\r\n [class]=\"cellClasses(m.getMonth() === month().getMonth())\"\r\n (click)=\"pickMonth(m)\"\r\n >\r\n {{ monthLabel(m) }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n @case ('year') {\r\n <div class=\"flex items-center justify-between\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().previousYear\"\r\n (click)=\"shiftYearPage(-1)\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n <span class=\"font-display text-title-sm tabular-nums text-fg\"\r\n >{{ yearGrid()[0] }}\u2013{{ yearGrid()[11] }}</span\r\n >\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().nextYear\"\r\n (click)=\"shiftYearPage(1)\"\r\n >\r\n <span mfIcon [size]=\"18\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-3 gap-1 py-1\">\r\n @for (y of yearGrid(); track y) {\r\n <button\r\n type=\"button\"\r\n class=\"tabular-nums\"\r\n [class]=\"cellClasses(y === month().getFullYear())\"\r\n (click)=\"pickYear(y)\"\r\n >\r\n {{ y }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n" }]
|
|
314
316
|
}], ctorParameters: () => [], propDecorators: { month: [{ type: i0.Input, args: [{ isSignal: true, alias: "month", required: false }] }, { type: i0.Output, args: ["monthChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], rangeStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeStart", required: false }] }], rangeEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeEnd", required: false }] }], hoverEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverEnd", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], navigable: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigable", required: false }] }], dayPick: [{ type: i0.Output, args: ["dayPick"] }], dayHover: [{ type: i0.Output, args: ["dayHover"] }], gridEl: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
@@ -420,16 +422,16 @@ class DatePicker extends ValueAccessorBase {
|
|
|
420
422
|
this.draft.set(v ? formatDateInput(v, this.effectiveLocale()) : '');
|
|
421
423
|
this.close();
|
|
422
424
|
}
|
|
423
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
426
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DatePicker, isStandalone: true, selector: "mf-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "block" }, providers: [
|
|
425
427
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePicker), multi: true },
|
|
426
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], exportAs: ["mfDatePicker"], usesInheritance: true, ngImport: i0, template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"pointer-events-none absolute top-1/2 start-2.5 -translate-y-1/2 text-fg-subtle\"\r\n >calendar_today</span\r\n >\r\n <input\r\n mfInput\r\n #inputEl\r\n type=\"text\"\r\n class=\"ps-9\"\r\n [class.pr-8]=\"!!value()\"\r\n [hasError]=\"hasError()\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"effectiveLabels().placeholder\"\r\n [value]=\"draft()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n (input)=\"onInput($any($event.target).value)\"\r\n (focus)=\"open.set(true)\"\r\n (keydown.enter)=\"commitDraft()\"\r\n (keydown.escape)=\"onEscape()\"\r\n />\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"absolute top-1/2 end-2.5 -translate-y-1/2 appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clear\"\r\n (click)=\"clear()\"\r\n >\r\n <span mfIcon [size]=\"16\">close</span>\r\n </button>\r\n }\r\n\r\n <mf-popover\r\n [origin]=\"origin\"\r\n [open]=\"open()\"\r\n placement=\"bottom-start\"\r\n padding=\"lg\"\r\n panelClass=\"w-auto\"\r\n (closed)=\"onEscape()\"\r\n >\r\n <mf-calendar\r\n [(month)]=\"month\"\r\n [selected]=\"value()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [locale]=\"effectiveLocale()\"\r\n [labels]=\"effectiveLabels()\"\r\n (dayPick)=\"onDayPick($event)\"\r\n />\r\n <div class=\"mt-2 flex items-center justify-between border-t border-border pt-2\">\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-accent transition-colors duration-fast ease-emphasis hover:text-accent-strong\"\r\n (click)=\"pickToday()\"\r\n >\r\n {{ effectiveLabels().today }}\r\n </button>\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n (click)=\"clear()\"\r\n >\r\n {{ effectiveLabels().clear }}\r\n </button>\r\n }\r\n </div>\r\n </mf-popover>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: Input, selector: "input[mfInput]:not([type=checkbox]):not([type=radio]), textarea[mfInput]", inputs: ["size", "hasError", "autosize", "minRows", "maxRows"] }, { kind: "component", type: Calendar, selector: "mf-calendar", inputs: ["month", "mode", "selected", "rangeStart", "rangeEnd", "hoverEnd", "min", "max", "locale", "labels", "navigable"], outputs: ["monthChange", "dayPick", "dayHover"] }, { kind: "component", type: Popover, selector: "mf-popover", inputs: ["origin", "open", "placement", "padding", "hasBackdrop", "matchTriggerWidth", "panelClass"], outputs: ["openChange", "closed"], exportAs: ["mfPopover"] }] });
|
|
428
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], exportAs: ["mfDatePicker"], usesInheritance: true, ngImport: i0, template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"pointer-events-none absolute top-1/2 start-2.5 -translate-y-1/2 text-fg-subtle\"\r\n >calendar_today</span\r\n >\r\n <input\r\n mfInput\r\n #inputEl\r\n type=\"text\"\r\n class=\"ps-9\"\r\n [class.pr-8]=\"!!value()\"\r\n [hasError]=\"hasError()\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"effectiveLabels().placeholder\"\r\n [value]=\"draft()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n (input)=\"onInput($any($event.target).value)\"\r\n (focus)=\"open.set(true)\"\r\n (keydown.enter)=\"commitDraft()\"\r\n (keydown.escape)=\"onEscape()\"\r\n />\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center absolute top-1/2 end-2.5 -translate-y-1/2 appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clear\"\r\n (click)=\"clear()\"\r\n >\r\n <span mfIcon [size]=\"16\">close</span>\r\n </button>\r\n }\r\n\r\n <mf-popover\r\n [origin]=\"origin\"\r\n [open]=\"open()\"\r\n placement=\"bottom-start\"\r\n padding=\"lg\"\r\n panelClass=\"w-auto\"\r\n (closed)=\"onEscape()\"\r\n >\r\n <mf-calendar\r\n [(month)]=\"month\"\r\n [selected]=\"value()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [locale]=\"effectiveLocale()\"\r\n [labels]=\"effectiveLabels()\"\r\n (dayPick)=\"onDayPick($event)\"\r\n />\r\n <div class=\"mt-2 flex items-center justify-between border-t border-border pt-2\">\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-accent transition-colors duration-fast ease-emphasis hover:text-accent-strong\"\r\n (click)=\"pickToday()\"\r\n >\r\n {{ effectiveLabels().today }}\r\n </button>\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n (click)=\"clear()\"\r\n >\r\n {{ effectiveLabels().clear }}\r\n </button>\r\n }\r\n </div>\r\n </mf-popover>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: Input, selector: "input[mfInput]:not([type=checkbox]):not([type=radio]), textarea[mfInput]", inputs: ["size", "hasError", "autosize", "minRows", "maxRows"] }, { kind: "component", type: Calendar, selector: "mf-calendar", inputs: ["month", "mode", "selected", "rangeStart", "rangeEnd", "hoverEnd", "min", "max", "locale", "labels", "navigable"], outputs: ["monthChange", "dayPick", "dayHover"] }, { kind: "component", type: Popover, selector: "mf-popover", inputs: ["origin", "open", "placement", "padding", "hasBackdrop", "matchTriggerWidth", "panelClass"], outputs: ["openChange", "closed"], exportAs: ["mfPopover"] }] });
|
|
427
429
|
}
|
|
428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DatePicker, decorators: [{
|
|
429
431
|
type: Component,
|
|
430
432
|
args: [{ selector: 'mf-date-picker', exportAs: 'mfDatePicker', imports: [OverlayModule, Icon, Input, Calendar, Popover], host: { class: 'block' }, providers: [
|
|
431
433
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePicker), multi: true },
|
|
432
|
-
], template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"pointer-events-none absolute top-1/2 start-2.5 -translate-y-1/2 text-fg-subtle\"\r\n >calendar_today</span\r\n >\r\n <input\r\n mfInput\r\n #inputEl\r\n type=\"text\"\r\n class=\"ps-9\"\r\n [class.pr-8]=\"!!value()\"\r\n [hasError]=\"hasError()\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"effectiveLabels().placeholder\"\r\n [value]=\"draft()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n (input)=\"onInput($any($event.target).value)\"\r\n (focus)=\"open.set(true)\"\r\n (keydown.enter)=\"commitDraft()\"\r\n (keydown.escape)=\"onEscape()\"\r\n />\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"absolute top-1/2 end-2.5 -translate-y-1/2 appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clear\"\r\n (click)=\"clear()\"\r\n >\r\n <span mfIcon [size]=\"16\">close</span>\r\n </button>\r\n }\r\n\r\n <mf-popover\r\n [origin]=\"origin\"\r\n [open]=\"open()\"\r\n placement=\"bottom-start\"\r\n padding=\"lg\"\r\n panelClass=\"w-auto\"\r\n (closed)=\"onEscape()\"\r\n >\r\n <mf-calendar\r\n [(month)]=\"month\"\r\n [selected]=\"value()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [locale]=\"effectiveLocale()\"\r\n [labels]=\"effectiveLabels()\"\r\n (dayPick)=\"onDayPick($event)\"\r\n />\r\n <div class=\"mt-2 flex items-center justify-between border-t border-border pt-2\">\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-accent transition-colors duration-fast ease-emphasis hover:text-accent-strong\"\r\n (click)=\"pickToday()\"\r\n >\r\n {{ effectiveLabels().today }}\r\n </button>\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n (click)=\"clear()\"\r\n >\r\n {{ effectiveLabels().clear }}\r\n </button>\r\n }\r\n </div>\r\n </mf-popover>\r\n</div>\r\n" }]
|
|
434
|
+
], template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"pointer-events-none absolute top-1/2 start-2.5 -translate-y-1/2 text-fg-subtle\"\r\n >calendar_today</span\r\n >\r\n <input\r\n mfInput\r\n #inputEl\r\n type=\"text\"\r\n class=\"ps-9\"\r\n [class.pr-8]=\"!!value()\"\r\n [hasError]=\"hasError()\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"effectiveLabels().placeholder\"\r\n [value]=\"draft()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n (input)=\"onInput($any($event.target).value)\"\r\n (focus)=\"open.set(true)\"\r\n (keydown.enter)=\"commitDraft()\"\r\n (keydown.escape)=\"onEscape()\"\r\n />\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center absolute top-1/2 end-2.5 -translate-y-1/2 appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clear\"\r\n (click)=\"clear()\"\r\n >\r\n <span mfIcon [size]=\"16\">close</span>\r\n </button>\r\n }\r\n\r\n <mf-popover\r\n [origin]=\"origin\"\r\n [open]=\"open()\"\r\n placement=\"bottom-start\"\r\n padding=\"lg\"\r\n panelClass=\"w-auto\"\r\n (closed)=\"onEscape()\"\r\n >\r\n <mf-calendar\r\n [(month)]=\"month\"\r\n [selected]=\"value()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [locale]=\"effectiveLocale()\"\r\n [labels]=\"effectiveLabels()\"\r\n (dayPick)=\"onDayPick($event)\"\r\n />\r\n <div class=\"mt-2 flex items-center justify-between border-t border-border pt-2\">\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-accent transition-colors duration-fast ease-emphasis hover:text-accent-strong\"\r\n (click)=\"pickToday()\"\r\n >\r\n {{ effectiveLabels().today }}\r\n </button>\r\n @if (value()) {\r\n <button\r\n type=\"button\"\r\n class=\"appearance-none border-0 bg-transparent p-0 text-xs font-medium text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n (click)=\"clear()\"\r\n >\r\n {{ effectiveLabels().clear }}\r\n </button>\r\n }\r\n </div>\r\n </mf-popover>\r\n</div>\r\n" }]
|
|
433
435
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
434
436
|
|
|
435
437
|
const PRESETS = ['today', 'last7', 'last30', 'thisMonth'];
|
|
@@ -623,21 +625,140 @@ class DateRangePicker extends ValueAccessorBase {
|
|
|
623
625
|
this.endDraft.set(v.end ? formatDateInput(v.end, this.effectiveLocale()) : '');
|
|
624
626
|
this.close();
|
|
625
627
|
}
|
|
626
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
627
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DateRangePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
629
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DateRangePicker, isStandalone: true, selector: "mf-date-range-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "block" }, providers: [
|
|
628
630
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePicker), multi: true },
|
|
629
|
-
], viewQueries: [{ propertyName: "startEl", first: true, predicate: ["startEl"], descendants: true, isSignal: true }], exportAs: ["mfDateRangePicker"], usesInheritance: true, ngImport: i0, template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\
|
|
631
|
+
], viewQueries: [{ propertyName: "startEl", first: true, predicate: ["startEl"], descendants: true, isSignal: true }], exportAs: ["mfDateRangePicker"], usesInheritance: true, ngImport: i0, template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <mf-input-group [hasError]=\"hasError()\" [disabled]=\"disabled()\">\n <span mfInputPrefix><span mfIcon [size]=\"18\">calendar_today</span></span>\n <input\n #startEl\n type=\"text\"\n class=\"w-0 min-w-0 flex-1 appearance-none border-0 bg-transparent p-0 text-sm text-fg placeholder:text-fg-subtle focus:outline-none\"\n [placeholder]=\"effectiveLabels().startDate\"\n [value]=\"startDraft()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"effectiveLabels().startDate\"\n (input)=\"onStartInput($any($event.target).value)\"\n (focus)=\"open.set(true)\"\n (keydown.enter)=\"commitStartDraft()\"\n (keydown.escape)=\"onEscape()\"\n />\n <span class=\"shrink-0 text-fg-subtle\" aria-hidden=\"true\">\u2013</span>\n <input\n type=\"text\"\n class=\"w-0 min-w-0 flex-1 appearance-none border-0 bg-transparent p-0 text-sm text-fg placeholder:text-fg-subtle focus:outline-none\"\n [placeholder]=\"effectiveLabels().endDate\"\n [value]=\"endDraft()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"effectiveLabels().endDate\"\n (input)=\"onEndInput($any($event.target).value)\"\n (focus)=\"open.set(true)\"\n (keydown.enter)=\"commitEndDraft()\"\n (keydown.escape)=\"onEscape()\"\n />\n @if (value().start || value().end) {\n <button\n mfInputSuffix\n type=\"button\"\n class=\"appearance-none border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg\"\n [attr.aria-label]=\"effectiveLabels().clear\"\n (click)=\"clear()\"\n >\n <span mfIcon [size]=\"16\">close</span>\n </button>\n }\n </mf-input-group>\n\n <mf-popover\n [origin]=\"origin\"\n [open]=\"open()\"\n placement=\"bottom-start\"\n padding=\"none\"\n panelClass=\"flex w-auto\"\n (closed)=\"onEscape()\"\n >\n <div class=\"flex flex-col gap-0.5 border-e border-border p-2\">\n @for (preset of presets; track preset) {\n <button\n type=\"button\"\n class=\"appearance-none whitespace-nowrap rounded-sm border-0 bg-transparent px-2.5 py-1.5 text-start text-sm text-fg-muted transition-colors duration-fast ease-emphasis hover:bg-state-hover\"\n (click)=\"applyPreset(preset)\"\n >\n {{ presetLabel(preset) }}\n </button>\n }\n </div>\n\n <div class=\"flex flex-col gap-2 p-3\">\n <div class=\"flex gap-4\">\n <mf-calendar\n mode=\"range\"\n [(month)]=\"monthLeft\"\n [rangeStart]=\"draftRange().start\"\n [rangeEnd]=\"draftRange().end\"\n [hoverEnd]=\"hoverEnd()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"effectiveLocale()\"\n [labels]=\"effectiveLabels()\"\n (dayPick)=\"onDayPick($event)\"\n (dayHover)=\"onDayHover($event)\"\n />\n <div class=\"hidden sm:block\">\n <mf-calendar\n mode=\"range\"\n [month]=\"monthRight()\"\n [navigable]=\"false\"\n [rangeStart]=\"draftRange().start\"\n [rangeEnd]=\"draftRange().end\"\n [hoverEnd]=\"hoverEnd()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"effectiveLocale()\"\n [labels]=\"effectiveLabels()\"\n (dayPick)=\"onDayPick($event)\"\n (dayHover)=\"onDayHover($event)\"\n />\n </div>\n </div>\n <div class=\"flex items-center justify-end gap-2 border-t border-border pt-2\">\n <button mfButton tone=\"neutral\" appearance=\"text\" size=\"sm\" type=\"button\" (click)=\"clear()\">\n {{ effectiveLabels().clear }}\n </button>\n <button\n mfButton\n tone=\"primary\"\n appearance=\"filled\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"!draftRange().start\"\n (click)=\"apply()\"\n >\n {{ effectiveLabels().apply }}\n </button>\n </div>\n </div>\n </mf-popover>\n</div>\n", dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "component", type: Calendar, selector: "mf-calendar", inputs: ["month", "mode", "selected", "rangeStart", "rangeEnd", "hoverEnd", "min", "max", "locale", "labels", "navigable"], outputs: ["monthChange", "dayPick", "dayHover"] }, { kind: "component", type: Popover, selector: "mf-popover", inputs: ["origin", "open", "placement", "padding", "hasBackdrop", "matchTriggerWidth", "panelClass"], outputs: ["openChange", "closed"], exportAs: ["mfPopover"] }, { kind: "component", type: InputGroup, selector: "mf-input-group", inputs: ["size", "disabled", "hasError", "padded", "wrap"], exportAs: ["mfInputGroup"] }, { kind: "directive", type: InputPrefix, selector: "[mfInputPrefix]", inputs: ["addon"] }, { kind: "directive", type: InputSuffix, selector: "[mfInputSuffix]", inputs: ["addon"] }] });
|
|
630
632
|
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DateRangePicker, decorators: [{
|
|
632
634
|
type: Component,
|
|
633
635
|
args: [{ selector: 'mf-date-range-picker', exportAs: 'mfDateRangePicker', imports: [OverlayModule, Icon, Button, Calendar, Popover, InputGroup, InputPrefix, InputSuffix], host: { class: 'block' }, providers: [
|
|
634
636
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePicker), multi: true },
|
|
635
|
-
], template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\
|
|
637
|
+
], template: "<div class=\"relative w-full\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <mf-input-group [hasError]=\"hasError()\" [disabled]=\"disabled()\">\n <span mfInputPrefix><span mfIcon [size]=\"18\">calendar_today</span></span>\n <input\n #startEl\n type=\"text\"\n class=\"w-0 min-w-0 flex-1 appearance-none border-0 bg-transparent p-0 text-sm text-fg placeholder:text-fg-subtle focus:outline-none\"\n [placeholder]=\"effectiveLabels().startDate\"\n [value]=\"startDraft()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"effectiveLabels().startDate\"\n (input)=\"onStartInput($any($event.target).value)\"\n (focus)=\"open.set(true)\"\n (keydown.enter)=\"commitStartDraft()\"\n (keydown.escape)=\"onEscape()\"\n />\n <span class=\"shrink-0 text-fg-subtle\" aria-hidden=\"true\">\u2013</span>\n <input\n type=\"text\"\n class=\"w-0 min-w-0 flex-1 appearance-none border-0 bg-transparent p-0 text-sm text-fg placeholder:text-fg-subtle focus:outline-none\"\n [placeholder]=\"effectiveLabels().endDate\"\n [value]=\"endDraft()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"effectiveLabels().endDate\"\n (input)=\"onEndInput($any($event.target).value)\"\n (focus)=\"open.set(true)\"\n (keydown.enter)=\"commitEndDraft()\"\n (keydown.escape)=\"onEscape()\"\n />\n @if (value().start || value().end) {\n <button\n mfInputSuffix\n type=\"button\"\n class=\"appearance-none border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg\"\n [attr.aria-label]=\"effectiveLabels().clear\"\n (click)=\"clear()\"\n >\n <span mfIcon [size]=\"16\">close</span>\n </button>\n }\n </mf-input-group>\n\n <mf-popover\n [origin]=\"origin\"\n [open]=\"open()\"\n placement=\"bottom-start\"\n padding=\"none\"\n panelClass=\"flex w-auto\"\n (closed)=\"onEscape()\"\n >\n <div class=\"flex flex-col gap-0.5 border-e border-border p-2\">\n @for (preset of presets; track preset) {\n <button\n type=\"button\"\n class=\"appearance-none whitespace-nowrap rounded-sm border-0 bg-transparent px-2.5 py-1.5 text-start text-sm text-fg-muted transition-colors duration-fast ease-emphasis hover:bg-state-hover\"\n (click)=\"applyPreset(preset)\"\n >\n {{ presetLabel(preset) }}\n </button>\n }\n </div>\n\n <div class=\"flex flex-col gap-2 p-3\">\n <div class=\"flex gap-4\">\n <mf-calendar\n mode=\"range\"\n [(month)]=\"monthLeft\"\n [rangeStart]=\"draftRange().start\"\n [rangeEnd]=\"draftRange().end\"\n [hoverEnd]=\"hoverEnd()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"effectiveLocale()\"\n [labels]=\"effectiveLabels()\"\n (dayPick)=\"onDayPick($event)\"\n (dayHover)=\"onDayHover($event)\"\n />\n <div class=\"hidden sm:block\">\n <mf-calendar\n mode=\"range\"\n [month]=\"monthRight()\"\n [navigable]=\"false\"\n [rangeStart]=\"draftRange().start\"\n [rangeEnd]=\"draftRange().end\"\n [hoverEnd]=\"hoverEnd()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"effectiveLocale()\"\n [labels]=\"effectiveLabels()\"\n (dayPick)=\"onDayPick($event)\"\n (dayHover)=\"onDayHover($event)\"\n />\n </div>\n </div>\n <div class=\"flex items-center justify-end gap-2 border-t border-border pt-2\">\n <button mfButton tone=\"neutral\" appearance=\"text\" size=\"sm\" type=\"button\" (click)=\"clear()\">\n {{ effectiveLabels().clear }}\n </button>\n <button\n mfButton\n tone=\"primary\"\n appearance=\"filled\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"!draftRange().start\"\n (click)=\"apply()\"\n >\n {{ effectiveLabels().apply }}\n </button>\n </div>\n </div>\n </mf-popover>\n</div>\n" }]
|
|
636
638
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], startEl: [{ type: i0.ViewChild, args: ['startEl', { isSignal: true }] }] } });
|
|
637
639
|
|
|
640
|
+
/**
|
|
641
|
+
* `<mf-date-time-picker [(value)]="publishAt" [min]="now" ariaLabel="Yayın zamanı" />`
|
|
642
|
+
*
|
|
643
|
+
* Tarih + saat — TEK bir `Date` değeri. Mevcut `mf-date-picker` ve
|
|
644
|
+
* `mf-time-picker`'ın kompozisyonu (aynı klavye/erişilebilirlik davranışı):
|
|
645
|
+
* - Tarih değişince saat korunur; saat önce seçilirse tarih bugüne yerleşir.
|
|
646
|
+
* - İki alan `role="group"` altında tek bir ad paylaşır.
|
|
647
|
+
* - Reactive Forms / Signal Forms ile `value` üzerinden çalışır.
|
|
648
|
+
*/
|
|
649
|
+
class DateTimePicker extends ValueAccessorBase {
|
|
650
|
+
value = model(null, /* @ts-ignore */
|
|
651
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
652
|
+
min = input(null, /* @ts-ignore */
|
|
653
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
654
|
+
max = input(null, /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
656
|
+
minuteStep = input(5, /* @ts-ignore */
|
|
657
|
+
...(ngDevMode ? [{ debugName: "minuteStep" }] : /* istanbul ignore next */ []));
|
|
658
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
659
|
+
hasError = input(false, { ...(ngDevMode ? { debugName: "hasError" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
660
|
+
ariaLabel = input('', /* @ts-ignore */
|
|
661
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
662
|
+
labels = inject(MF_DATE_PICKER_LABELS);
|
|
663
|
+
dateLabel = computed(() => [this.ariaLabel(), this.labels().date].filter(Boolean).join(' — '), /* @ts-ignore */
|
|
664
|
+
...(ngDevMode ? [{ debugName: "dateLabel" }] : /* istanbul ignore next */ []));
|
|
665
|
+
timeLabel = computed(() => [this.ariaLabel(), this.labels().time].filter(Boolean).join(' — '), /* @ts-ignore */
|
|
666
|
+
...(ngDevMode ? [{ debugName: "timeLabel" }] : /* istanbul ignore next */ []));
|
|
667
|
+
time = computed(() => {
|
|
668
|
+
const v = this.value();
|
|
669
|
+
return v ? { hour: v.getHours(), minute: v.getMinutes() } : null;
|
|
670
|
+
}, /* @ts-ignore */
|
|
671
|
+
...(ngDevMode ? [{ debugName: "time" }] : /* istanbul ignore next */ []));
|
|
672
|
+
writeValue(value) {
|
|
673
|
+
this.value.set(value);
|
|
674
|
+
}
|
|
675
|
+
onDate(date) {
|
|
676
|
+
if (!date)
|
|
677
|
+
return this.commit(null);
|
|
678
|
+
const next = new Date(date);
|
|
679
|
+
const time = this.time();
|
|
680
|
+
next.setHours(time?.hour ?? 0, time?.minute ?? 0, 0, 0);
|
|
681
|
+
this.commit(next);
|
|
682
|
+
}
|
|
683
|
+
onTime(time) {
|
|
684
|
+
const base = this.value() ? new Date(this.value()) : new Date();
|
|
685
|
+
if (time)
|
|
686
|
+
base.setHours(time.hour, time.minute, 0, 0);
|
|
687
|
+
else
|
|
688
|
+
base.setHours(0, 0, 0, 0);
|
|
689
|
+
this.commit(base);
|
|
690
|
+
}
|
|
691
|
+
commit(value) {
|
|
692
|
+
this.value.set(value);
|
|
693
|
+
this.onChange(value);
|
|
694
|
+
this.onTouched();
|
|
695
|
+
}
|
|
696
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DateTimePicker, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
697
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: DateTimePicker, isStandalone: true, selector: "mf-date-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel() || null" }, classAttribute: "inline-flex flex-wrap items-center gap-2" }, providers: [
|
|
698
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateTimePicker), multi: true },
|
|
699
|
+
], exportAs: ["mfDateTimePicker"], usesInheritance: true, ngImport: i0, template: `
|
|
700
|
+
<mf-date-picker
|
|
701
|
+
class="min-w-40 flex-1"
|
|
702
|
+
[value]="value()"
|
|
703
|
+
(valueChange)="onDate($event)"
|
|
704
|
+
[min]="min()"
|
|
705
|
+
[max]="max()"
|
|
706
|
+
[disabled]="disabled()"
|
|
707
|
+
[hasError]="hasError()"
|
|
708
|
+
[ariaLabel]="dateLabel()"
|
|
709
|
+
/>
|
|
710
|
+
<mf-time-picker
|
|
711
|
+
class="w-32"
|
|
712
|
+
[value]="time()"
|
|
713
|
+
(valueChange)="onTime($event)"
|
|
714
|
+
[minuteStep]="minuteStep()"
|
|
715
|
+
[disabled]="disabled()"
|
|
716
|
+
[hasError]="hasError()"
|
|
717
|
+
[ariaLabel]="timeLabel()"
|
|
718
|
+
/>
|
|
719
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DatePicker, selector: "mf-date-picker", inputs: ["value", "min", "max", "locale", "labels", "disabled", "hasError", "ariaLabel"], outputs: ["valueChange"], exportAs: ["mfDatePicker"] }, { kind: "component", type: TimePicker, selector: "mf-time-picker", inputs: ["value", "minuteStep", "placeholder", "disabled", "hasError", "ariaLabel", "clearLabel"], outputs: ["valueChange"], exportAs: ["mfTimePicker"] }] });
|
|
720
|
+
}
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DateTimePicker, decorators: [{
|
|
722
|
+
type: Component,
|
|
723
|
+
args: [{
|
|
724
|
+
selector: 'mf-date-time-picker',
|
|
725
|
+
exportAs: 'mfDateTimePicker',
|
|
726
|
+
imports: [DatePicker, TimePicker],
|
|
727
|
+
host: {
|
|
728
|
+
role: 'group',
|
|
729
|
+
class: 'inline-flex flex-wrap items-center gap-2',
|
|
730
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
731
|
+
},
|
|
732
|
+
template: `
|
|
733
|
+
<mf-date-picker
|
|
734
|
+
class="min-w-40 flex-1"
|
|
735
|
+
[value]="value()"
|
|
736
|
+
(valueChange)="onDate($event)"
|
|
737
|
+
[min]="min()"
|
|
738
|
+
[max]="max()"
|
|
739
|
+
[disabled]="disabled()"
|
|
740
|
+
[hasError]="hasError()"
|
|
741
|
+
[ariaLabel]="dateLabel()"
|
|
742
|
+
/>
|
|
743
|
+
<mf-time-picker
|
|
744
|
+
class="w-32"
|
|
745
|
+
[value]="time()"
|
|
746
|
+
(valueChange)="onTime($event)"
|
|
747
|
+
[minuteStep]="minuteStep()"
|
|
748
|
+
[disabled]="disabled()"
|
|
749
|
+
[hasError]="hasError()"
|
|
750
|
+
[ariaLabel]="timeLabel()"
|
|
751
|
+
/>
|
|
752
|
+
`,
|
|
753
|
+
providers: [
|
|
754
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateTimePicker), multi: true },
|
|
755
|
+
],
|
|
756
|
+
}]
|
|
757
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
758
|
+
|
|
638
759
|
/**
|
|
639
760
|
* Generated bundle index. Do not edit.
|
|
640
761
|
*/
|
|
641
762
|
|
|
642
|
-
export { Calendar, DatePicker, DateRangePicker, buildMonthMatrix, dateRangeForPreset, formatDateInput, isCurrentMonth, isDayDisabled, isSameDay, isWithinRange, parseDateInput, shiftMonth, shiftYear };
|
|
763
|
+
export { Calendar, DatePicker, DateRangePicker, DateTimePicker, buildMonthMatrix, dateRangeForPreset, formatDateInput, isCurrentMonth, isDayDisabled, isSameDay, isWithinRange, parseDateInput, shiftMonth, shiftYear };
|
|
643
764
|
//# sourceMappingURL=mesgflow-ui-kit-date-picker.mjs.map
|