@feedmepos/ui-library 1.1.10 → 1.1.11

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.
Files changed (42) hide show
  1. package/dist/CHANGELOG.md +224 -0
  2. package/dist/components/table/FmTable.vue.d.ts +2 -0
  3. package/dist/components.d.ts +12 -0
  4. package/dist/federation/FmCard-BZ0FcVq9.css +1 -0
  5. package/dist/federation/FmDateRangePicker-CxYORlSU.css +1 -0
  6. package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-Bk1f_kci.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-Bf8Mt79p.js} +1 -1
  7. package/dist/federation/{FmPageHead.vue_vue_type_script_setup_true_lang-CF4F9loN.js → FmPageHead.vue_vue_type_script_setup_true_lang-ChbvwLwR.js} +1 -1
  8. package/dist/federation/{FmTable.vue_vue_type_script_setup_true_lang-BfFmftiV.js → FmTable.vue_vue_type_script_setup_true_lang-CzOruNvp.js} +2 -2
  9. package/dist/federation/{FmTimeInput-Cdvzl8q4.css → FmTimeInput-DaKOw7ho.css} +1 -1
  10. package/dist/federation/{FmTimePicker.vue_vue_type_script_setup_true_lang--sHF4oiY.js → FmTimePicker.vue_vue_type_script_setup_true_lang-DhNzYJJk.js} +1 -1
  11. package/dist/federation/{FmTimeRangePicker.vue_vue_type_script_setup_true_lang-CMsgFPZq.js → FmTimeRangePicker.vue_vue_type_script_setup_true_lang-CREfnRUR.js} +1 -1
  12. package/dist/federation/__federation_expose_FmBottomSheet-DyQ0AnqN.css +1 -0
  13. package/dist/federation/{__federation_expose_FmCard-B3B6q8jy.js → __federation_expose_FmCard-iOZ41Y07.js} +1 -1
  14. package/dist/federation/{__federation_expose_FmDateRangePicker-DI4G0Xfi.js → __federation_expose_FmDateRangePicker-a6DtekkW.js} +1 -1
  15. package/dist/federation/__federation_expose_FmDateRangePickerMobile-mbzJX3cD.css +1 -0
  16. package/dist/federation/{__federation_expose_FmPageHead-D-8mjr0d.js → __federation_expose_FmPageHead-uo1dSY3W.js} +1 -1
  17. package/dist/federation/__federation_expose_FmStepperField-B-QDTefh.js +1 -0
  18. package/dist/federation/__federation_expose_FmStepperField-BQAAKI90.css +1 -0
  19. package/dist/federation/{__federation_expose_FmTable-DIfaGkGn.js → __federation_expose_FmTable-BJIGEuoj.js} +1 -1
  20. package/dist/federation/{__federation_expose_FmTimeInput-BmCO-Bwf.js → __federation_expose_FmTimeInput-TRLKEJwb.js} +1 -1
  21. package/dist/federation/{__federation_expose_FmTimePicker-BmUuAlQC.js → __federation_expose_FmTimePicker-CoIFgyhU.js} +1 -1
  22. package/dist/federation/{__federation_expose_FmTimeRangePicker-DxTvTKaV.js → __federation_expose_FmTimeRangePicker-DL-egkOM.js} +1 -1
  23. package/dist/federation/feedmepos-ui-components.js +1 -1
  24. package/dist/federation/index-B-39eu1e.css +1 -0
  25. package/dist/federation/{index-DdUwSzNG.js → index-C5SxRZte.js} +1 -1
  26. package/dist/feedmepos-ui-library.js +1050 -1038
  27. package/dist/feedmepos-ui-library.umd.cjs +7 -7
  28. package/dist/style.css +1 -1
  29. package/dist/tailwind-plugin.js +3 -79
  30. package/dist/tailwind-styling.js +84 -0
  31. package/package.json +5 -3
  32. package/dist/federation/FmCard-DHu3aEvT.css +0 -1
  33. package/dist/federation/FmDateRangePicker-BHPjUZnK.css +0 -1
  34. package/dist/federation/__federation_expose_FmBottomSheet-DX32r2kn.css +0 -1
  35. package/dist/federation/__federation_expose_FmDateRangePickerMobile-DtTIszAU.css +0 -1
  36. package/dist/federation/__federation_expose_FmStepperField-BCRKf3vZ.js +0 -1
  37. package/dist/federation/__federation_expose_FmStepperField-Du0LmgDr.css +0 -1
  38. package/dist/federation/index-DIaLJHwM.css +0 -1
  39. /package/dist/federation/{FmCard.vue_vue_type_style_index_0_lang-B3oOaft-.js → FmCard.vue_vue_type_style_index_0_lang-Dg46TA3L.js} +0 -0
  40. /package/dist/federation/{FmTimeInput.vue_vue_type_style_index_0_lang-CaZ_N01a.js → FmTimeInput.vue_vue_type_style_index_0_lang-CNryvTZN.js} +0 -0
  41. /package/dist/federation/{__federation_expose_FmBottomSheet-B7QxLCBH.js → __federation_expose_FmBottomSheet-CchOQqTZ.js} +0 -0
  42. /package/dist/federation/{__federation_expose_FmDateRangePickerMobile-BHFsLcW_.js → __federation_expose_FmDateRangePickerMobile-D8eE9sp2.js} +0 -0
