@feedmepos/ui-library 1.1.10 → 1.1.12
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/dist/CHANGELOG.md +231 -0
- package/dist/components/button/FmButton.vue.d.ts +2 -0
- package/dist/components/table/FmTable.vue.d.ts +2 -0
- package/dist/components.d.ts +18 -0
- package/dist/federation/FmCard-BZ0FcVq9.css +1 -0
- package/dist/federation/{FmDatePicker.vue_vue_type_script_setup_true_lang-DMWYsYtU.js → FmDatePicker.vue_vue_type_script_setup_true_lang-DO9HyEzu.js} +1 -1
- package/dist/federation/FmDateRangePicker-CxYORlSU.css +1 -0
- package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-Bk1f_kci.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-C0UdhjGH.js} +1 -1
- package/dist/federation/{FmGlobalSearch.vue_vue_type_script_setup_true_lang-C9ADsQrm.js → FmGlobalSearch.vue_vue_type_script_setup_true_lang--jhXNvFP.js} +1 -1
- package/dist/federation/{FmPageHead.vue_vue_type_script_setup_true_lang-CF4F9loN.js → FmPageHead.vue_vue_type_script_setup_true_lang-CJDxOwmo.js} +1 -1
- package/dist/federation/{FmSearch.vue_vue_type_script_setup_true_lang-BlftVfvj.js → FmSearch.vue_vue_type_script_setup_true_lang-Btp7Iiqq.js} +1 -1
- package/dist/federation/{FmTable.vue_vue_type_script_setup_true_lang-BfFmftiV.js → FmTable.vue_vue_type_script_setup_true_lang-tA4qN4fP.js} +2 -2
- package/dist/federation/{FmTimeInput-Cdvzl8q4.css → FmTimeInput-DaKOw7ho.css} +1 -1
- package/dist/federation/{FmTimePicker.vue_vue_type_script_setup_true_lang--sHF4oiY.js → FmTimePicker.vue_vue_type_script_setup_true_lang-DcIAUmwN.js} +1 -1
- package/dist/federation/{FmTimeRangePicker.vue_vue_type_script_setup_true_lang-CMsgFPZq.js → FmTimeRangePicker.vue_vue_type_script_setup_true_lang-CCs9M5Ds.js} +1 -1
- package/dist/federation/__federation_expose_FmBottomSheet-DyQ0AnqN.css +1 -0
- package/dist/federation/__federation_expose_FmButton-B3xn2A23.js +9 -0
- package/dist/federation/__federation_expose_FmButton-CyFYnJSj.css +1 -0
- package/dist/federation/{__federation_expose_FmCard-B3B6q8jy.js → __federation_expose_FmCard-iOZ41Y07.js} +1 -1
- package/dist/federation/{__federation_expose_FmDatePicker-C4gm_-ei.js → __federation_expose_FmDatePicker-BIHBuTPX.js} +1 -1
- package/dist/federation/{__federation_expose_FmDatePickerMobile-DaQgUtmg.js → __federation_expose_FmDatePickerMobile-Bz5oDHjg.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePicker-DI4G0Xfi.js → __federation_expose_FmDateRangePicker-Ci3FAoFz.js} +1 -1
- package/dist/federation/__federation_expose_FmDateRangePickerMobile-mbzJX3cD.css +1 -0
- package/dist/federation/{__federation_expose_FmDateRangePickerMobile-BHFsLcW_.js → __federation_expose_FmDateRangePickerMobile-r7I4kWI_.js} +1 -1
- package/dist/federation/{__federation_expose_FmDropField-C2kkMNj0.js → __federation_expose_FmDropField-Bee_CfIb.js} +1 -1
- package/dist/federation/{__federation_expose_FmDynamicDialog-CG0UflAi.js → __federation_expose_FmDynamicDialog-CxS7mhNa.js} +1 -1
- package/dist/federation/{__federation_expose_FmGlobalSearch-DTaeAdsR.js → __federation_expose_FmGlobalSearch-SGcOwSUl.js} +1 -1
- package/dist/federation/{__federation_expose_FmPageHead-D-8mjr0d.js → __federation_expose_FmPageHead-_gGrdYpO.js} +1 -1
- package/dist/federation/{__federation_expose_FmSearch-DsPsX1ao.js → __federation_expose_FmSearch-Iy8D1Z4f.js} +1 -1
- package/dist/federation/__federation_expose_FmStepperField-B-QDTefh.js +1 -0
- package/dist/federation/__federation_expose_FmStepperField-BQAAKI90.css +1 -0
- package/dist/federation/{__federation_expose_FmTable-DIfaGkGn.js → __federation_expose_FmTable-DtNvu-M-.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimeInput-BmCO-Bwf.js → __federation_expose_FmTimeInput-TRLKEJwb.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimePicker-BmUuAlQC.js → __federation_expose_FmTimePicker-CbNVfmM6.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimeRangePicker-DxTvTKaV.js → __federation_expose_FmTimeRangePicker-BsVsKH5s.js} +1 -1
- package/dist/federation/{dialog-plugin-C671W_Qv.js → dialog-plugin-DFVlMjDf.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-B-39eu1e.css +1 -0
- package/dist/federation/{index-DdUwSzNG.js → index-DWLX57nG.js} +1 -1
- package/dist/feedmepos-ui-library.js +1054 -1041
- package/dist/feedmepos-ui-library.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.js +3 -79
- package/dist/tailwind-styling.js +84 -0
- package/package.json +5 -3
- package/dist/federation/FmCard-DHu3aEvT.css +0 -1
- package/dist/federation/FmDateRangePicker-BHPjUZnK.css +0 -1
- package/dist/federation/__federation_expose_FmBottomSheet-DX32r2kn.css +0 -1
- package/dist/federation/__federation_expose_FmButton-CO9YzlBI.js +0 -9
- package/dist/federation/__federation_expose_FmButton-DINE7T-C.css +0 -1
- package/dist/federation/__federation_expose_FmDateRangePickerMobile-DtTIszAU.css +0 -1
- package/dist/federation/__federation_expose_FmStepperField-BCRKf3vZ.js +0 -1
- package/dist/federation/__federation_expose_FmStepperField-Du0LmgDr.css +0 -1
- package/dist/federation/index-DIaLJHwM.css +0 -1
- /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
- /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
- /package/dist/federation/{__federation_expose_FmBottomSheet-B7QxLCBH.js → __federation_expose_FmBottomSheet-CchOQqTZ.js} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
## 1.1.12
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
- `FmButton`
|
|
6
|
+
- Fix the icon will be missing when it is clicked because there is no fill variant for the icon
|
|
7
|
+
|
|
8
|
+
## 1.1.11
|
|
9
|
+
|
|
10
|
+
### Feature
|
|
11
|
+
|
|
12
|
+
- `FmTable`
|
|
13
|
+
- Add prop `forceMobileFooter` for Allow user to force the table footer persist on mobile layout
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
- `FmStepperField`
|
|
18
|
+
- Fix the issue that the stepper field will not be disabled when it be set to disabled
|
|
19
|
+
|
|
20
|
+
## 1.1.10
|
|
21
|
+
|
|
22
|
+
### Feature
|
|
23
|
+
|
|
24
|
+
- `FmSimpleCalendar`
|
|
25
|
+
- Now it will forward the calendar to the endDate of the month when the user uses quick select
|
|
26
|
+
- `FmTable`
|
|
27
|
+
- Allow user assign className for row
|
|
28
|
+
|
|
29
|
+
## 1.1.9
|
|
30
|
+
|
|
31
|
+
### Feature
|
|
32
|
+
|
|
33
|
+
- `FmChip`
|
|
34
|
+
- Now support right side icon
|
|
35
|
+
- `FmSimpleCalendar`
|
|
36
|
+
- revert value when calendar close that due to user click outside
|
|
37
|
+
- Allow user to specify the default compare type
|
|
38
|
+
|
|
39
|
+
## 1.1.6
|
|
40
|
+
|
|
41
|
+
### Feature
|
|
42
|
+
|
|
43
|
+
- `FmTable`
|
|
44
|
+
- `shrink-at` accept false as a value to prevent the table from shrinking in any breakpoint
|
|
45
|
+
- adjust the footer to display well on mobile where the table are not allowed to shrink.
|
|
46
|
+
- `FmPopover`/`FmOverlay` related components
|
|
47
|
+
- Add `zIndex` prop to allow user to customize the z-index of the overlay
|
|
48
|
+
- `FmSimpleDatePicker`/`FmSimpleDateRangePicker`
|
|
49
|
+
- New component for handling date comparison separately.
|
|
50
|
+
- `FmSelect`
|
|
51
|
+
- Now select item accepts sublabel
|
|
52
|
+
- `FmSwitch`
|
|
53
|
+
- Remove `min-height`
|
|
54
|
+
- Update sublabel color
|
|
55
|
+
- `FmBar`/`FmLine`
|
|
56
|
+
- Add `hideXAxis`/`hideYAxis`/`hideLegend` props to hide the axis and legend
|
|
57
|
+
|
|
58
|
+
## 1.1.5
|
|
59
|
+
|
|
60
|
+
- `FmPopover`
|
|
61
|
+
- v-click-outside is missing its functionality
|
|
62
|
+
|
|
63
|
+
### Feature
|
|
64
|
+
|
|
65
|
+
- `FmCollapsibleTabs`
|
|
66
|
+
- new UI
|
|
67
|
+
- Ellipsis for tab label if it's over 2 lines
|
|
68
|
+
- `FmButton`
|
|
69
|
+
- Reduce size of the button
|
|
70
|
+
- `FmButtonGroup`
|
|
71
|
+
- Reduce size of the button
|
|
72
|
+
- `FmTooltip`
|
|
73
|
+
- Reduce size of the tooltip
|
|
74
|
+
- `FmTimePicker`/`FmDateTimePicker`
|
|
75
|
+
- allow user use customize `#trigger-button`
|
|
76
|
+
|
|
77
|
+
### Bug fixes
|
|
78
|
+
|
|
79
|
+
- `FmBoottomSheet`
|
|
80
|
+
- Click the `arrow-back` button not trigger close;
|
|
81
|
+
|
|
82
|
+
## 1.1.4
|
|
83
|
+
|
|
84
|
+
### Feature
|
|
85
|
+
|
|
86
|
+
- `FmTable`
|
|
87
|
+
- when on viewport 'xs' or 'sm', renders table row into `FmList` with padding: 0
|
|
88
|
+
- specify different breakpoints with prop `<FmTable shrink-at="xs | sm | ..."`
|
|
89
|
+
- disable behaviour with prop `<FmTable shrink-at="0"`
|
|
90
|
+
- add `<template #table-row` to render custom table row
|
|
91
|
+
- add `<template #list-row` to render custom list row
|
|
92
|
+
- `useDialog`
|
|
93
|
+
- add `dismissAway` to close dialog on clicking overlay (`overlay` must be `true`)
|
|
94
|
+
- add `onClose` handler
|
|
95
|
+
- `FmMenu`
|
|
96
|
+
- add `stop-click-propagation` to avoid click to be propagated to parent component
|
|
97
|
+
- `FmPageHead`
|
|
98
|
+
- add `prepend` and `append` slot
|
|
99
|
+
|
|
100
|
+
### Bug fixes
|
|
101
|
+
|
|
102
|
+
- `FmPopover`
|
|
103
|
+
- use `fixed` position strategy to avoid scrollbar by parent component
|
|
104
|
+
- `useSnackbar`
|
|
105
|
+
- render toast with z-index 10
|
|
106
|
+
- `FmTable`
|
|
107
|
+
- render pinned table header component after `<tbody>` to avoid using z-index
|
|
108
|
+
- show cursor pointer if `@row-click` is defined
|
|
109
|
+
- `FmTableToolbar`
|
|
110
|
+
- fix search button width
|
|
111
|
+
- fix extra spacing on action buttons
|
|
112
|
+
- `FmTable`
|
|
113
|
+
- stop propagation on row click
|
|
114
|
+
- `FmPageHead`
|
|
115
|
+
- fix padding
|
|
116
|
+
- `FmMenuItem`
|
|
117
|
+
- set max length to 240px
|
|
118
|
+
- `useDialog`
|
|
119
|
+
- use tertiary button variant on secondary action on default
|
|
120
|
+
|
|
121
|
+
## 1.1.3
|
|
122
|
+
|
|
123
|
+
- `FmDatePicker` and `FmDateRangePicker`
|
|
124
|
+
- Add slot for calendar trigger button
|
|
125
|
+
- `FmSelect`
|
|
126
|
+
- Ellipsis displayValue when it's line over 2
|
|
127
|
+
- `FmSideSheet`
|
|
128
|
+
- accept `maxWidth` prop
|
|
129
|
+
- `FmCheckbox`, `FmRadio` and `FmSwitch`
|
|
130
|
+
- Reduce the gap between the label and the action box
|
|
131
|
+
- `FmMenuHeader`
|
|
132
|
+
- Reduce th spacing
|
|
133
|
+
- `FmBreadcrumb`
|
|
134
|
+
- Reduce the font size from 16px to 14px
|
|
135
|
+
- `FmStepperField`
|
|
136
|
+
- Reduce the size of the increment and decrement button
|
|
137
|
+
- `FmTable`
|
|
138
|
+
- Allow devs to decide whether to show the footer(pagination) or not
|
|
139
|
+
- Reduce the footer size and add a top border
|
|
140
|
+
- `FmForm`
|
|
141
|
+
- Add global disable props to disable all the fields in the form
|
|
142
|
+
- expose isSubmitting from ref
|
|
143
|
+
|
|
144
|
+
## 1.1.2
|
|
145
|
+
|
|
146
|
+
- Export `FmTableToolbar`
|
|
147
|
+
- `FmTable`
|
|
148
|
+
- Reduce ceil height from 72px to 52px
|
|
149
|
+
- font size from 16px to 14px(Header and Cell)
|
|
150
|
+
- Background color of the header from #FFFFFF to #F9F9F9
|
|
151
|
+
- Allow row click event
|
|
152
|
+
- `Input`
|
|
153
|
+
- Reduce Y padding from 12px to 8px
|
|
154
|
+
- `FmMenuItem`
|
|
155
|
+
- reduce font size:
|
|
156
|
+
- label: 16px -> 14px
|
|
157
|
+
- sublabel: 14px -> 12px
|
|
158
|
+
|
|
159
|
+
## 1.1.1
|
|
160
|
+
|
|
161
|
+
- Standardized `FmDialogContent` and use it for `FmDialog` and `useDialog`
|
|
162
|
+
- Highlighted the scroll behavior in `FmDialog` and `useDialog`
|
|
163
|
+
- Fixed `FmDatePicker` will off-screen when the boundary is closed to bottom but there is no enough space for top to
|
|
164
|
+
show the picker.
|
|
165
|
+
- Fixed the click propagation issue in `FmChip`
|
|
166
|
+
- Fixed the selection box in `FmTable` being re-rendered when the table is updated
|
|
167
|
+
- Now, the `FmRadio` can self-control its disable status even if the parent component changes the disable status
|
|
168
|
+
- Upgrade version for `Material Symbols` for supporting more icons
|
|
169
|
+
|
|
170
|
+
## 1.1.0
|
|
171
|
+
|
|
172
|
+
### Bug Fixes
|
|
173
|
+
|
|
174
|
+
- `FmStepperField` now truncates text when reaching max fraction digits specified
|
|
175
|
+
- Added icons to `FmDatePicker` and `FmDateRangePicker` fields
|
|
176
|
+
- Fixed `FmLabel` not showing tooltips when `info` prop is specified
|
|
177
|
+
- Fixed `FmFormGroup` and `FmLabel` not showing specified slots
|
|
178
|
+
- Fixed UI issues on `FmDynamicDialog` when content or footer is not specified
|
|
179
|
+
- Fixed focus issues on collapsible `FmSearch`
|
|
180
|
+
- Fixed disabled `FmMenu` from behaving incorrectly
|
|
181
|
+
- Color system is now updated with latest colors from design
|
|
182
|
+
- Fixed `FmSelect` extra spacing issues when label or helper is not specified
|
|
183
|
+
- Fixed missing flags on `FmPhoneNumber`
|
|
184
|
+
- Fixed `FmTable` not reflecting new column definitions changes
|
|
185
|
+
- Fixed `FmTable` item counts when manual pagination is used
|
|
186
|
+
- `FmTabs` will now always show selected item on the main bar (to improve visibility on selected item in the `More`
|
|
187
|
+
tabs)
|
|
188
|
+
- `FmPageHead` now correctly hides action button in mobile when no action is specified
|
|
189
|
+
- Fixed extra gaps for undefined slots/props including:
|
|
190
|
+
- Content and footer slots in `FmDialog` & `useDialog`
|
|
191
|
+
- Label and helper text slots in form fields
|
|
192
|
+
- Fixed fade in animation in `useDialog`
|
|
193
|
+
- Fixed dialog spacing when it occupies the whole width on mobile
|
|
194
|
+
- Fixed "More" button in `FmTab` to render children tab as submenu
|
|
195
|
+
- Fixed `label` and `helper` template not rendering in form field components
|
|
196
|
+
- Fixed country flags not rendering in `FmPhoneNumber`
|
|
197
|
+
- Fixed import statements in UI library package for better code editor integration
|
|
198
|
+
- Fixed collapsible `FmSearch` not focusing on text field on expand
|
|
199
|
+
- Fixed full screen heights in all sheets
|
|
200
|
+
- Fixed closing popover when opening other popover
|
|
201
|
+
|
|
202
|
+
### Features
|
|
203
|
+
|
|
204
|
+
- `FmBadge` now supports custom class
|
|
205
|
+
- `FmTable` now supports loading state
|
|
206
|
+
- Added `FmTableToolbar` and `useTableFilter` utilities for table operations
|
|
207
|
+
- New component `FmCardActionArea` is added
|
|
208
|
+
- Updated dependencies
|
|
209
|
+
- UI Library is now running Vue `v3.4.21`
|
|
210
|
+
- Vite has been correctly updated to `v5.1.4` to align with Vue version requirement
|
|
211
|
+
- `FmDatePicker` and `FmDateRangePicker` now allows user to define `min` and `max` dates shown on matrices
|
|
212
|
+
- Added `pin-top` slot in `FmTable`
|
|
213
|
+
- Added ability to do nested rows in `FmTable`
|
|
214
|
+
- Active selected child in `FmTabs` will be made visible even if the child has been collapsed in the "More" tab
|
|
215
|
+
- `useProxiedModel` now use generics for better TS integration on selecting prop name to proxy
|
|
216
|
+
|
|
217
|
+
## 1.0.1
|
|
218
|
+
|
|
219
|
+
### Bug Fixes
|
|
220
|
+
|
|
221
|
+
- Fix `FmSelect` overflowing when list gets too long
|
|
222
|
+
|
|
223
|
+
### Features
|
|
224
|
+
|
|
225
|
+
- Added ability to define `minFractionDigits` and `maxFractionDigits` to `FmStepperField` to define the max and min
|
|
226
|
+
number of fraction digits when user inputs
|
|
227
|
+
|
|
228
|
+
## 1.0.0
|
|
229
|
+
|
|
230
|
+
- FeedMe UI Library released!
|
|
231
|
+
|
|
@@ -41,6 +41,8 @@ export interface FmButtonProps {
|
|
|
41
41
|
appendIcon?: string;
|
|
42
42
|
/** Loading state */
|
|
43
43
|
loading?: boolean;
|
|
44
|
+
/** Disable icon status */
|
|
45
|
+
disableIconStatus?: boolean;
|
|
44
46
|
}
|
|
45
47
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmButtonProps>, {
|
|
46
48
|
variant: string;
|
package/dist/components.d.ts
CHANGED
|
@@ -278,6 +278,9 @@ export declare const components: {
|
|
|
278
278
|
type: import("vue").PropType<boolean>;
|
|
279
279
|
default: boolean;
|
|
280
280
|
};
|
|
281
|
+
disableIconStatus: {
|
|
282
|
+
type: import("vue").PropType<boolean>;
|
|
283
|
+
};
|
|
281
284
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
282
285
|
label: {
|
|
283
286
|
type: import("vue").PropType<string>;
|
|
@@ -323,6 +326,9 @@ export declare const components: {
|
|
|
323
326
|
type: import("vue").PropType<boolean>;
|
|
324
327
|
default: boolean;
|
|
325
328
|
};
|
|
329
|
+
disableIconStatus: {
|
|
330
|
+
type: import("vue").PropType<boolean>;
|
|
331
|
+
};
|
|
326
332
|
}>>, {
|
|
327
333
|
label: string;
|
|
328
334
|
variant: "primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab";
|
|
@@ -10434,6 +10440,9 @@ export declare const components: {
|
|
|
10434
10440
|
hideFooter: {
|
|
10435
10441
|
type: import("vue").PropType<boolean>;
|
|
10436
10442
|
};
|
|
10443
|
+
forceMobileFooter: {
|
|
10444
|
+
type: import("vue").PropType<boolean>;
|
|
10445
|
+
};
|
|
10437
10446
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
10438
10447
|
modelValue: {
|
|
10439
10448
|
type: import("vue").PropType<any>;
|
|
@@ -10500,6 +10509,9 @@ export declare const components: {
|
|
|
10500
10509
|
hideFooter: {
|
|
10501
10510
|
type: import("vue").PropType<boolean>;
|
|
10502
10511
|
};
|
|
10512
|
+
forceMobileFooter: {
|
|
10513
|
+
type: import("vue").PropType<boolean>;
|
|
10514
|
+
};
|
|
10503
10515
|
}>>, {
|
|
10504
10516
|
modelValue: any;
|
|
10505
10517
|
loading: boolean;
|
|
@@ -10588,6 +10600,9 @@ export declare const components: {
|
|
|
10588
10600
|
hideFooter: {
|
|
10589
10601
|
type: import("vue").PropType<boolean>;
|
|
10590
10602
|
};
|
|
10603
|
+
forceMobileFooter: {
|
|
10604
|
+
type: import("vue").PropType<boolean>;
|
|
10605
|
+
};
|
|
10591
10606
|
}>>, {}, {}, {}, {}, {
|
|
10592
10607
|
modelValue: any;
|
|
10593
10608
|
loading: boolean;
|
|
@@ -10673,6 +10688,9 @@ export declare const components: {
|
|
|
10673
10688
|
hideFooter: {
|
|
10674
10689
|
type: import("vue").PropType<boolean>;
|
|
10675
10690
|
};
|
|
10691
|
+
forceMobileFooter: {
|
|
10692
|
+
type: import("vue").PropType<boolean>;
|
|
10693
|
+
};
|
|
10676
10694
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
10677
10695
|
modelValue: any;
|
|
10678
10696
|
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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as k,__tla as ye}from"./__federation_fn_import-Batzb-of.js";import{u as be,__tla as he}from"./useBreakpoints-izwSA5B6.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import re,{__tla as ge}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import de,{__tla as xe}from"./__federation_expose_FmButton-
|
|
1
|
+
import{importShared as k,__tla as ye}from"./__federation_fn_import-Batzb-of.js";import{u as be,__tla as he}from"./useBreakpoints-izwSA5B6.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import re,{__tla as ge}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import de,{__tla as xe}from"./__federation_expose_FmButton-B3xn2A23.js";import{u as ne,__tla as ke}from"./useProxiedModel-Cil0ZKGg.js";import Ve,{__tla as we}from"./__federation_expose_FmField-WMUKa3rp.js";import{_ as Ce,__tla as Be}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-Boyrt75g.js";import{_ as ue,u as Se,__tla as ze}from"./useInheritFormState-DWCWyTcH.js";import{F as Me,__tla as Pe}from"./FmPopover-XMGxVlFW.js";import{D as g,n as Ie,g as Ye}from"./helper-Dphf0qEj.js";import{_ as $e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import De,{__tla as Ee}from"./__federation_expose_FmDatePickerMobile-Bz5oDHjg.js";let ie,Fe=Promise.all([(()=>{try{return ye}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Ee}catch{}})()]).then(async()=>{let j,p,y,q,se,A,L,V,M,o,i,n,P,c,w,C,f,O,me,pe,G,H,K,Q,W,X,Z,J,b,ee,ae,le,s,I,Y,$,D,E,F,N,B,R,U,te,oe;({defineComponent:j}=await k("vue")),{unref:p,renderSlot:y,normalizeProps:q,guardReactiveProps:se,mergeProps:A,createCommentVNode:L,toDisplayString:V,normalizeClass:M,createElementVNode:o,withCtx:i,openBlock:n,createBlock:P,createVNode:c,renderList:w,Fragment:C,createElementBlock:f,isRef:O,pushScopeId:me,popScopeId:pe}=await k("vue"),G={class:"p-12 w-[360px]"},H={class:"w-max"},K={class:"flex h-40 justify-between px-4 py-8"},Q={class:"flex gap-4 items-center"},W={class:"flex gap-4 items-center justify-center"},X={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Z=["onClick"],J={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{ref:b}=await k("vue"),ee=j({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(g)},max:{default:()=>_().add(25,"year").format(g)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(T){const v=T,a=ne(v,"modelValue"),l=b(_(a.value,g)),r=b(!1),d=b(_().startOf("month")),h=b(!1),m=b(!1),ce=e=>{l.value=e},fe=()=>{a.value=l.value.format(g),setTimeout(()=>{r.value=!1},0)},_e=()=>{l.value=a.value?_(a.value):null,r.value=!1},S=e=>{h.value=!1,m.value=!1,d.value=e};return(e,t)=>(n(),P(Ce,{modelValue:p(a),"onUpdate:modelValue":t[5]||(t[5]=z=>O(a)?a.value=z:null),disabled:e.disabled,focused:r.value,"helper-state":e.helperState,"helper-text":e.helperText,info:e.labelInfo,label:e.label,optional:e.labelMark==="optional",required:e.labelMark==="required",rules:e.rules,tag:"div"},{label:i(()=>[y(e.$slots,"label",{},void 0,!0)]),default:i(({invalid:z})=>[c(Me,{disabled:e.disabled,"show-popover":r.value,"z-index":e.zIndex,onPopoverChanged:t[4]||(t[4]=u=>r.value=u)},{"popover-button":i(()=>[e.$slots["trigger-button"]?y(e.$slots,"trigger-button",q(A({key:0},{invalid:z,opened:r.value,showValidBorder:e.showValidBorder})),void 0,!0):(n(),P(Ve,{key:1,focused:r.value,"icon-outlined":!r.value,invalid:z,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:i(()=>[y(e.$slots,"prepend",{},void 0,!0)]),append:i(()=>[y(e.$slots,"append",{},void 0,!0)]),default:i(()=>[o("div",{class:M([[v.disabled?"text-fm-color-typo-disabled":p(a)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},V(p(a)?p(_)(p(a)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","icon-outlined","invalid","show-valid-border"]))]),default:i(()=>[o("div",G,[o("div",H,[o("div",K,[o("div",Q,[c(ue,{max:e.max,min:e.min,"model-value":d.value,picker:"month","onUpdate:modelValue":t[0]||(t[0]=u=>S(u))},null,8,["max","min","model-value"]),c(ue,{max:e.max,min:e.min,"model-value":d.value,picker:"year","onUpdate:modelValue":t[1]||(t[1]=u=>S(u))},null,8,["max","min","model-value"])]),o("div",W,[c(re,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:t[2]||(t[2]=()=>S(d.value.subtract(1,"month")))}),c(re,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:t[3]||(t[3]=()=>S(d.value.add(1,"month")))})])]),o("div",null,[o("div",X,[(n(!0),f(C,null,w(p(Ie),u=>(n(),f("div",{key:u,class:"fm-calendar__cell"},V(u),1))),128))]),o("div",null,[(n(!0),f(C,null,w(p(Ye)(d.value),(u,ve)=>(n(),f("div",{key:ve,class:"fm-calendar__row fm-typo-body-lg-400"},[(n(!0),f(C,null,w(u,x=>(n(),f("div",{key:x.date.date(),class:"fm-calendar__cell"},[x.isCurrentMonth?(n(),f("button",{key:0,class:M([{"fm-calendar__cell__button--selected":x.date.isSame(l.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>ce(x.date)},V(x.date.date()),11,Z)):L("",!0)]))),128))]))),128))])])]),o("div",J,[c(de,{label:"Cancel",size:"md",variant:"tertiary",onClick:_e}),c(de,{disabled:!l.value,label:"Apply",size:"md",variant:"primary",onClick:fe},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":i(()=>[y(e.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),ae=$e(ee,[["__scopeId","data-v-72b81a03"]]),{defineComponent:le}=await k("vue"),{unref:s,normalizeProps:I,guardReactiveProps:Y,renderSlot:$,isRef:D,mergeProps:E,withCtx:F,createSlots:N,openBlock:B,createBlock:R,createCommentVNode:U,Fragment:te,createElementBlock:oe}=await k("vue"),ie=le({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(g)},max:{default:()=>_().add(25,"year").format(g)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(T){const{breakpoints:v}=be(),a=T,l=ne(a,"modelValue"),r=Se(a);return(d,h)=>(B(),oe(te,null,[s(v).md||s(v).lg?(B(),R(ae,E({key:0},s(r),{modelValue:s(l),"onUpdate:modelValue":h[0]||(h[0]=m=>D(l)?l.value=m:null)}),N({_:2},[d.$slots["trigger-button"]?{name:"trigger-button",fn:F(m=>[$(d.$slots,"trigger-button",I(Y(m)))]),key:"0"}:void 0]),1040,["modelValue"])):U("",!0),s(v).xs||s(v).sm?(B(),R(De,E({key:1},s(r),{modelValue:s(l),"onUpdate:modelValue":h[1]||(h[1]=m=>D(l)?l.value=m:null)}),N({_:2},[d.$slots["trigger-button"]?{name:"trigger-button",fn:F(m=>[$(d.$slots,"trigger-button",I(Y(m)))]),key:"0"}:void 0]),1040,["modelValue"])):U("",!0)],64))}})});export{ie as _,Fe as __tla};
|
|
@@ -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-B3xn2A23.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-r7I4kWI_.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 O,__tla as Ke}from"./__federation_fn_import-Batzb-of.js";import Fe,{__tla as Le}from"./__federation_expose_FmTopSheet-B84aPc4J.js";import{_ as Me,__tla as ze}from"./FmSearch.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{importShared as O,__tla as Ke}from"./__federation_fn_import-Batzb-of.js";import Fe,{__tla as Le}from"./__federation_expose_FmTopSheet-B84aPc4J.js";import{_ as Me,__tla as ze}from"./FmSearch.vue_vue_type_script_setup_true_lang-Btp7Iiqq.js";import U,{__tla as Ne}from"./__federation_expose_FmButton-B3xn2A23.js";import{d as he}from"./index-RDtT6JTM.js";import Pe,{__tla as $e}from"./__federation_expose_FmCircularProgress-CPNYzJ5q.js";import{u as ye,__tla as Be}from"./useProxiedModel-Cil0ZKGg.js";import ge,{__tla as Ae}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import{g as Ie}from"./_commonjsHelpers-Cpj98o6Y.js";import Re,{__tla as Ee}from"./__federation_expose_FmSpacer-CBF82AiW.js";let _e,Je=Promise.all([(()=>{try{return Ke}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Ee}catch{}})()]).then(async()=>{var j={exports:{}};(function(L,w){(function(){var e={};L.exports=e,e.simpleFilter=function(o,a){return a.filter(function(r){return e.test(o,r)})},e.test=function(o,a){return e.match(o,a)!==null},e.match=function(o,a,r){r=r||{};var v=0,c=[],p=a.length,k=0,u=0,n=r.pre||"",K=r.post||"",B=r.caseSensitive&&a||a.toLowerCase(),C;o=r.caseSensitive&&o||o.toLowerCase();for(var _=0;_<p;_++)C=a[_],B[_]===o[v]?(C=n+C+K,v+=1,u+=1+u):u=0,k+=u,c[c.length]=C;return v===o.length?(k=B===o?1/0:k,{rendered:c.join(""),score:k}):null},e.filter=function(o,a,r){return!a||a.length===0?[]:typeof o!="string"?a:(r=r||{},a.reduce(function(v,c,p,k){var u=c;r.extract&&(u=r.extract(c));var n=e.match(o,u,r);return n!=null&&(v[v.length]={string:n.rendered,score:n.score,index:p,original:c}),v},[]).sort(function(v,c){var p=c.score-v.score;return p||v.index-c.index}))}})()})(j);var be=j.exports;const xe=Ie(be);function z(L,w){const[e]=xe.filter(L.toLocaleLowerCase(),[w],{pre:"|",post:"|",extract(a){return a.toLocaleLowerCase()}});if(!e)return{label:w,segments:[{segment:w,isMatch:!1}],matched:!1};const o=e.string.toString().replace(/\|\|/g,"").split("|").reduce((a,r,v)=>(a.push({segment:r,isMatch:v%2!==0}),a),new Array);return{label:w,segments:o,matched:!0}}let D,G,g,s,m,f,N,F,b,V,P,q,I,R,H,Q,T,W,X,Y,Z,ee,le,te,ae,re,oe,ne,se,ce,ue,ie,me,de,x,S,$,ve;({defineComponent:D}=await O("vue")),{unref:G,createVNode:g,createElementVNode:s,openBlock:m,createElementBlock:f,createCommentVNode:N,renderList:F,Fragment:b,toDisplayString:V,renderSlot:P,mergeProps:q,normalizeClass:I,createBlock:R,isRef:H,withCtx:Q}=await O("vue"),T={class:"flex flex-col gap-4"},W={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},X={class:"hidden sm:inline xs:inline"},Y={key:0},Z={key:0,class:"flex flex-col"},ee={class:"flex flex-col"},le={class:"flex items-center px-24 py-12"},te=s("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),ae=s("div",{class:"py-4"},[s("hr",{class:"border-fm-color-neutral-gray-100"})],-1),re=["onClick"],oe={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},ne={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},se={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},ce={key:3,class:"flex flex-col"},ue=["onClick"],ie={class:"flex flex-col gap-4"},me={key:0,class:"text-fm-color-typo-secondary"},de={class:"px-16 py-4"},{computed:x,ref:S,watch:$}=await O("vue"),ve=5,_e=D({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(L,{emit:w}){const e=L,o=w;function a(){if(!e.recentSearchKey)return;const l=e.recentSearchKey;localStorage.removeItem(l),c.value=[]}function r(){if(!e.recentSearchKey)return;const l=e.recentSearchKey,t=localStorage.getItem(l);if(!t)return[];try{return JSON.parse(t)}catch{return new Array}}const v=he(function(l){if(!e.recentSearchKey)return;const t=e.recentSearchKey,d=l().trim();if(!t||!d)return;const h=r()??[],i=[...new Set([d,...h])].slice(0,ve),M=JSON.stringify(i);return localStorage.setItem(t,M),c.value=i,i},800),c=S(r()),p=ye(e,"show");$([()=>e.show],()=>{e.show?(n.value=null,e.suggestions&&fe()):o("dismiss")});const k=ye(e,"modelValue"),u=S(e.modelValue);$([()=>u.value],()=>{we()});const n=S(null),K=S(!0),B=x(()=>{var l;return K.value?(l=n.value)==null?void 0:l.slice(0,5):n.value});$([()=>n.value],([])=>{K.value=!0});const C=x(()=>n.value===null),_=S(!1),A=S(""),E=()=>u.value;async function fe(){if(!p.value)return;const l=E();if(!l)return;const t=Math.random().toString();if(A.value=t,e.suggestions){n.value=e.suggestions.map(d=>({label:z(l,d.label),sublabel:d.sublabel?z(l,d.sublabel):null})).filter(d=>{var h;return d.label.matched||((h=d.sublabel)==null?void 0:h.matched)}),v(E);return}if(e.onSearch)try{_.value=!0;const d=await e.onSearch(l);t===A.value&&(n.value=d.map(h=>({label:z(l,h.label),sublabel:h.sublabel?z(l,h.sublabel):null})))}catch{t===A.value&&(n.value=[])}finally{t===A.value&&(_.value=!1,v(E))}}function Se(l){p.value=!1,o("dismiss"),k.value=l}const we=he(fe),pe=x(()=>c.value&&c.value.length===0),ke=x(()=>(!u.value||C.value)&&!pe.value),Ce=x(()=>(!u.value||C.value)&&pe.value),Ve=x(()=>u.value&&n.value&&n.value.length===0);return(l,t)=>(m(),R(Fe,{"model-value":G(p),"onUpdate:modelValue":t[4]||(t[4]=d=>H(p)?p.value=d:null),"fullscreen-size":"sm","dismiss-away":""},{default:Q(()=>{var d,h;return[s("div",T,[s("div",W,[s("div",X,[g(U,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:t[0]||(t[0]=i=>p.value=!1)})]),g(Me,{"model-value":u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),class:"flex-1",placeholder:l.placeholder},null,8,["model-value","placeholder"])]),_.value?(m(),f("div",Y,[g(Pe,{size:"xl"})])):(m(),f(b,{key:1},[ke.value?(m(),f(b,{key:0},[l.recentSearchKey&&((d=c.value)!=null&&d.length)?(m(),f("div",Z,[s("div",ee,[s("div",le,[te,g(Re),g(U,{label:"Clear history",variant:"plain",size:"md",onClick:t[2]||(t[2]=i=>a())})]),ae]),s("div",null,[(m(!0),f(b,null,F(c.value,(i,M)=>(m(),f("div",{key:M,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:y=>u.value=i},[g(ge,{size:"lg",name:"history"}),s("div",oe,V(i),1)],8,re))),128))])])):N("",!0)],64)):Ce.value?P(l.$slots,"hint-placeholder",{key:1},()=>[s("div",ne,V(l.hintPlaceholder),1)]):Ve.value?P(l.$slots,"not-found-placeholder",{key:2},()=>[s("div",se,V(l.notFoundPlaceholder||`No result found for \u201C${u.value}\u201D`),1)]):(m(),f("div",ce,[(m(!0),f(b,null,F(B.value,(i,M)=>P(l.$slots,"search-result-item",q({key:M},{result:i}),()=>[s("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:y=>Se(i.label.label)},[g(ge,{size:"lg",name:"arrow_forward"}),s("div",ie,[s("div",null,[(m(!0),f(b,null,F(i.label.segments,(y,J)=>(m(),f("span",{key:J,class:I({"fm-typo-body-lg-400":!y.isMatch,"fm-typo-body-lg-700":y.isMatch})},V(y.segment),3))),128))]),i.sublabel?(m(),f("div",me,[(m(!0),f(b,null,F(i.sublabel.segments,(y,J)=>(m(),f("span",{key:J,class:I({"fm-typo-body-md-400":!y.isMatch,"fm-typo-body-md-700":y.isMatch})},V(y.segment),3))),128))])):N("",!0)])],8,ue)])),128)),s("div",de,[K.value&&(((h=n.value)==null?void 0:h.length)??0)>5?(m(),R(U,{key:0,label:`show ${n.value.length-5} more results`,variant:"plain",onClick:t[3]||(t[3]=i=>K.value=!1)},null,8,["label"])):N("",!0)])]))],64))])]}),_:3},8,["model-value"]))}})});export{_e as _,Je 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-
|
|
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-B3xn2A23.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as f,__tla as D}from"./__federation_fn_import-Batzb-of.js";import{_ as E,__tla as L}from"./FmTextField.vue_vue_type_style_index_0_lang-Dfvtc4Yv.js";import{u as W,__tla as q}from"./useProxiedModel-Cil0ZKGg.js";import T,{__tla as A}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import I,{__tla as M}from"./__federation_expose_FmButton-
|
|
1
|
+
import{importShared as f,__tla as D}from"./__federation_fn_import-Batzb-of.js";import{_ as E,__tla as L}from"./FmTextField.vue_vue_type_style_index_0_lang-Dfvtc4Yv.js";import{u as W,__tla as q}from"./useProxiedModel-Cil0ZKGg.js";import T,{__tla as A}from"./__federation_expose_FmIcon-C1XYZ-ZR.js";import I,{__tla as M}from"./__federation_expose_FmButton-B3xn2A23.js";import{F as U}from"./provider-keys-nUDvvk3o.js";let F,G=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return M}catch{}})()]).then(async()=>{let v,u,r,y,_,s,h,b,x,c,d,g,p,k,B,i;({defineComponent:v}=await f("vue")),{unref:u,createVNode:r,isRef:y,mergeProps:_,withCtx:s,createSlots:h,normalizeClass:b,normalizeStyle:x,openBlock:c,createElementBlock:d,createCommentVNode:g}=await f("vue"),{computed:p,inject:k,nextTick:B,ref:i}=await f("vue"),F=v({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(N){const o=N,m=k(U),z=p(()=>{const{modelValue:e,disabled:l,...t}=o;return t}),j=p(()=>o.disabled??(m==null?void 0:m.getDisabled())??!1),n=W(o,"modelValue"),w=i(!1),V=i(),a=i(o.collapsible),C=i(o.collapsible);function P(){a.value=!1,B(()=>{var e,l,t,S;(S=(t=(l=(e=V.value)==null?void 0:e.querySelector)==null?void 0:l.call(e,"input"))==null?void 0:t.focus)==null||S.call(t)})}function R(e){if(w.value=e,!!o.collapsible){if(e){C.value=!1;return}a.value=n.value.length===0,a.value&&setTimeout(()=>{C.value=!0},250)}}return(e,l)=>(c(),d("div",{ref_key:"componentRoot",ref:V,class:"flex items-center justify-end min-w-48 relative"},[r(E,_({modelValue:u(n),"onUpdate:modelValue":l[1]||(l[1]=t=>y(n)?n.value=t:null),class:["transition-all",{"opacity-100":!e.collapsible||!a.value,"opacity-0 pointer-events-none":e.collapsible&&a.value}],disabled:j.value||e.collapsible&&a.value,style:{width:e.collapsible&&a.value?"24px":"100%"}},z.value,{onFocusChanged:R}),h({_:2},[w.value?void 0:{name:"prepend",fn:s(()=>[r(T,{name:"search"})]),key:"0"},u(n).length?{name:"append",fn:s(()=>[r(T,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:l[0]||(l[0]=t=>n.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),e.collapsible?(c(),d("div",{key:0,class:b(["absolute top-0 right-0",a.value?"opacity-100":"opacity-0 pointer-events-none"]),style:x({transition:"opacity 150ms",transitionTimingFunction:a.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r(I,{icon:"search",variant:"tertiary",onClick:P})],6)):g("",!0)],512))}})});export{F as _,G as __tla};
|