@@ -0,0 +1,224 @@
1
+ ## 1.1.11
2
+
3
+ ### Feature
4
+
5
+ - `FmTable`
6
+ - Add prop `forceMobileFooter` for Allow user to force the table footer persist on mobile layout
7
+
8
+ ### Bug fixes
9
+
10
+ - `FmStepperField`
11
+ - Fix the issue that the stepper field will not be disabled when it be set to disabled
12
+
13
+ ## 1.1.10
14
+
15
+ ### Feature
16
+
17
+ - `FmSimpleCalendar`
18
+ - Now it will forward the calendar to the endDate of the month when the user uses quick select
19
+ - `FmTable`
20
+ - Allow user assign className for row
21
+
22
+ ## 1.1.9
23
+
24
+ ### Feature
25
+
26
+ - `FmChip`
27
+ - Now support right side icon
28
+ - `FmSimpleCalendar`
29
+ - revert value when calendar close that due to user click outside
30
+ - Allow user to specify the default compare type
31
+
32
+ ## 1.1.6
33
+
34
+ ### Feature
35
+
36
+ - `FmTable`
37
+ - `shrink-at` accept false as a value to prevent the table from shrinking in any breakpoint
38
+ - adjust the footer to display well on mobile where the table are not allowed to shrink.
39
+ - `FmPopover`/`FmOverlay` related components
40
+ - Add `zIndex` prop to allow user to customize the z-index of the overlay
41
+ - `FmSimpleDatePicker`/`FmSimpleDateRangePicker`
42
+ - New component for handling date comparison separately.
43
+ - `FmSelect`
44
+ - Now select item accepts sublabel
45
+ - `FmSwitch`
46
+ - Remove `min-height`
47
+ - Update sublabel color
48
+ - `FmBar`/`FmLine`
49
+ - Add `hideXAxis`/`hideYAxis`/`hideLegend` props to hide the axis and legend
50
+
51
+ ## 1.1.5
52
+
53
+ - `FmPopover`
54
+ - v-click-outside is missing its functionality
55
+
56
+ ### Feature
57
+
58
+ - `FmCollapsibleTabs`
59
+ - new UI
60
+ - Ellipsis for tab label if it's over 2 lines
61
+ - `FmButton`
62
+ - Reduce size of the button
63
+ - `FmButtonGroup`
64
+ - Reduce size of the button
65
+ - `FmTooltip`
66
+ - Reduce size of the tooltip
67
+ - `FmTimePicker`/`FmDateTimePicker`
68
+ - allow user use customize `#trigger-button`
69
+
70
+ ### Bug fixes
71
+
72
+ - `FmBoottomSheet`
73
+ - Click the `arrow-back` button not trigger close;
74
+
75
+ ## 1.1.4
76
+
77
+ ### Feature
78
+
79
+ - `FmTable`
80
+ - when on viewport 'xs' or 'sm', renders table row into `FmList` with padding: 0
81
+ - specify different breakpoints with prop `<FmTable shrink-at="xs | sm | ..."`
82
+ - disable behaviour with prop `<FmTable shrink-at="0"`
83
+ - add `<template #table-row` to render custom table row
84
+ - add `<template #list-row` to render custom list row
85
+ - `useDialog`
86
+ - add `dismissAway` to close dialog on clicking overlay (`overlay` must be `true`)
87
+ - add `onClose` handler
88
+ - `FmMenu`
89
+ - add `stop-click-propagation` to avoid click to be propagated to parent component
90
+ - `FmPageHead`
91
+ - add `prepend` and `append` slot
92
+
93
+ ### Bug fixes
94
+
95
+ - `FmPopover`
96
+ - use `fixed` position strategy to avoid scrollbar by parent component
97
+ - `useSnackbar`
98
+ - render toast with z-index 10
99
+ - `FmTable`
100
+ - render pinned table header component after `<tbody>` to avoid using z-index
101
+ - show cursor pointer if `@row-click` is defined
102
+ - `FmTableToolbar`
103
+ - fix search button width
104
+ - fix extra spacing on action buttons
105
+ - `FmTable`
106
+ - stop propagation on row click
107
+ - `FmPageHead`
108
+ - fix padding
109
+ - `FmMenuItem`
110
+ - set max length to 240px
111
+ - `useDialog`
112
+ - use tertiary button variant on secondary action on default
113
+
114
+ ## 1.1.3
115
+
116
+ - `FmDatePicker` and `FmDateRangePicker`
117
+ - Add slot for calendar trigger button
118
+ - `FmSelect`
119
+ - Ellipsis displayValue when it's line over 2
120
+ - `FmSideSheet`
121
+ - accept `maxWidth` prop
122
+ - `FmCheckbox`, `FmRadio` and `FmSwitch`
123
+ - Reduce the gap between the label and the action box
124
+ - `FmMenuHeader`
125
+ - Reduce th spacing
126
+ - `FmBreadcrumb`
127
+ - Reduce the font size from 16px to 14px
128
+ - `FmStepperField`
129
+ - Reduce the size of the increment and decrement button
130
+ - `FmTable`
131
+ - Allow devs to decide whether to show the footer(pagination) or not
132
+ - Reduce the footer size and add a top border
133
+ - `FmForm`
134
+ - Add global disable props to disable all the fields in the form
135
+ - expose isSubmitting from ref
136
+
137
+ ## 1.1.2
138
+
139
+ - Export `FmTableToolbar`
140
+ - `FmTable`
141
+ - Reduce ceil height from 72px to 52px
142
+ - font size from 16px to 14px(Header and Cell)
143
+ - Background color of the header from #FFFFFF to #F9F9F9
144
+ - Allow row click event
145
+ - `Input`
146
+ - Reduce Y padding from 12px to 8px
147
+ - `FmMenuItem`
148
+ - reduce font size:
149
+ - label: 16px -> 14px
150
+ - sublabel: 14px -> 12px
151
+
152
+ ## 1.1.1
153
+
154
+ - Standardized `FmDialogContent` and use it for `FmDialog` and `useDialog`
155
+ - Highlighted the scroll behavior in `FmDialog` and `useDialog`
156
+ - Fixed `FmDatePicker` will off-screen when the boundary is closed to bottom but there is no enough space for top to
157
+ show the picker.
158
+ - Fixed the click propagation issue in `FmChip`
159
+ - Fixed the selection box in `FmTable` being re-rendered when the table is updated
160
+ - Now, the `FmRadio` can self-control its disable status even if the parent component changes the disable status
161
+ - Upgrade version for `Material Symbols` for supporting more icons
162
+
163
+ ## 1.1.0
164
+
165
+ ### Bug Fixes
166
+
167
+ - `FmStepperField` now truncates text when reaching max fraction digits specified
168
+ - Added icons to `FmDatePicker` and `FmDateRangePicker` fields
169
+ - Fixed `FmLabel` not showing tooltips when `info` prop is specified
170
+ - Fixed `FmFormGroup` and `FmLabel` not showing specified slots
171
+ - Fixed UI issues on `FmDynamicDialog` when content or footer is not specified
172
+ - Fixed focus issues on collapsible `FmSearch`
173
+ - Fixed disabled `FmMenu` from behaving incorrectly
174
+ - Color system is now updated with latest colors from design
175
+ - Fixed `FmSelect` extra spacing issues when label or helper is not specified
176
+ - Fixed missing flags on `FmPhoneNumber`
177
+ - Fixed `FmTable` not reflecting new column definitions changes
178
+ - Fixed `FmTable` item counts when manual pagination is used
179
+ - `FmTabs` will now always show selected item on the main bar (to improve visibility on selected item in the `More`
180
+ tabs)
181
+ - `FmPageHead` now correctly hides action button in mobile when no action is specified
182
+ - Fixed extra gaps for undefined slots/props including:
183
+ - Content and footer slots in `FmDialog` & `useDialog`
184
+ - Label and helper text slots in form fields
185
+ - Fixed fade in animation in `useDialog`
186
+ - Fixed dialog spacing when it occupies the whole width on mobile
187
+ - Fixed "More" button in `FmTab` to render children tab as submenu
188
+ - Fixed `label` and `helper` template not rendering in form field components
189
+ - Fixed country flags not rendering in `FmPhoneNumber`
190
+ - Fixed import statements in UI library package for better code editor integration
191
+ - Fixed collapsible `FmSearch` not focusing on text field on expand
192
+ - Fixed full screen heights in all sheets
193
+ - Fixed closing popover when opening other popover
194
+
195
+ ### Features
196
+
197
+ - `FmBadge` now supports custom class
198
+ - `FmTable` now supports loading state
199
+ - Added `FmTableToolbar` and `useTableFilter` utilities for table operations
200
+ - New component `FmCardActionArea` is added
201
+ - Updated dependencies
202
+ - UI Library is now running Vue `v3.4.21`
203
+ - Vite has been correctly updated to `v5.1.4` to align with Vue version requirement
204
+ - `FmDatePicker` and `FmDateRangePicker` now allows user to define `min` and `max` dates shown on matrices
205
+ - Added `pin-top` slot in `FmTable`
206
+ - Added ability to do nested rows in `FmTable`
207
+ - Active selected child in `FmTabs` will be made visible even if the child has been collapsed in the "More" tab
208
+ - `useProxiedModel` now use generics for better TS integration on selecting prop name to proxy
209
+
210
+ ## 1.0.1
211
+
212
+ ### Bug Fixes
213
+
214
+ - Fix `FmSelect` overflowing when list gets too long
215
+
216
+ ### Features
217
+
218
+ - Added ability to define `minFractionDigits` and `maxFractionDigits` to `FmStepperField` to define the max and min
219
+ number of fraction digits when user inputs
220
+
221
+ ## 1.0.0
222
+
223
+ - FeedMe UI Library released!
224
+
@@ -48,6 +48,8 @@ export interface FmTableProps {
48
48
  shrinkAt?: Breakpoints | number | false;
49
49
  /** Hide the footer(Pagination) */
50
50
  hideFooter?: boolean;
51
+ /** Force mobile footer */
52
+ forceMobileFooter?: boolean;
51
53
  }
52
54
  export interface FmTableSlots {
53
55
  /**
@@ -10434,6 +10434,9 @@ export declare const components: {
10434
10434
  hideFooter: {
10435
10435
  type: import("vue").PropType<boolean>;
10436
10436
  };
10437
+ forceMobileFooter: {
10438
+ type: import("vue").PropType<boolean>;
10439
+ };
10437
10440
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
10438
10441
  modelValue: {
10439
10442
  type: import("vue").PropType<any>;
@@ -10500,6 +10503,9 @@ export declare const components: {
10500
10503
  hideFooter: {
10501
10504
  type: import("vue").PropType<boolean>;
10502
10505
  };
10506
+ forceMobileFooter: {
10507
+ type: import("vue").PropType<boolean>;
10508
+ };
10503
10509
  }>>, {
10504
10510
  modelValue: any;
10505
10511
  loading: boolean;
@@ -10588,6 +10594,9 @@ export declare const components: {
10588
10594
  hideFooter: {
10589
10595
  type: import("vue").PropType<boolean>;
10590
10596
  };
10597
+ forceMobileFooter: {
10598
+ type: import("vue").PropType<boolean>;
10599
+ };
10591
10600
  }>>, {}, {}, {}, {}, {
10592
10601
  modelValue: any;
10593
10602
  loading: boolean;
@@ -10673,6 +10682,9 @@ export declare const components: {
10673
10682
  hideFooter: {
10674
10683
  type: import("vue").PropType<boolean>;
10675
10684
  };
10685
+ forceMobileFooter: {
10686
+ type: import("vue").PropType<boolean>;
10687
+ };
10676
10688
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
10677
10689
  modelValue: any;
10678
10690
  loading: boolean;
@@ -0,0 +1 @@
1
+ .container{width:100%}@media (min-width: 0px){.container{max-width:0px}}@media (min-width: 648px){.container{max-width:648px}}@media (min-width: 960px){.container{max-width:960px}}@media (min-width: 1248px){.container{max-width:1248px}}.fm-typo-display-sm-700{font-size:2.25rem;font-weight:700;line-height:2.5rem;letter-spacing:.025em;text-decoration-line:none}.fm-typo-title-sm-700{font-size:1.375rem;font-weight:700;line-height:1.75rem;letter-spacing:.015em;text-decoration-line:none}.fm-typo-body-xl-700{font-size:1.125rem;font-weight:700;line-height:1.5rem;letter-spacing:.01em;text-decoration-line:none}.fm-typo-body-lg-700{font-size:1rem;font-weight:700;line-height:1.5rem;letter-spacing:.005em;text-decoration-line:none}.fm-typo-body-md-700{font-size:.875rem;font-weight:700;line-height:1.375rem;letter-spacing:.0125em;text-decoration-line:none}.fm-typo-body-sm-700{font-size:.75rem;font-weight:700;line-height:1.25rem;letter-spacing:.02em;text-decoration-line:none}.fm-typo-body-lg-400{font-size:1rem;font-weight:400;line-height:1.5rem;letter-spacing:-.005em;text-decoration-line:none}.fm-typo-body-md-400{font-size:.875rem;font-weight:400;line-height:1.375rem;letter-spacing:.01em;text-decoration-line:none}.fm-typo-body-sm-400{font-size:.75rem;font-weight:400;line-height:1.25rem;letter-spacing:.02em;text-decoration-line:none}.fm-shadow-light-100{box-shadow:0 1px 4px #1c1c1e3d}.fm-shadow-light-300{box-shadow:0 8px 16px #c7c7cc3d}.fm-shadow-light-400{box-shadow:0 16px 24px #c7c7cc3d}.fm-corner-radius-md{border-radius:8px}.fm-corner-radius-lg{border-radius:16px}.border-1{border-width:1px}.fm-card--elevated{border-radius:16px;height:-moz-fit-content;height:fit-content;overflow:hidden;background-color:var(--fm-color-neutral-white);box-shadow:0 8px 16px #c7c7cc3d}.fm-card--flat{border-radius:16px;height:-moz-fit-content;height:fit-content;overflow:hidden;background-color:var(--fm-color-neutral-white)}.fm-card--outlined{border-radius:16px;height:-moz-fit-content;height:fit-content;overflow:hidden;background-color:var(--fm-color-neutral-white);border-width:1px;border-color:var(--fm-color-neutral-gray-200)}.fm-card--horizontal{display:flex}.fm-card__header{display:flex;align-items:center;justify-content:space-between}.fm-card__title{font-size:1.125rem;font-weight:700;line-height:1.5rem;letter-spacing:.01em;text-decoration-line:none;color:var(--fm-color-neutral-gray-500)}.fm-card__title--disabled{color:var(--fm-color-neutral-gray-200)}.fm-card__subtitle{font-size:.75rem;font-weight:400;line-height:1.25rem;letter-spacing:.02em;text-decoration-line:none;color:var(--fm-color-neutral-gray-400)}.fm-card__subtitle--disabled{color:var(--fm-color-neutral-gray-200)}.fm-card__section{padding:16px}.fm-card__section--disabled{color:var(--fm-color-neutral-gray-200)}.fm-card__actions{display:flex;align-items:center;gap:8px;justify-content:flex-end}
@@ -0,0 +1 @@
1
+ .fm-calendar__row[data-v-99b24dd6]{display:flex;height:48px;width:100%}.fm-calendar__cell[data-v-99b24dd6]{position:relative;display:flex;height:48px;width:48px;align-items:center;justify-content:center}.fm-calendar__cell__button[data-v-99b24dd6]{height:100%;width:100%;border-radius:9999px}.fm-calendar__cell__button--today[data-v-99b24dd6]{position:absolute;top:75%;left:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));width:16px;border-radius:8px;border-bottom-width:2px;border-color:var(--fm-color-primary)}.fm-calendar__cell__button[data-v-99b24dd6]:hover:not(.fm-calendar__cell__button--selected):not(.fm-calendar__cell__button--selected-start):not(.fm-calendar__cell__button--selected-between):not(.fm-calendar__cell__button--selected-end){border-radius:9999px;background-color:var(--fm-color-opacity-sm)}.fm-calendar__cell__button--selected[data-v-99b24dd6]{border-radius:50%!important;font-size:1rem;font-weight:700;line-height:1.5rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected[data-v-99b24dd6]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected[data-v-99b24dd6]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}.fm-calendar__cell__button--selected-start[data-v-99b24dd6]{border-radius:50%!important;position:relative;font-size:1rem;font-weight:700;line-height:1.5rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-start[data-v-99b24dd6]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}.fm-calendar__cell__button--selected-start[data-v-99b24dd6]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected-between[data-v-99b24dd6]{border-radius:0}.fm-calendar__cell__button--selected-end[data-v-99b24dd6]{position:relative;border-radius:50%!important;font-size:1rem;font-weight:700;line-height:1.5rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-end[data-v-99b24dd6]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected-end[data-v-99b24dd6]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}
@@ -1 +1 @@
1
- import{importShared as E,__tla as Ca}from"./__federation_fn_import-Batzb-of.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as fa,g as ca}from"./helper-Dphf0qEj.js";import va,{__tla as Ba}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import pa,{__tla as Va}from"./__federation_expose_FmButton-CO9YzlBI.js";import{u as ya,__tla as Pa}from"./useProxiedModel-Cil0ZKGg.js";import{_ as Sa,__tla as Oa}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-Boyrt75g.js";import F,{__tla as $a}from"./__federation_expose_FmField-WMUKa3rp.js";import{F as Aa,__tla as La}from"./FmPopover-XMGxVlFW.js";import{_ as q,u as Ra,__tla as Ta}from"./useInheritFormState-DWCWyTcH.js";import ba,{__tla as za}from"./__federation_expose_FmMenuItem-BTIAdufm.js";import{_ as Ia,__tla as Ua}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-4wjuOaml.js";import Ea,{__tla as Fa}from"./__federation_expose_FmSwitch-D3FkSHma.js";import{_ as ne,__tla as ja}from"./FmLabel.vue_vue_type_script_setup_true_lang-DMTUDr17.js";import Na,{C as O,__tla as Wa}from"./__federation_expose_FmDateRangePickerMobile-BHFsLcW_.js";import{i as w}from"./helpers-D8-zcjH0.js";import{_ as Ja}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Ka,__tla as qa}from"./useBreakpoints-izwSA5B6.js";let Da,Ga=Promise.all([(()=>{try{return Ca}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let ue,p,ie,_a,C,me,g,D,_,u,y,v,i,f,x,B,G,fe,ce,ve,pe,H,ye,be,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Se,Oe,$e,Ae,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,j,V,We,Je,Ke,qe,P,Q,X,Z,ee,ae,te,le,N,re,oe,Ge,He;({defineComponent:ue}=await E("vue")),{unref:p,normalizeProps:ie,guardReactiveProps:_a,renderSlot:C,mergeProps:me,createCommentVNode:g,toDisplayString:D,normalizeClass:_,createElementVNode:u,withCtx:y,createVNode:v,openBlock:i,createElementBlock:f,Fragment:x,renderList:B,createBlock:G,isRef:fe,createSlots:ce,pushScopeId:ve,popScopeId:pe}=await E("vue"),H=A=>(ve("data-v-99b24dd6"),A=A(),pe(),A),ye={key:0,class:"flex gap-4 items-center relative w-full"},be={class:"flex flex-col gap-4 w-full"},De=H(()=>u("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),_e={class:"flex flex-col gap-4 w-full"},he={key:1,class:"flex flex-col gap-4 w-full"},ge={class:"flex gap-4 p-12"},Ye={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},xe={key:0,class:"px-8"},ke={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},we={class:"flex flex-col gap-24"},Me={key:0,class:"flex gap-4 items-center px-12 w-full"},Ce={class:"flex flex-col gap-4 w-full"},Be=H(()=>u("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ve={class:"flex flex-col gap-4 w-full"},Pe={class:"flex gap-24"},Se={class:"w-max"},Oe={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},$e={class:"flex gap-4 items-center"},Ae={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Le={class:"h-[288px]"},Re={key:0,class:"fm-calendar__cell__button--today"},Te=["onClick","onMouseover"],ze={class:"w-max"},Ie={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Ue={class:"flex gap-4 items-center"},Ee={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Fe={key:0,class:"fm-calendar__cell__button--today"},je=["onClick","onMouseover"],Ne={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:j,ref:V,watch:We}=await E("vue"),Je=ue({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(A){var ea,aa;const R=[{id:O.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{S.value=O.PrecedingPeriod;const e=o.value;if(e[0].startDate&&e[0].endDate){const a=e[0].startDate.diff(e[0].endDate,"day");e[1]={startDate:e[0].startDate.subtract(+(1-a),"day"),endDate:e[0].startDate.subtract(1,"day")}}}},{id:O.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{S.value=O.PrecedingWeek;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"week");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"week"),endDate:e[0].endDate.subtract(a,"week")}}}},{id:O.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{S.value=O.PrecedingMonth;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"month");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"month"),endDate:e[0].endDate.subtract(a,"month")}}}},{id:O.Custom,label:"Custom",sublabel:"",action:()=>{S.value=O.Custom}}],h=A,k=r(),d=ya(h,"modelValue"),o=V([{startDate:(ea=d.value)!=null&&ea.startDate?r(d.value.startDate,s):null,endDate:(aa=d.value)!=null&&aa.endDate?r(d.value.endDate,s):null},{startDate:null,endDate:null}]),b=V(!1),c=V(!1),S=V(""),L=V(r().startOf("month")),z=V(r().startOf("month").add(1,"month")),se=V(""),de=V(null);let Y=0;const Qe=e=>{var a;if(se.value="",o.value[Y].startDate&&o.value[Y].endDate){Y===1&&(o.value=o.value.map(()=>({startDate:null,endDate:null})),Y=0),o.value[0]={startDate:e,endDate:null};return}else if(!o.value[Y].startDate&&!o.value[Y].endDate)o.value[Y].startDate=e;else{if(e.isBefore(o.value[Y].startDate)){const n=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:n}}else o.value[Y].endDate=e;c.value&&(Y=1),R.find(n=>n.id===S.value)||(S.value=O.Custom)}(a=R.find(n=>n.id===S.value))==null||a.action()},ha=()=>{c.value?d.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):d.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{b.value=!1})},ga=()=>{var e,a;Array.isArray(d.value)?o.value=d.value:o.value[0]={startDate:(e=d.value)!=null&&e.startDate?r(d.value.startDate,s):null,endDate:(a=d.value)!=null&&a.endDate?r(d.value.endDate,s):null},b.value=!1},T=(e,a)=>{e==="left"?(L.value=a,z.value=a.add(1,"month")):e==="right"&&(z.value=a,L.value=a.subtract(1,"month"))},Xe=e=>{const a=o.value[0].startDate,n=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=de.value,M=a==null?void 0:a.isSame(e),I=n==null?void 0:n.isSame(e),$=t==null?void 0:t.isSame(e),U=m==null?void 0:m.isSame(e),J=l==null?void 0:l.isSame(e),ta=M&&n&&!(M&&I)||a&&!n&&M&&(l==null?void 0:l.isAfter(a))||a&&!n&&J&&(l==null?void 0:l.isBefore(a)),la=$&&m&&!($&&U)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&J&&(l==null?void 0:l.isBefore(t)),ra=I&&a&&!(M&&I)||a&&!n&&M&&(l==null?void 0:l.isBefore(a))||a&&!n&&J&&(l==null?void 0:l.isAfter(a)),oa=U&&t&&!($&&U)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&J&&(l==null?void 0:l.isAfter(t)),sa=M&&I||M&&!n,da=$&&U||$&&!m,na=a&&(n||l)&&n?e.isAfter(a)&&e.isBefore(n):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),ua=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),K=()=>{if(o.value.filter(ia=>{var ma;for(const Ma in ia)if((ma=ia[Ma])!=null&&ma.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(M&&I&&(w(e,t,m)||w(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&U&&(w(e,a,n)||w(e,a,l)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(ta||ra)return w(e,t,m)||w(e,t,l)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(la||oa)return w(e,a,n)||w(e,a,l)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(sa)return"bg-fm-color-primary";if(da)return"bg-fm-color-system-info-300";if(w(e,a,n)&&(w(e,t,m)||w(e,t,l)))return"bg-fm-color-system-success-100";if(na)return"bg-fm-color-system-warning-100";if(ua)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${K()}`]:ta||la,[`fm-calendar__cell__button--selected-end ${K()}`]:ra||oa,[`fm-calendar__cell__button--selected-between ${K()}`]:na||ua,[`fm-calendar__cell__button--selected ${K()}`]:sa||da}},Ze=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){de.value=e;return}de.value=null},Ya=e=>{se.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},xa=j(()=>c.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),ka=e=>{S.value="",c.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},W=j(()=>{if(!d.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=c.value&&Array.isArray(d.value)?d.value[0].startDate:d.value.startDate,a=c.value&&Array.isArray(d.value)?d.value[0].endDate:d.value.endDate;return{startDate:e?r(e).format("D MMM YYYY"):"DD MM YYYY",endDate:a?r(a).format("D MMM YYYY"):"DD MM YYYY"}}),wa=j(()=>{const e=c.value&&Array.isArray(d.value)?d.value[1].startDate:null,a=c.value&&Array.isArray(d.value)?d.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return We(()=>d.value,()=>{var e,a;c.value?o.value=d.value.map(n=>({startDate:n!=null&&n.startDate?r(n.startDate,s):null,endDate:n!=null&&n.endDate?r(n.endDate,s):null})):o.value[0]={startDate:(e=d.value)!=null&&e.startDate?r(d.value.startDate,s):null,endDate:(a=d.value)!=null&&a.endDate?r(d.value.endDate,s):null}}),(e,a)=>(i(),G(Sa,{modelValue:p(d),"onUpdate:modelValue":a[8]||(a[8]=n=>fe(d)?d.value=n:null),disabled:e.disabled,focused:b.value,"helper-state":e.helperState,"helper-text":c.value?wa.value:e.helperText,rules:e.rules,tag:"div"},ce({default:y(({invalid:n})=>[v(Aa,{disabled:e.disabled,"show-popover":b.value,"z-index":h.zIndex,onPopoverChanged:a[7]||(a[7]=t=>b.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?C(e.$slots,"trigger-button",ie(me({key:0},{opened:b.value,invalid:n,showValidBorder:e.showValidBorder,isComparing:c.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?g("",!0):(i(),f("div",ye,[u("label",be,[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D(h.startLabel),3),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,"icon-outlined":!b.value,invalid:n,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D((t=p(d))!=null&&t.startDate?p(r)(p(d).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])]),De,u("label",_e,[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D(h.endLabel),3),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,"icon-outlined":!b.value,invalid:n,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled":W.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D((t=p(d))!=null&&t.endDate?p(r)(p(d).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",he,[v(ne,{label:e.compareLabel},null,8,["label"]),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,invalid:n,"show-valid-border":e.showValidBorder},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled":W.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(W.value.startDate)+" - "+D(W.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):g("",!0)],64))]),default:y(()=>[u("div",ge,[e.showPredefinedRange?(i(),f("div",Ye,[(i(!0),f(x,null,B(e.predefinedRange,(t,m)=>(i(),G(ba,{key:m,label:t.label,"model-value":se.value===t.label,selectable:"",onClick:l=>Ya(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",xe,[v(Ia,{inset:""})])):g("",!0),e.compare?(i(),f(x,{key:1},[v(Ea,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>ka(t))},null,8,["model-value"]),c.value?(i(),f(x,{key:0},B(R,(t,m)=>v(ba,{key:m,label:t.label,"model-value":S.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):g("",!0)],64)):g("",!0)])):g("",!0),e.showPredefinedRange?(i(),f("div",ke)):g("",!0),u("div",{class:_({"pl-4":e.showPredefinedRange})},[u("div",we,[c.value?(i(),f("div",Me,[u("label",Ce,[v(ne,{label:"Custom"}),v(F,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:_([[(t=o.value[0])!=null&&t.startDate&&((m=o.value[0])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+D(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Be,u("label",Ve,[v(ne,{label:"Compare"}),v(F,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:_([[(t=o.value[1])!=null&&t.startDate&&((m=o.value[1])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+D(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):g("",!0),u("div",Pe,[u("div",Se,[u("div",Oe,[u("div",$e,[v(va,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>T("left",L.value.subtract(1,"month")))}),v(q,{max:e.max,min:e.min,"model-value":L.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>T("left",t))},null,8,["max","min","model-value"]),v(q,{max:e.max,min:e.min,"model-value":L.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>T("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Ae,[(i(!0),f(x,null,B(p(fa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},D(t),1))),128))]),u("div",Le,[(i(!0),f(x,null,B(p(ca)(L.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-body-lg-400"},[(i(!0),f(x,null,B(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(k),"day")&&l.isCurrentMonth?(i(),f("div",Re)):g("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:_([[Xe(l.date),{"fm-typo-body-lg-700":l.date.isSame(p(k),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>Qe(l.date),onMouseover:M=>Ze(l.date)},D(l.date.date()),43,Te)):g("",!0)]))),128))]))),128))])])]),u("div",ze,[u("div",Ie,[u("div",Ue,[v(q,{max:e.max,min:e.min,"model-value":z.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>T("right",t))},null,8,["max","min","model-value"]),v(q,{max:e.max,min:e.min,"model-value":z.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>T("right",t))},null,8,["max","min","model-value"])]),v(va,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>T("left",L.value.add(1,"month")))})]),u("div",null,[u("div",Ee,[(i(!0),f(x,null,B(p(fa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},D(t),1))),128))]),u("div",null,[(i(!0),f(x,null,B(p(ca)(z.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-body-lg-400"},[(i(!0),f(x,null,B(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(k),"day")&&l.isCurrentMonth?(i(),f("div",Fe)):g("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:_([[Xe(l.date),{"fm-typo-body-lg-700":l.date.isSame(p(k),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>Qe(l.date),onMouseover:M=>Ze(l.date)},D(l.date.date()),43,je)):g("",!0)]))),128))]))),128))])])])])]),u("div",Ne,[v(pa,{label:"Cancel",size:"md",variant:"tertiary",onClick:ga}),v(pa,{disabled:xa.value,label:"Apply",size:"md",variant:"primary",onClick:ha},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[C(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ja(Je,[["__scopeId","data-v-99b24dd6"]]),{defineComponent:qe}=await E("vue"),{unref:P,normalizeProps:Q,guardReactiveProps:X,renderSlot:Z,isRef:ee,mergeProps:ae,withCtx:te,createSlots:le,openBlock:N,createBlock:re,createCommentVNode:oe,Fragment:Ge,createElementBlock:He}=await E("vue"),Da=qe({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(A){const R=A,{breakpoints:h}=Ka(),k=ya(R,"modelValue"),d=Ra(R);return(o,b)=>(N(),He(Ge,null,[P(h).md||P(h).lg?(N(),re(Ke,ae({key:0},P(d),{modelValue:P(k),"onUpdate:modelValue":b[0]||(b[0]=c=>ee(k)?k.value=c:null)}),le({_:2},[o.$slots["trigger-button"]?{name:"trigger-button",fn:te(c=>[Z(o.$slots,"trigger-button",Q(X(c)))]),key:"0"}:void 0]),1040,["modelValue"])):oe("",!0),P(h).xs||P(h).sm?(N(),re(Na,ae({key:1},P(d),{modelValue:P(k),"onUpdate:modelValue":b[1]||(b[1]=c=>ee(k)?k.value=c:null)}),le({_:2},[o.$slots["trigger-button"]?{name:"trigger-button",fn:te(c=>[Z(o.$slots,"trigger-button",Q(X(c)))]),key:"0"}:void 0]),1040,["modelValue"])):oe("",!0)],64))}})});export{Da as _,Ga as __tla};
1
+ import{importShared as E,__tla as Ca}from"./__federation_fn_import-Batzb-of.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as fa,g as ca}from"./helper-Dphf0qEj.js";import va,{__tla as Ba}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import pa,{__tla as Va}from"./__federation_expose_FmButton-CO9YzlBI.js";import{u as ya,__tla as Pa}from"./useProxiedModel-Cil0ZKGg.js";import{_ as Sa,__tla as Oa}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-Boyrt75g.js";import F,{__tla as $a}from"./__federation_expose_FmField-WMUKa3rp.js";import{F as Aa,__tla as La}from"./FmPopover-XMGxVlFW.js";import{_ as q,u as Ra,__tla as Ta}from"./useInheritFormState-DWCWyTcH.js";import ba,{__tla as za}from"./__federation_expose_FmMenuItem-BTIAdufm.js";import{_ as Ia,__tla as Ua}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-4wjuOaml.js";import Ea,{__tla as Fa}from"./__federation_expose_FmSwitch-D3FkSHma.js";import{_ as ne,__tla as ja}from"./FmLabel.vue_vue_type_script_setup_true_lang-DMTUDr17.js";import Na,{C as O,__tla as Wa}from"./__federation_expose_FmDateRangePickerMobile-D8eE9sp2.js";import{i as w}from"./helpers-D8-zcjH0.js";import{_ as Ja}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Ka,__tla as qa}from"./useBreakpoints-izwSA5B6.js";let Da,Ga=Promise.all([(()=>{try{return Ca}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let ue,p,ie,_a,C,me,g,D,_,u,y,v,i,f,x,B,G,fe,ce,ve,pe,H,ye,be,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Se,Oe,$e,Ae,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,j,V,We,Je,Ke,qe,P,Q,X,Z,ee,ae,te,le,N,re,oe,Ge,He;({defineComponent:ue}=await E("vue")),{unref:p,normalizeProps:ie,guardReactiveProps:_a,renderSlot:C,mergeProps:me,createCommentVNode:g,toDisplayString:D,normalizeClass:_,createElementVNode:u,withCtx:y,createVNode:v,openBlock:i,createElementBlock:f,Fragment:x,renderList:B,createBlock:G,isRef:fe,createSlots:ce,pushScopeId:ve,popScopeId:pe}=await E("vue"),H=A=>(ve("data-v-99b24dd6"),A=A(),pe(),A),ye={key:0,class:"flex gap-4 items-center relative w-full"},be={class:"flex flex-col gap-4 w-full"},De=H(()=>u("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),_e={class:"flex flex-col gap-4 w-full"},he={key:1,class:"flex flex-col gap-4 w-full"},ge={class:"flex gap-4 p-12"},Ye={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},xe={key:0,class:"px-8"},ke={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},we={class:"flex flex-col gap-24"},Me={key:0,class:"flex gap-4 items-center px-12 w-full"},Ce={class:"flex flex-col gap-4 w-full"},Be=H(()=>u("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ve={class:"flex flex-col gap-4 w-full"},Pe={class:"flex gap-24"},Se={class:"w-max"},Oe={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},$e={class:"flex gap-4 items-center"},Ae={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Le={class:"h-[288px]"},Re={key:0,class:"fm-calendar__cell__button--today"},Te=["onClick","onMouseover"],ze={class:"w-max"},Ie={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Ue={class:"flex gap-4 items-center"},Ee={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Fe={key:0,class:"fm-calendar__cell__button--today"},je=["onClick","onMouseover"],Ne={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:j,ref:V,watch:We}=await E("vue"),Je=ue({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(A){var ea,aa;const R=[{id:O.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{S.value=O.PrecedingPeriod;const e=o.value;if(e[0].startDate&&e[0].endDate){const a=e[0].startDate.diff(e[0].endDate,"day");e[1]={startDate:e[0].startDate.subtract(+(1-a),"day"),endDate:e[0].startDate.subtract(1,"day")}}}},{id:O.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{S.value=O.PrecedingWeek;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"week");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"week"),endDate:e[0].endDate.subtract(a,"week")}}}},{id:O.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{S.value=O.PrecedingMonth;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"month");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"month"),endDate:e[0].endDate.subtract(a,"month")}}}},{id:O.Custom,label:"Custom",sublabel:"",action:()=>{S.value=O.Custom}}],h=A,k=r(),d=ya(h,"modelValue"),o=V([{startDate:(ea=d.value)!=null&&ea.startDate?r(d.value.startDate,s):null,endDate:(aa=d.value)!=null&&aa.endDate?r(d.value.endDate,s):null},{startDate:null,endDate:null}]),b=V(!1),c=V(!1),S=V(""),L=V(r().startOf("month")),z=V(r().startOf("month").add(1,"month")),se=V(""),de=V(null);let Y=0;const Qe=e=>{var a;if(se.value="",o.value[Y].startDate&&o.value[Y].endDate){Y===1&&(o.value=o.value.map(()=>({startDate:null,endDate:null})),Y=0),o.value[0]={startDate:e,endDate:null};return}else if(!o.value[Y].startDate&&!o.value[Y].endDate)o.value[Y].startDate=e;else{if(e.isBefore(o.value[Y].startDate)){const n=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:n}}else o.value[Y].endDate=e;c.value&&(Y=1),R.find(n=>n.id===S.value)||(S.value=O.Custom)}(a=R.find(n=>n.id===S.value))==null||a.action()},ha=()=>{c.value?d.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):d.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{b.value=!1})},ga=()=>{var e,a;Array.isArray(d.value)?o.value=d.value:o.value[0]={startDate:(e=d.value)!=null&&e.startDate?r(d.value.startDate,s):null,endDate:(a=d.value)!=null&&a.endDate?r(d.value.endDate,s):null},b.value=!1},T=(e,a)=>{e==="left"?(L.value=a,z.value=a.add(1,"month")):e==="right"&&(z.value=a,L.value=a.subtract(1,"month"))},Xe=e=>{const a=o.value[0].startDate,n=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=de.value,M=a==null?void 0:a.isSame(e),I=n==null?void 0:n.isSame(e),$=t==null?void 0:t.isSame(e),U=m==null?void 0:m.isSame(e),J=l==null?void 0:l.isSame(e),ta=M&&n&&!(M&&I)||a&&!n&&M&&(l==null?void 0:l.isAfter(a))||a&&!n&&J&&(l==null?void 0:l.isBefore(a)),la=$&&m&&!($&&U)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&J&&(l==null?void 0:l.isBefore(t)),ra=I&&a&&!(M&&I)||a&&!n&&M&&(l==null?void 0:l.isBefore(a))||a&&!n&&J&&(l==null?void 0:l.isAfter(a)),oa=U&&t&&!($&&U)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&J&&(l==null?void 0:l.isAfter(t)),sa=M&&I||M&&!n,da=$&&U||$&&!m,na=a&&(n||l)&&n?e.isAfter(a)&&e.isBefore(n):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),ua=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),K=()=>{if(o.value.filter(ia=>{var ma;for(const Ma in ia)if((ma=ia[Ma])!=null&&ma.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(M&&I&&(w(e,t,m)||w(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&U&&(w(e,a,n)||w(e,a,l)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(ta||ra)return w(e,t,m)||w(e,t,l)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(la||oa)return w(e,a,n)||w(e,a,l)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(sa)return"bg-fm-color-primary";if(da)return"bg-fm-color-system-info-300";if(w(e,a,n)&&(w(e,t,m)||w(e,t,l)))return"bg-fm-color-system-success-100";if(na)return"bg-fm-color-system-warning-100";if(ua)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${K()}`]:ta||la,[`fm-calendar__cell__button--selected-end ${K()}`]:ra||oa,[`fm-calendar__cell__button--selected-between ${K()}`]:na||ua,[`fm-calendar__cell__button--selected ${K()}`]:sa||da}},Ze=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){de.value=e;return}de.value=null},Ya=e=>{se.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},xa=j(()=>c.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),ka=e=>{S.value="",c.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},W=j(()=>{if(!d.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=c.value&&Array.isArray(d.value)?d.value[0].startDate:d.value.startDate,a=c.value&&Array.isArray(d.value)?d.value[0].endDate:d.value.endDate;return{startDate:e?r(e).format("D MMM YYYY"):"DD MM YYYY",endDate:a?r(a).format("D MMM YYYY"):"DD MM YYYY"}}),wa=j(()=>{const e=c.value&&Array.isArray(d.value)?d.value[1].startDate:null,a=c.value&&Array.isArray(d.value)?d.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return We(()=>d.value,()=>{var e,a;c.value?o.value=d.value.map(n=>({startDate:n!=null&&n.startDate?r(n.startDate,s):null,endDate:n!=null&&n.endDate?r(n.endDate,s):null})):o.value[0]={startDate:(e=d.value)!=null&&e.startDate?r(d.value.startDate,s):null,endDate:(a=d.value)!=null&&a.endDate?r(d.value.endDate,s):null}}),(e,a)=>(i(),G(Sa,{modelValue:p(d),"onUpdate:modelValue":a[8]||(a[8]=n=>fe(d)?d.value=n:null),disabled:e.disabled,focused:b.value,"helper-state":e.helperState,"helper-text":c.value?wa.value:e.helperText,rules:e.rules,tag:"div"},ce({default:y(({invalid:n})=>[v(Aa,{disabled:e.disabled,"show-popover":b.value,"z-index":h.zIndex,onPopoverChanged:a[7]||(a[7]=t=>b.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?C(e.$slots,"trigger-button",ie(me({key:0},{opened:b.value,invalid:n,showValidBorder:e.showValidBorder,isComparing:c.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?g("",!0):(i(),f("div",ye,[u("label",be,[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D(h.startLabel),3),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,"icon-outlined":!b.value,invalid:n,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D((t=p(d))!=null&&t.startDate?p(r)(p(d).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])]),De,u("label",_e,[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},D(h.endLabel),3),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,"icon-outlined":!b.value,invalid:n,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled":W.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D((t=p(d))!=null&&t.endDate?p(r)(p(d).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",he,[v(ne,{label:e.compareLabel},null,8,["label"]),v(F,{class:_(e.disabled?"cursor-not-allowed":"cursor-pointer"),focused:b.value,invalid:n,"show-valid-border":e.showValidBorder},{prepend:y(()=>[C(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[C(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:_([[h.disabled?"text-fm-color-typo-disabled":W.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(W.value.startDate)+" - "+D(W.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):g("",!0)],64))]),default:y(()=>[u("div",ge,[e.showPredefinedRange?(i(),f("div",Ye,[(i(!0),f(x,null,B(e.predefinedRange,(t,m)=>(i(),G(ba,{key:m,label:t.label,"model-value":se.value===t.label,selectable:"",onClick:l=>Ya(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",xe,[v(Ia,{inset:""})])):g("",!0),e.compare?(i(),f(x,{key:1},[v(Ea,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>ka(t))},null,8,["model-value"]),c.value?(i(),f(x,{key:0},B(R,(t,m)=>v(ba,{key:m,label:t.label,"model-value":S.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):g("",!0)],64)):g("",!0)])):g("",!0),e.showPredefinedRange?(i(),f("div",ke)):g("",!0),u("div",{class:_({"pl-4":e.showPredefinedRange})},[u("div",we,[c.value?(i(),f("div",Me,[u("label",Ce,[v(ne,{label:"Custom"}),v(F,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:_([[(t=o.value[0])!=null&&t.startDate&&((m=o.value[0])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+D(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Be,u("label",Ve,[v(ne,{label:"Compare"}),v(F,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:_([[(t=o.value[1])!=null&&t.startDate&&((m=o.value[1])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},D(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+D(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):g("",!0),u("div",Pe,[u("div",Se,[u("div",Oe,[u("div",$e,[v(va,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>T("left",L.value.subtract(1,"month")))}),v(q,{max:e.max,min:e.min,"model-value":L.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>T("left",t))},null,8,["max","min","model-value"]),v(q,{max:e.max,min:e.min,"model-value":L.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>T("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Ae,[(i(!0),f(x,null,B(p(fa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},D(t),1))),128))]),u("div",Le,[(i(!0),f(x,null,B(p(ca)(L.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-body-lg-400"},[(i(!0),f(x,null,B(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(k),"day")&&l.isCurrentMonth?(i(),f("div",Re)):g("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:_([[Xe(l.date),{"fm-typo-body-lg-700":l.date.isSame(p(k),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>Qe(l.date),onMouseover:M=>Ze(l.date)},D(l.date.date()),43,Te)):g("",!0)]))),128))]))),128))])])]),u("div",ze,[u("div",Ie,[u("div",Ue,[v(q,{max:e.max,min:e.min,"model-value":z.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>T("right",t))},null,8,["max","min","model-value"]),v(q,{max:e.max,min:e.min,"model-value":z.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>T("right",t))},null,8,["max","min","model-value"])]),v(va,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>T("left",L.value.add(1,"month")))})]),u("div",null,[u("div",Ee,[(i(!0),f(x,null,B(p(fa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},D(t),1))),128))]),u("div",null,[(i(!0),f(x,null,B(p(ca)(z.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-body-lg-400"},[(i(!0),f(x,null,B(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(k),"day")&&l.isCurrentMonth?(i(),f("div",Fe)):g("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:_([[Xe(l.date),{"fm-typo-body-lg-700":l.date.isSame(p(k),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>Qe(l.date),onMouseover:M=>Ze(l.date)},D(l.date.date()),43,je)):g("",!0)]))),128))]))),128))])])])])]),u("div",Ne,[v(pa,{label:"Cancel",size:"md",variant:"tertiary",onClick:ga}),v(pa,{disabled:xa.value,label:"Apply",size:"md",variant:"primary",onClick:ha},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[C(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ja(Je,[["__scopeId","data-v-99b24dd6"]]),{defineComponent:qe}=await E("vue"),{unref:P,normalizeProps:Q,guardReactiveProps:X,renderSlot:Z,isRef:ee,mergeProps:ae,withCtx:te,createSlots:le,openBlock:N,createBlock:re,createCommentVNode:oe,Fragment:Ge,createElementBlock:He}=await E("vue"),Da=qe({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(A){const R=A,{breakpoints:h}=Ka(),k=ya(R,"modelValue"),d=Ra(R);return(o,b)=>(N(),He(Ge,null,[P(h).md||P(h).lg?(N(),re(Ke,ae({key:0},P(d),{modelValue:P(k),"onUpdate:modelValue":b[0]||(b[0]=c=>ee(k)?k.value=c:null)}),le({_:2},[o.$slots["trigger-button"]?{name:"trigger-button",fn:te(c=>[Z(o.$slots,"trigger-button",Q(X(c)))]),key:"0"}:void 0]),1040,["modelValue"])):oe("",!0),P(h).xs||P(h).sm?(N(),re(Na,ae({key:1},P(d),{modelValue:P(k),"onUpdate:modelValue":b[1]||(b[1]=c=>ee(k)?k.value=c:null)}),le({_:2},[o.$slots["trigger-button"]?{name:"trigger-button",fn:te(c=>[Z(o.$slots,"trigger-button",Q(X(c)))]),key:"0"}:void 0]),1040,["modelValue"])):oe("",!0)],64))}})});export{Da as _,Ga as __tla};
@@ -1 +1 @@
1
- import{importShared as f,__tla as E}from"./__federation_fn_import-Batzb-of.js";import{_ as $,__tla as H}from"./FmStepHeader.vue_vue_type_script_setup_true_lang-CjQP1V_6.js";import i,{__tla as L}from"./__federation_expose_FmButton-CO9YzlBI.js";import T,{__tla as Q}from"./__federation_expose_FmMenu-esiKinsD.js";import U,{__tla as j}from"./__federation_expose_FmMenuItem-BTIAdufm.js";import q,{__tla as D}from"./__federation_expose_FmBottomSheet-B7QxLCBH.js";import G,{__tla as J}from"./__federation_expose_FmList-CKz9vvXV.js";import K,{__tla as O}from"./__federation_expose_FmListItem-DmFlS5BW.js";let M,R=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return j}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return O}catch{}})()]).then(async()=>{let h,o,n,r,m,d,v,_,u,s,b,A,S,w,x,C,I,g;({defineComponent:h}=await f("vue")),{openBlock:o,createBlock:n,createCommentVNode:r,renderSlot:m,createVNode:d,renderList:v,Fragment:_,createElementBlock:u,withCtx:s,createElementVNode:b,Teleport:A}=await f("vue"),S={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},w={class:"flex gap-4 items-center xs:hidden"},x={key:1,class:"hidden xs:flex"},C={class:"absolute bottom-16 hidden right-16 xs:inline"},{computed:I,ref:g}=await f("vue"),M=h({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["click:back","click:action"],setup(B,{emit:P}){const z=B,c=P,e=I(()=>{const l=[...z.actions],a=l.findIndex(p=>p.isPrimary),t=l[a],[k,F,...V]=l.filter((p,N)=>N!==a);return{primaryAction:t,firstSecondaryAction:k,secondSecondaryAction:F,showMoreSecondary:V,bottomSheetActions:l.filter(p=>!p.isPrimary),fabActions:l.filter(p=>p.isPrimary)}}),y=g(!1);return(l,a)=>(o(),u("div",S,[l.backButton?(o(),n(i,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=t=>c("click:back"))})):r("",!0),m(l.$slots,"prepend"),d($,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),b("div",w,[e.value.firstSecondaryAction?(o(),n(i,{key:0,label:e.value.firstSecondaryAction.label,"prepend-icon":e.value.firstSecondaryAction.prependIcon,"append-icon":e.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=t=>c("click:action",e.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.secondSecondaryAction?(o(),n(i,{key:1,label:e.value.secondSecondaryAction.label,"prepend-icon":e.value.secondSecondaryAction.prependIcon,"append-icon":e.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=t=>c("click:action",e.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.showMoreSecondary.length>1?(o(),n(T,{key:2},{"menu-button":s(()=>[d(i,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:s(()=>[(o(!0),u(_,null,v(e.value.showMoreSecondary,t=>(o(),n(U,{key:t.value,label:t.label,icon:t.prependIcon,onClick:k=>c("click:action",t.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):e.value.showMoreSecondary.length===1?(o(),n(i,{key:3,label:e.value.showMoreSecondary[0].label,"prepend-icon":e.value.showMoreSecondary[0].prependIcon,"append-icon":e.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=t=>c("click:action",e.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.primaryAction?(o(),n(i,{key:4,label:e.value.primaryAction.label,"prepend-icon":e.value.primaryAction.prependIcon,"append-icon":e.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=t=>c("click:action",e.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0)]),e.value.bottomSheetActions.length>0?(o(),u("div",x,[d(i,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=t=>y.value=!0)})])):r("",!0),m(l.$slots,"append"),(o(),n(A,{to:"body"},[d(q,{"model-value":y.value,"onUpdate:modelValue":a[6]||(a[6]=t=>y.value=t),"dismiss-away":"","z-index":z.zIndexForBottomSheet},{default:s(()=>[d(G,null,{default:s(()=>[(o(!0),u(_,null,v(e.value.bottomSheetActions,t=>(o(),n(K,{key:t.value,class:"hover:bg-fm-color-neutral-gray-100",label:t.label,onClick:k=>{c("click:action",t.value),y.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),b("div",C,[e.value.primaryAction?(o(),n(i,{key:0,class:"fm-shadow-light-100",label:e.value.primaryAction.label,"prepend-icon":e.value.primaryAction.prependIcon,"append-icon":e.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=t=>c("click:action",e.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0)])]))]))}})});export{M as _,R as __tla};
1
+ import{importShared as f,__tla as E}from"./__federation_fn_import-Batzb-of.js";import{_ as $,__tla as H}from"./FmStepHeader.vue_vue_type_script_setup_true_lang-CjQP1V_6.js";import i,{__tla as L}from"./__federation_expose_FmButton-CO9YzlBI.js";import T,{__tla as Q}from"./__federation_expose_FmMenu-esiKinsD.js";import U,{__tla as j}from"./__federation_expose_FmMenuItem-BTIAdufm.js";import q,{__tla as D}from"./__federation_expose_FmBottomSheet-CchOQqTZ.js";import G,{__tla as J}from"./__federation_expose_FmList-CKz9vvXV.js";import K,{__tla as O}from"./__federation_expose_FmListItem-DmFlS5BW.js";let M,R=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return j}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return O}catch{}})()]).then(async()=>{let h,o,n,r,m,d,v,_,u,s,b,A,S,w,x,C,I,g;({defineComponent:h}=await f("vue")),{openBlock:o,createBlock:n,createCommentVNode:r,renderSlot:m,createVNode:d,renderList:v,Fragment:_,createElementBlock:u,withCtx:s,createElementVNode:b,Teleport:A}=await f("vue"),S={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},w={class:"flex gap-4 items-center xs:hidden"},x={key:1,class:"hidden xs:flex"},C={class:"absolute bottom-16 hidden right-16 xs:inline"},{computed:I,ref:g}=await f("vue"),M=h({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["click:back","click:action"],setup(B,{emit:P}){const z=B,c=P,e=I(()=>{const l=[...z.actions],a=l.findIndex(p=>p.isPrimary),t=l[a],[k,F,...V]=l.filter((p,N)=>N!==a);return{primaryAction:t,firstSecondaryAction:k,secondSecondaryAction:F,showMoreSecondary:V,bottomSheetActions:l.filter(p=>!p.isPrimary),fabActions:l.filter(p=>p.isPrimary)}}),y=g(!1);return(l,a)=>(o(),u("div",S,[l.backButton?(o(),n(i,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=t=>c("click:back"))})):r("",!0),m(l.$slots,"prepend"),d($,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),b("div",w,[e.value.firstSecondaryAction?(o(),n(i,{key:0,label:e.value.firstSecondaryAction.label,"prepend-icon":e.value.firstSecondaryAction.prependIcon,"append-icon":e.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=t=>c("click:action",e.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.secondSecondaryAction?(o(),n(i,{key:1,label:e.value.secondSecondaryAction.label,"prepend-icon":e.value.secondSecondaryAction.prependIcon,"append-icon":e.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=t=>c("click:action",e.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.showMoreSecondary.length>1?(o(),n(T,{key:2},{"menu-button":s(()=>[d(i,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:s(()=>[(o(!0),u(_,null,v(e.value.showMoreSecondary,t=>(o(),n(U,{key:t.value,label:t.label,icon:t.prependIcon,onClick:k=>c("click:action",t.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):e.value.showMoreSecondary.length===1?(o(),n(i,{key:3,label:e.value.showMoreSecondary[0].label,"prepend-icon":e.value.showMoreSecondary[0].prependIcon,"append-icon":e.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=t=>c("click:action",e.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r("",!0),e.value.primaryAction?(o(),n(i,{key:4,label:e.value.primaryAction.label,"prepend-icon":e.value.primaryAction.prependIcon,"append-icon":e.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=t=>c("click:action",e.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0)]),e.value.bottomSheetActions.length>0?(o(),u("div",x,[d(i,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=t=>y.value=!0)})])):r("",!0),m(l.$slots,"append"),(o(),n(A,{to:"body"},[d(q,{"model-value":y.value,"onUpdate:modelValue":a[6]||(a[6]=t=>y.value=t),"dismiss-away":"","z-index":z.zIndexForBottomSheet},{default:s(()=>[d(G,null,{default:s(()=>[(o(!0),u(_,null,v(e.value.bottomSheetActions,t=>(o(),n(K,{key:t.value,class:"hover:bg-fm-color-neutral-gray-100",label:t.label,onClick:k=>{c("click:action",t.value),y.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),b("div",C,[e.value.primaryAction?(o(),n(i,{key:0,class:"fm-shadow-light-100",label:e.value.primaryAction.label,"prepend-icon":e.value.primaryAction.prependIcon,"append-icon":e.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=t=>c("click:action",e.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r("",!0)])]))]))}})});export{M as _,R as __tla};