@feedmepos/ui-library 1.2.10-rc.1 → 1.2.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.
- package/dist/CHANGELOG.md +115 -93
- package/dist/federation/FmCheckbox-CBj3SSem.css +1 -0
- package/dist/federation/{FmDatePicker.vue_vue_type_script_setup_true_lang--uJCaPZj.js → FmDatePicker.vue_vue_type_script_setup_true_lang-Db5BVEjN.js} +1 -1
- package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-CyQwWLYJ.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-Crh6kLlQ.js} +1 -1
- package/dist/federation/{FmPageHead.vue_vue_type_script_setup_true_lang-EAJ6Nsxm.js → FmPageHead.vue_vue_type_script_setup_true_lang-Xx7u-pzF.js} +1 -1
- package/dist/federation/{FmPhoneNumber.vue_vue_type_script_setup_true_lang-BQmlRBNl.js → FmPhoneNumber.vue_vue_type_script_setup_true_lang-D__DVQ3Z.js} +1 -1
- package/dist/federation/FmPie.vue_vue_type_script_setup_true_lang-xU20iLQE.js +2 -0
- package/dist/federation/FmTable.vue_vue_type_script_setup_true_lang-DwOPC14x.js +4 -0
- package/dist/federation/{FmTabs.vue_vue_type_script_setup_true_lang-Csa4zD02.js → FmTabs.vue_vue_type_script_setup_true_lang-DvF8HYyf.js} +1 -1
- package/dist/federation/{__federation_expose_FmCheckbox-DvnOjBzC.js → __federation_expose_FmCheckbox-BZo5V1CH.js} +1 -1
- package/dist/federation/{__federation_expose_FmDatePicker-BP0Eip6E.js → __federation_expose_FmDatePicker-CIplFlON.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePicker-CnHcOEwy.js → __federation_expose_FmDateRangePicker-CfO_o3cz.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePickerMobile-CrB_OYnr.js → __federation_expose_FmDateRangePickerMobile-Blcb5Epr.js} +1 -1
- package/dist/federation/{__federation_expose_FmMenuItem-D51WHesl.js → __federation_expose_FmMenuItem-DFl_DdOJ.js} +1 -1
- package/dist/federation/{__federation_expose_FmPageHead-BrSHV9_u.js → __federation_expose_FmPageHead-Dwzi_bHq.js} +1 -1
- package/dist/federation/{__federation_expose_FmPhoneNumber-C4Pq45Hp.js → __federation_expose_FmPhoneNumber-Bs5P0C3k.js} +1 -1
- package/dist/federation/{__federation_expose_FmPieChart-DeoSowPC.js → __federation_expose_FmPieChart-DnCsBfN3.js} +1 -1
- package/dist/federation/{__federation_expose_FmSelect-CQM5D73d.js → __federation_expose_FmSelect-DPQ1Bl39.js} +1 -1
- package/dist/federation/__federation_expose_FmSnackbar-CTn89OzE.css +1 -0
- package/dist/federation/__federation_expose_FmSnackbar-Dd0MVP_P.js +1 -0
- package/dist/federation/{__federation_expose_FmTab-CWyyn1E_.js → __federation_expose_FmTab-MGtXSfBr.js} +1 -1
- package/dist/federation/{__federation_expose_FmTable-DFjqzyEE.js → __federation_expose_FmTable-B1Ts9Fi0.js} +1 -1
- package/dist/federation/{__federation_expose_FmTabs-CWoo22Xw.js → __federation_expose_FmTabs-CbfNGHrj.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-B7JqdNrY.css +1 -0
- package/dist/federation/index-D2JYK6-_.js +2 -0
- package/dist/federation/{useInheritFormState-BVALFY5X.js → useInheritFormState-Cck9CmNw.js} +1 -1
- package/dist/feedmepos-ui-library.js +5986 -5808
- package/dist/feedmepos-ui-library.umd.cjs +17 -17
- package/dist/{components → src/components}/snackbar/FmSnackbar.vue.d.ts +10 -1
- package/dist/{components → src/components}/table/FmTable.vue.d.ts +8 -3
- package/dist/{components.d.ts → src/components.d.ts} +90 -56
- package/dist/{index.d.ts → src/index.d.ts} +0 -1
- package/dist/{plugin → src/plugin}/snackbar-plugin.d.ts +17 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmCheckbox-Ba2mD5fg.css +0 -1
- package/dist/federation/FmPie.vue_vue_type_script_setup_true_lang-CCRSTuDH.js +0 -2
- package/dist/federation/FmTable.vue_vue_type_script_setup_true_lang-48Qsk7cL.js +0 -4
- package/dist/federation/__federation_expose_FmSnackbar-Cru7hR9z.css +0 -1
- package/dist/federation/__federation_expose_FmSnackbar-wH2QEeO9.js +0 -1
- package/dist/federation/index-Os5_1mM-.css +0 -1
- package/dist/federation/index-vnyuuPVw.js +0 -2
- package/dist/federation/{FmCheckbox.vue_vue_type_style_index_0_lang-D9Zpgvph.js → FmCheckbox.vue_vue_type_style_index_0_lang-vvtHe2yJ.js} +0 -0
- package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- package/dist/{FilterTableDialog.vue.d.ts → src/FilterTableDialog.vue.d.ts} +0 -0
- package/dist/{components → src/components}/avatar/FmAvatar.vue.d.ts +0 -0
- package/dist/{components → src/components}/badge/FmBadge.vue.d.ts +0 -0
- package/dist/{components → src/components}/bottom-sheet/FmBottomSheet.vue.d.ts +0 -0
- package/dist/{components → src/components}/breadcrumb/FmBreadcrumb.vue.d.ts +0 -0
- package/dist/{components → src/components}/button/FmButton.vue.d.ts +0 -0
- package/dist/{components → src/components}/button-group/FmButtonGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCard.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardActionArea.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardActions.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardHeader.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardMedia.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardSection.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardSubtitle.vue.d.ts +0 -0
- package/dist/{components → src/components}/card/FmCardTitle.vue.d.ts +0 -0
- package/dist/{components → src/components}/chart/bar/FmBar.vue.d.ts +0 -0
- package/dist/{components → src/components}/chart/line/FmLine.vue.d.ts +0 -0
- package/dist/{components → src/components}/chart/pie/FmPie.vue.d.ts +0 -0
- package/dist/{components → src/components}/chip/FmChip.vue.d.ts +0 -0
- package/dist/{components → src/components}/chip-group/FmChipGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/dialog/FmDialog.vue.d.ts +0 -0
- package/dist/{components → src/components}/dialog/FmDialogContent.vue.d.ts +0 -0
- package/dist/{components → src/components}/drop-field/FmDropField.vue.d.ts +0 -0
- package/dist/{components → src/components}/dynamic-dialog/FmDynamicDialog.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/FmDateRangeYearMonthPicker.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-picker/FmDatePicker.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-picker/FmDatePickerDesktop.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-picker/FmDatePickerMobile.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-range-picker/FmDateRangePicker.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-range-picker/FmDateRangePickerDesktop.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-range-picker/FmDateRangePickerField.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-range-picker/FmDateRangePickerMobile.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/date-range-picker/common.d.ts +0 -0
- package/dist/{components → src/components}/form/calendar/helper.d.ts +0 -0
- package/dist/{components → src/components}/form/checkbox/FmCheckbox.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/field/FmField.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/form/FmForm.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/form-group/FmFormGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/helper-text/FmHelperText.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/label/FmLabel.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/phone-number/FmCountryFlag.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/phone-number/FmPhoneNumber.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/pin-field/FmPinField.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/radio/FmRadio.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/radio-group/FmRadioGroup.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/search/FmGlobalSearch.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/search/FmSearch.vue.d.ts +0 -0
- package/dist/{components → src/components}/form/select/FmSelect.vue.d.ts +1 -1
- /package/dist/{components → src/components}/form/simple-calendar/FmCalendar.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/FmDateRangeYearMonthPicker.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/helper.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-picker/FmSimpleDatePicker.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-picker/FmSimpleDatePickerDesktop.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-picker/FmSimpleDatePickerMobile.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-range-picker/FmSimpleDateRangePicker.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-range-picker/FmSimpleDateRangePickerDesktop.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-range-picker/FmSimpleDateRangePickerField.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-range-picker/FmSimpleDateRangePickerMobile.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/simple-calendar/simple-date-range-picker/common.d.ts +0 -0
- /package/dist/{components → src/components}/form/stepper-field/FmStepperField.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/switch/FmSwitch.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/text-field/FmTextField.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/textarea/FmTextarea.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/time-picker/FmTimeInput.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/time-picker/FmTimePicker.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/time-picker/FmTimeRangePicker.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/time-picker/TimeInput.vue.d.ts +0 -0
- /package/dist/{components → src/components}/form/time-picker/helper.d.ts +0 -0
- /package/dist/{components → src/components}/icon/FmIcon.vue.d.ts +0 -0
- /package/dist/{components → src/components}/list/FmList.vue.d.ts +0 -0
- /package/dist/{components → src/components}/list/FmListItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/menu-component/FmMenu.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/menu-container-deprecated/FmMenuDeprecated.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/menu-divider/FmMenuDivider.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/menu-header/FmMenuHeader.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/menu-item/FmMenuItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/overlay/FmOverlay.vue.d.ts +0 -0
- /package/dist/{components → src/components}/page-head/FmPageHead.vue.d.ts +0 -0
- /package/dist/{components → src/components}/popover/FmPopover.vue.d.ts +0 -0
- /package/dist/{components → src/components}/progress-indicator/FmCircularProgress.vue.d.ts +0 -0
- /package/dist/{components → src/components}/progress-indicator/FmLinearProgress.vue.d.ts +0 -0
- /package/dist/{components → src/components}/scorecard/FmScorecard.vue.d.ts +0 -0
- /package/dist/{components → src/components}/side-sheet/FmSideSheet.vue.d.ts +0 -0
- /package/dist/{components → src/components}/snackbar/FmSnackbarToast.vue.d.ts +0 -0
- /package/dist/{components → src/components}/spacer/FmSpacer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/stepper/FmStep.vue.d.ts +0 -0
- /package/dist/{components → src/components}/stepper/FmStepHeader.vue.d.ts +0 -0
- /package/dist/{components → src/components}/stepper/FmStepper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/stepper/stepper.d.ts +0 -0
- /package/dist/{components → src/components}/tab/FmCollapsibleTab.vue.d.ts +0 -0
- /package/dist/{components → src/components}/tab/FmTab.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/FmTableCheckbox.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/FmTableHeader.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/FmTableSelection.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/FmTableToolbar.vue.d.ts +0 -0
- /package/dist/{components → src/components}/tabs/FmCollapsibleTabs.vue.d.ts +0 -0
- /package/dist/{components → src/components}/tabs/FmTabs.vue.d.ts +0 -0
- /package/dist/{components → src/components}/thumbnail/FmThumbnail.vue.d.ts +0 -0
- /package/dist/{components → src/components}/tooltip/FmTooltip.vue.d.ts +0 -0
- /package/dist/{components → src/components}/tooltip/FmTooltipDirective.vue.d.ts +0 -0
- /package/dist/{components → src/components}/top-sheet/FmTopSheet.vue.d.ts +0 -0
- /package/dist/{composables → src/composables}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useBreakpoints.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebouncedModel.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebouncedModel.spec.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDialog.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDialogChild.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFocus.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFormChild.d.ts +0 -0
- /package/dist/{composables → src/composables}/useInheritFormState.d.ts +0 -0
- /package/dist/{composables → src/composables}/useLoading.d.ts +0 -0
- /package/dist/{composables → src/composables}/useProxiedModel.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSnackbar.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTableFilter.d.ts +0 -0
- /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
- /package/dist/{directives → src/directives}/clickOutside.d.ts +0 -0
- /package/dist/{directives → src/directives}/tooltip.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/dialog-plugin.d.ts +0 -0
- /package/dist/{utils → src/utils}/await.d.ts +0 -0
- /package/dist/{utils → src/utils}/dom-handler.d.ts +0 -0
- /package/dist/{utils → src/utils}/fuzzy.d.ts +0 -0
- /package/dist/{utils → src/utils}/helpers.d.ts +0 -0
- /package/dist/{utils → src/utils}/number.d.ts +0 -0
- /package/dist/{utils → src/utils}/provider-keys.d.ts +0 -0
- /package/dist/{utils → src/utils}/uid.d.ts +0 -0
- /package/dist/{utils → src/utils}/util-color.d.ts +0 -0
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
+
## 1.2.10 - 2024-07-03
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- `useSnackbar`
|
|
6
|
+
- Support `persistent` prop to allow user to make the snackbar persistent
|
|
7
|
+
- Support `spinner` prop to allow user to show spinner in the snackbar
|
|
8
|
+
- Support `position` prop to allow user to customize the position of the snackbar
|
|
9
|
+
- default: `top-right`
|
|
10
|
+
- in `xs` breakpoint it will always be `bottom-center`
|
|
11
|
+
- expose `updateSnackbar` method to allow user to update the snackbar
|
|
12
|
+
|
|
13
|
+
- `FmTable`
|
|
14
|
+
- Emit `sort-change` event when the user clicks the header to sort the column
|
|
15
|
+
|
|
1
16
|
## 1.2.10-rc.1 - 2024-07-02
|
|
2
17
|
|
|
3
18
|
### Fixes
|
|
4
19
|
|
|
5
20
|
- `FmDialog`
|
|
21
|
+
|
|
6
22
|
- Fix the modelValue not working issue
|
|
7
23
|
|
|
8
24
|
- `FmPinField`
|
|
25
|
+
|
|
9
26
|
- Fix the inputmode
|
|
10
27
|
|
|
28
|
+
- `FmPie`
|
|
29
|
+
- fix where the data is empty will throw error causing the chart not able to render
|
|
30
|
+
|
|
11
31
|
## 1.2.9 - 2024-07-01
|
|
12
32
|
|
|
13
33
|
### Features
|
|
@@ -17,7 +37,7 @@
|
|
|
17
37
|
|
|
18
38
|
## 1.2.9-rc.4 - 2024-07-01
|
|
19
39
|
|
|
20
|
-
### Features
|
|
40
|
+
### Features
|
|
21
41
|
|
|
22
42
|
- `FmTimeRangePicker`
|
|
23
43
|
- Add `disableTimeCheck` prop to allow user to assign the end time to be the same/before the start time
|
|
@@ -27,6 +47,7 @@
|
|
|
27
47
|
### Fixes
|
|
28
48
|
|
|
29
49
|
- `FmDialog`
|
|
50
|
+
|
|
30
51
|
- Fix the issue that the dialog will not close when the user clicks the overlay(dismissAway)
|
|
31
52
|
|
|
32
53
|
- `FmPopover`
|
|
@@ -42,7 +63,7 @@
|
|
|
42
63
|
## 1.2.6-rc.6 - 2024-06-21
|
|
43
64
|
|
|
44
65
|
- `FmDynamicDyalog`
|
|
45
|
-
- ActionButton accept `disabled` and `isLoading` props
|
|
66
|
+
- ActionButton accept `disabled` and `isLoading` props
|
|
46
67
|
|
|
47
68
|
## 1.2.6-rc.5 - 2024-06-21
|
|
48
69
|
|
|
@@ -64,7 +85,6 @@
|
|
|
64
85
|
|
|
65
86
|
- `FmMenu`
|
|
66
87
|
- Assign `max-height` attribute to `menu-wrapper` slot
|
|
67
|
-
|
|
68
88
|
- `FmSelect`
|
|
69
89
|
- Assign `max-height` attribute to `menu-wrapper` slot
|
|
70
90
|
|
|
@@ -80,7 +100,7 @@
|
|
|
80
100
|
### Features
|
|
81
101
|
|
|
82
102
|
- `FmMenu`
|
|
83
|
-
- Give user `shift` and `min-height` attribute for control the menu should do shift or overflow if it closes to the edge
|
|
103
|
+
- Give user `shift` and `min-height` attribute for control the menu should do shift or overflow if it closes to the edge
|
|
84
104
|
|
|
85
105
|
## 1.2.5 - 2024-06-18
|
|
86
106
|
|
|
@@ -88,7 +108,7 @@
|
|
|
88
108
|
|
|
89
109
|
- `FmPhoneNumber`
|
|
90
110
|
- Support flag by `vue-country-flag-next` library
|
|
91
|
-
- Support Indonesia by default
|
|
111
|
+
- Support Indonesia by default
|
|
92
112
|
- Add `extra-country-codes` prop to allow user to add extra country codes
|
|
93
113
|
|
|
94
114
|
## 1.2.4 - 2024-06-10
|
|
@@ -131,6 +151,7 @@
|
|
|
131
151
|
### Features
|
|
132
152
|
|
|
133
153
|
- `FmTooltip`
|
|
154
|
+
|
|
134
155
|
- Add `content-class` prop to allow user to customize the content class
|
|
135
156
|
|
|
136
157
|
- `FmScorecard`
|
|
@@ -141,7 +162,7 @@
|
|
|
141
162
|
### Fixes
|
|
142
163
|
|
|
143
164
|
- `FmTimeRangePicker`
|
|
144
|
-
- Fixed the time comparison calculation issue
|
|
165
|
+
- Fixed the time comparison calculation issue
|
|
145
166
|
|
|
146
167
|
## 1.2.3-rc.1 - 2024-05-29
|
|
147
168
|
|
|
@@ -200,239 +221,240 @@
|
|
|
200
221
|
### Feature
|
|
201
222
|
|
|
202
223
|
- `Foundation`
|
|
203
|
-
|
|
204
|
-
|
|
224
|
+
- Separate font styles by locale
|
|
225
|
+
- Redesign the font system
|
|
205
226
|
|
|
206
227
|
## 1.1.20 - 2024-05-23
|
|
207
228
|
|
|
208
229
|
### Feature
|
|
209
230
|
|
|
210
231
|
- `FmTextField`
|
|
211
|
-
|
|
232
|
+
- Support `password` input mode
|
|
212
233
|
- `FmMenu`
|
|
213
|
-
|
|
234
|
+
- Support `offset` prop to adjust the position of the menu
|
|
214
235
|
- `FmTooltip`
|
|
215
|
-
|
|
236
|
+
- Support `zIndex` prop to adjust the z-index of the tooltip
|
|
216
237
|
- `FmDialog`
|
|
217
|
-
|
|
238
|
+
- Hide `dialog-button` when the slot is `undefined`
|
|
218
239
|
|
|
219
240
|
## 1.1.19 - 2024-05-22
|
|
220
241
|
|
|
221
242
|
### Feature
|
|
222
243
|
|
|
223
244
|
- `FmPopover`
|
|
224
|
-
|
|
245
|
+
- Export `FmPopover` component
|
|
225
246
|
|
|
226
247
|
## 1.1.18 - 2024-05-21
|
|
227
248
|
|
|
228
249
|
- `FmAvatar`
|
|
229
|
-
|
|
230
|
-
|
|
250
|
+
- Add `sm2` size
|
|
251
|
+
- Add `rounded` prop
|
|
231
252
|
|
|
232
253
|
## 1.1.17 - 2024-05-20
|
|
233
254
|
|
|
234
255
|
### Feature
|
|
235
256
|
|
|
236
257
|
- `FmBottomSheet`
|
|
237
|
-
|
|
258
|
+
- Support pointer swipe to close the bottom sheet
|
|
238
259
|
- `FmScorecard`
|
|
239
|
-
|
|
260
|
+
- New component for displaying a scorecard
|
|
240
261
|
- `FmSimpleCalendar`
|
|
241
|
-
|
|
262
|
+
- Update the order of comparison quick select
|
|
242
263
|
|
|
243
264
|
## 1.1.16 - 2024-05-19
|
|
244
265
|
|
|
245
266
|
## Bug fixes
|
|
246
267
|
|
|
247
268
|
- `Calendar`
|
|
248
|
-
|
|
269
|
+
- Fixed the issue that Calendar related component doesn't refer the `disable` status from fromProvider
|
|
249
270
|
|
|
250
271
|
## 1.1.15 - 2024-05-11
|
|
251
272
|
|
|
252
273
|
### Feature
|
|
253
274
|
|
|
254
275
|
- `FmButton`
|
|
255
|
-
|
|
256
|
-
|
|
276
|
+
- Set the default size to `md`
|
|
277
|
+
- If the button is just an icon, make it square
|
|
257
278
|
- `ToolTip`
|
|
258
|
-
|
|
279
|
+
- Now tooltip supports touch devices
|
|
259
280
|
|
|
260
281
|
## 1.1.14 - 2024-05-10
|
|
261
282
|
|
|
262
283
|
### Feature
|
|
263
284
|
|
|
264
285
|
- `FmSimpleDateRangePicker`
|
|
265
|
-
|
|
266
|
-
|
|
286
|
+
|
|
287
|
+
- Added emit `selected-comparison` to get the current compareType when you select the type
|
|
288
|
+
- Added `No Comparison` and tweak some compare type
|
|
267
289
|
|
|
268
290
|
- `FmBar`/`FmLine`/`FmPie`
|
|
269
|
-
|
|
270
|
-
|
|
291
|
+
- Added `legend` props for better customization more info refer to chart js legend documentation for additional
|
|
292
|
+
options
|
|
271
293
|
|
|
272
294
|
## 1.1.13 - 2024-05-09
|
|
273
295
|
|
|
274
296
|
### Feature
|
|
275
297
|
|
|
276
298
|
- `FmIcon`
|
|
277
|
-
|
|
299
|
+
- Upgrade Material Icons version(Fill)
|
|
278
300
|
|
|
279
301
|
## 1.1.12 - 2024-05-09
|
|
280
302
|
|
|
281
303
|
### Bug fixes
|
|
282
304
|
|
|
283
305
|
- `FmButton`
|
|
284
|
-
|
|
306
|
+
- Fix the icon will be missing when it is clicked because there is no fill variant for the icon
|
|
285
307
|
|
|
286
308
|
## 1.1.11 - 2024-05-09
|
|
287
309
|
|
|
288
310
|
### Feature
|
|
289
311
|
|
|
290
312
|
- `FmTable`
|
|
291
|
-
|
|
313
|
+
- Add prop `forceMobileFooter` for Allow user to force the table footer to persist on mobile layout
|
|
292
314
|
|
|
293
315
|
### Bug fixes
|
|
294
316
|
|
|
295
317
|
- `FmStepperField`
|
|
296
|
-
|
|
318
|
+
- Fix the issue that the stepper field will not be disabled when it is set to disabled
|
|
297
319
|
|
|
298
320
|
## 1.1.10 - 2024-05-08
|
|
299
321
|
|
|
300
322
|
### Feature
|
|
301
323
|
|
|
302
324
|
- `FmSimpleCalendar`
|
|
303
|
-
|
|
325
|
+
- Now it will forward the calendar to the endDate of the month when the user uses quick select
|
|
304
326
|
- `FmTable`
|
|
305
|
-
|
|
327
|
+
- Allow user to assign className for row
|
|
306
328
|
|
|
307
329
|
## 1.1.9 - 2024-05-06
|
|
308
330
|
|
|
309
331
|
### Feature
|
|
310
332
|
|
|
311
333
|
- `FmChip`
|
|
312
|
-
|
|
334
|
+
- Now support right side icon
|
|
313
335
|
- `FmSimpleCalendar`
|
|
314
|
-
|
|
315
|
-
|
|
336
|
+
- revert value when the calendar closes that due to user click outside
|
|
337
|
+
- Allow user to specify the default compare type
|
|
316
338
|
|
|
317
339
|
## 1.1.6
|
|
318
340
|
|
|
319
341
|
### Feature
|
|
320
342
|
|
|
321
343
|
- `FmTable`
|
|
322
|
-
|
|
323
|
-
|
|
344
|
+
- `shrink-at` accept false as a value to prevent the table from shrinking in any breakpoint
|
|
345
|
+
- adjust the footer to display well on mobile where the table is not allowed to shrink.
|
|
324
346
|
- `FmPopover`/`FmOverlay` related components
|
|
325
|
-
|
|
347
|
+
- Add `zIndex` prop to allow user to customize the z-index of the overlay
|
|
326
348
|
- `FmSimpleDatePicker`/`FmSimpleDateRangePicker`
|
|
327
|
-
|
|
349
|
+
- New component for handling date comparison separately.
|
|
328
350
|
- `FmSelect`
|
|
329
|
-
|
|
351
|
+
- Now select item accepts `sublabel`
|
|
330
352
|
- `FmSwitch`
|
|
331
|
-
|
|
332
|
-
|
|
353
|
+
- Remove `min-height`
|
|
354
|
+
- Update `sublabel` color
|
|
333
355
|
- `FmBar`/`FmLine`
|
|
334
|
-
|
|
356
|
+
- Add `hideXAxis`/`hideYAxis`/`hideLegend` props to hide the axis and legend
|
|
335
357
|
|
|
336
358
|
## 1.1.5
|
|
337
359
|
|
|
338
360
|
- `FmPopover`
|
|
339
|
-
|
|
361
|
+
- v-click-outside is missing its functionality
|
|
340
362
|
|
|
341
363
|
### Feature
|
|
342
364
|
|
|
343
365
|
- `FmCollapsibleTabs`
|
|
344
|
-
|
|
345
|
-
|
|
366
|
+
- new UI
|
|
367
|
+
- Ellipsis for tab label if it's over 2 lines
|
|
346
368
|
- `FmButton`
|
|
347
|
-
|
|
369
|
+
- Reduce the size of the button
|
|
348
370
|
- `FmButtonGroup`
|
|
349
|
-
|
|
371
|
+
- Reduce the size of the button
|
|
350
372
|
- `FmTooltip`
|
|
351
|
-
|
|
373
|
+
- Reduce the size of the tooltip
|
|
352
374
|
- `FmTimePicker`/`FmDateTimePicker`
|
|
353
|
-
|
|
375
|
+
- allow user use customize `#trigger-button`
|
|
354
376
|
|
|
355
377
|
### Bug fixes
|
|
356
378
|
|
|
357
379
|
- `FmBoottomSheet`
|
|
358
|
-
|
|
380
|
+
- Click the `arrow-back` button not trigger close;
|
|
359
381
|
|
|
360
382
|
## 1.1.4
|
|
361
383
|
|
|
362
384
|
### Feature
|
|
363
385
|
|
|
364
386
|
- `FmTable`
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
387
|
+
- when on viewport `xs` or `sm`, renders table row into `FmList` with padding: 0
|
|
388
|
+
- specify different breakpoints with prop `<FmTable shrink-at="xs | sm | ..."`
|
|
389
|
+
- disable behavior with prop `<FmTable shrink-at="0"`
|
|
390
|
+
- add `<template #table-row` to render custom table row
|
|
391
|
+
- add `<template #list-row` to render custom list row
|
|
370
392
|
- `useDialog`
|
|
371
|
-
|
|
372
|
-
|
|
393
|
+
- add `dismissAway` to close dialog on clicking overlay (`overlay` must be `true`)
|
|
394
|
+
- add `onClose` handler
|
|
373
395
|
- `FmMenu`
|
|
374
|
-
|
|
396
|
+
- add `stop-click-propagation` to avoid click to be propagated to a parent component
|
|
375
397
|
- `FmPageHead`
|
|
376
|
-
|
|
398
|
+
- add `prepend` and `append` slot
|
|
377
399
|
|
|
378
400
|
### Bug fixes
|
|
379
401
|
|
|
380
402
|
- `FmPopover`
|
|
381
|
-
|
|
403
|
+
- use `fixed` position strategy to avoid scrollbar by parent component
|
|
382
404
|
- `useSnackbar`
|
|
383
|
-
|
|
405
|
+
- render toast with z-index 10
|
|
384
406
|
- `FmTable`
|
|
385
|
-
|
|
386
|
-
|
|
407
|
+
- render pinned table header component after `<tbody>` to avoid using z-index
|
|
408
|
+
- show the pointer as cursor if `@row-click` is defined
|
|
387
409
|
- `FmTableToolbar`
|
|
388
|
-
|
|
389
|
-
|
|
410
|
+
- fix search button width
|
|
411
|
+
- fix extra spacing on action buttons
|
|
390
412
|
- `FmTable`
|
|
391
|
-
|
|
413
|
+
- stop propagation on row click
|
|
392
414
|
- `FmPageHead`
|
|
393
|
-
|
|
415
|
+
- fix padding
|
|
394
416
|
- `FmMenuItem`
|
|
395
|
-
|
|
417
|
+
- set max length to 240px
|
|
396
418
|
- `useDialog`
|
|
397
|
-
|
|
419
|
+
- use tertiary button variant on secondary action on default
|
|
398
420
|
|
|
399
421
|
## 1.1.3
|
|
400
422
|
|
|
401
423
|
- `FmDatePicker` and `FmDateRangePicker`
|
|
402
|
-
|
|
424
|
+
- Add slot for calendar trigger button
|
|
403
425
|
- `FmSelect`
|
|
404
|
-
|
|
426
|
+
- Ellipsis displayValue when it's line over 2
|
|
405
427
|
- `FmSideSheet`
|
|
406
|
-
|
|
428
|
+
- accept `maxWidth` prop
|
|
407
429
|
- `FmCheckbox`, `FmRadio` and `FmSwitch`
|
|
408
|
-
|
|
430
|
+
- Reduce the gap between the label and the action box
|
|
409
431
|
- `FmMenuHeader`
|
|
410
|
-
|
|
432
|
+
- Reduce the spacing
|
|
411
433
|
- `FmBreadcrumb`
|
|
412
|
-
|
|
434
|
+
- Reduce the font size from 16px to 14px
|
|
413
435
|
- `FmStepperField`
|
|
414
|
-
|
|
436
|
+
- Reduce the size of the increment and decrement button
|
|
415
437
|
- `FmTable`
|
|
416
|
-
|
|
417
|
-
|
|
438
|
+
- Allow devs to decide whether to show the footer(pagination) or not
|
|
439
|
+
- Reduce the footer size and add a top border
|
|
418
440
|
- `FmForm`
|
|
419
|
-
|
|
420
|
-
|
|
441
|
+
- Add global disable props to disable all the fields in the form
|
|
442
|
+
- expose isSubmitting from ref
|
|
421
443
|
|
|
422
444
|
## 1.1.2
|
|
423
445
|
|
|
424
446
|
- Export `FmTableToolbar`
|
|
425
447
|
- `FmTable`
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
448
|
+
- Reduce ceil height from 72px to 52px
|
|
449
|
+
- font size from 16px to 14px(Header and Cell)
|
|
450
|
+
- Background color of the header from #FFFFFF to #F9F9F9
|
|
451
|
+
- Allow row click event
|
|
430
452
|
- `Input`
|
|
431
|
-
|
|
453
|
+
- Reduce Y padding from 12px to 8px
|
|
432
454
|
- `FmMenuItem`
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
455
|
+
- reduce font size:
|
|
456
|
+
- label: 16px -> 14px
|
|
457
|
+
- `sublabel`: 14px -> 12px
|
|
436
458
|
|
|
437
459
|
## 1.1.1
|
|
438
460
|
|
|
@@ -465,8 +487,8 @@
|
|
|
465
487
|
tabs)
|
|
466
488
|
- `FmPageHead` now correctly hides action button in mobile when no action is specified
|
|
467
489
|
- Fixed extra gaps for undefined slots/props including:
|
|
468
|
-
|
|
469
|
-
|
|
490
|
+
- Content and footer slots in `FmDialog` & `useDialog`
|
|
491
|
+
- Label and helper text slots in form fields
|
|
470
492
|
- Fixed fade in animation in `useDialog`
|
|
471
493
|
- Fixed dialog spacing when it occupies the whole width on mobile
|
|
472
494
|
- Fixed "More" button in `FmTab` to render children tab as submenu
|
|
@@ -484,8 +506,8 @@
|
|
|
484
506
|
- Added `FmTableToolbar` and `useTableFilter` utilities for table operations
|
|
485
507
|
- New component `FmCardActionArea` is added
|
|
486
508
|
- Updated dependencies
|
|
487
|
-
|
|
488
|
-
|
|
509
|
+
- UI Library is now running Vue `v3.4.21`
|
|
510
|
+
- Vite has been correctly updated to `v5.1.4` to align with Vue version requirement
|
|
489
511
|
- `FmDatePicker` and `FmDateRangePicker` now allows user to define `min` and `max` dates shown on matrices
|
|
490
512
|
- Added `pin-top` slot in `FmTable`
|
|
491
513
|
- Added ability to do nested rows in `FmTable`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-checkbox{display:inline-block;min-height:40px;min-width:40px}.fm-checkbox--wrapper{display:flex;align-items:center;cursor:pointer}.fm-checkbox--wrapper:hover>.fm-checkbox__input--container{background-color:var(--fm-color-opacity-sm)}.fm-checkbox__input--container{position:relative;height:40px;width:40px;border-radius:360px;padding:8px;display:flex;align-items:center;justify-content:center;cursor:pointer}.fm-checkbox__input--container:hover{background-color:var(--fm-color-opacity-sm)}.fm-checkbox__input--btn{position:relative;height:18px;width:18px;flex-shrink:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:2px;border-color:var(--fm-color-neutral-gray-400);border-radius:2px;cursor:pointer}.fm-checkbox__input--btn:disabled{border-width:2px;border-color:var(--fm-color-neutral-gray-200)}.fm-checkbox__input--btn--checked,.fm-checkbox__input--btn:indeterminate{border-style:none;background-color:var(--fm-color-primary)}.fm-checkbox__input--btn--checked:disabled,.fm-checkbox__input--btn:indeterminate:disabled{background-color:var(--fm-color-neutral-gray-200);cursor:not-allowed}.fm-checkbox__input--checkmark{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -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))}.fm-checkbox__label-container{padding:8px 0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as g,__tla as ke}from"./__federation_fn_import-DThBtRAV.js";import{u as ge,__tla as Ve}from"./useBreakpoints-DqA4Z0bX.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import ne,{__tla as we}from"./__federation_expose_FmIcon-BKc-kUKB.js";import ue,{__tla as Ce}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as ie,__tla as Be}from"./useProxiedModel-DA9duj_S.js";import Se,{__tla as ze}from"./__federation_expose_FmField-C4U6qz8m.js";import{_ as Me,__tla as Pe}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import{_ as se,u as $e,__tla as De}from"./useInheritFormState-
|
|
1
|
+
import{importShared as g,__tla as ke}from"./__federation_fn_import-DThBtRAV.js";import{u as ge,__tla as Ve}from"./useBreakpoints-DqA4Z0bX.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import ne,{__tla as we}from"./__federation_expose_FmIcon-BKc-kUKB.js";import ue,{__tla as Ce}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as ie,__tla as Be}from"./useProxiedModel-DA9duj_S.js";import Se,{__tla as ze}from"./__federation_expose_FmField-C4U6qz8m.js";import{_ as Me,__tla as Pe}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import{_ as se,u as $e,__tla as De}from"./useInheritFormState-Cck9CmNw.js";import{F as Ie,__tla as Ye}from"./FmPopover-BeLBRWG0.js";import{D as x,n as Fe,g as Ue}from"./helper-Dphf0qEj.js";import{F as Ee}from"./provider-keys-nUDvvk3o.js";import{_ as je}from"./_plugin-vue_export-helper-DlAUqK2U.js";import qe,{__tla as Ne}from"./__federation_expose_FmDatePickerMobile-CwKFkWFb.js";let me,Re=Promise.all([(()=>{try{return ke}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Ne}catch{}})()]).then(async()=>{let R,m,y,T,pe,A,O,V,M,r,i,d,P,p,w,C,c,L,ce,fe,G,H,J,K,W,X,Z,Q,ee,le,b,ae,te,oe,s,$,D,I,Y,F,U,E,B,j,q,re,de;({defineComponent:R}=await g("vue")),{unref:m,renderSlot:y,normalizeProps:T,guardReactiveProps:pe,mergeProps:A,createCommentVNode:O,toDisplayString:V,normalizeClass:M,createElementVNode:r,withCtx:i,openBlock:d,createBlock:P,createVNode:p,renderList:w,Fragment:C,createElementBlock:c,isRef:L,pushScopeId:ce,popScopeId:fe}=await g("vue"),G={class:"p-12 w-[360px]"},H={class:"w-max"},J={class:"flex h-40 justify-between px-4 py-8"},K={class:"flex gap-4 items-center"},W={class:"flex gap-4 items-center justify-center"},X={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Z=["onClick"],Q={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:ee,inject:le,ref:b}=await g("vue"),ae=R({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(x)},max:{default:()=>_().add(25,"year").format(x)},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(N){const v=N,h=le(Ee,null),l=ie(v,"modelValue"),f=b(_(l.value,x)),t=b(!1),n=ee(()=>v.disabled??(h==null?void 0:h.getDisabled())??!1),a=b(_().startOf("month")),_e=b(!1),ve=b(!1),ye=e=>{f.value=e},be=()=>{l.value=f.value.format(x),setTimeout(()=>{t.value=!1},0)},he=()=>{f.value=l.value?_(l.value):null,t.value=!1},S=e=>{_e.value=!1,ve.value=!1,a.value=e};return(e,o)=>(d(),P(Me,{modelValue:m(l),"onUpdate:modelValue":o[5]||(o[5]=z=>L(l)?l.value=z:null),disabled:n.value,focused:t.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})=>[p(Ie,{disabled:n.value,"show-popover":t.value,"z-index":e.zIndex,onPopoverChanged:o[4]||(o[4]=u=>t.value=u)},{"popover-button":i(()=>[e.$slots["trigger-button"]?y(e.$slots,"trigger-button",T(A({key:0},{invalid:z,opened:t.value,showValidBorder:e.showValidBorder,disabled:n.value})),void 0,!0):(d(),P(Se,{key:1,disabled:n.value,focused:t.value,"icon-outlined":!t.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(()=>[r("div",{class:M([[n.value?"text-fm-color-typo-disabled":m(l)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},V(m(l)?m(_)(m(l)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:i(()=>[r("div",G,[r("div",H,[r("div",J,[r("div",K,[p(se,{max:e.max,min:e.min,"model-value":a.value,picker:"month","onUpdate:modelValue":o[0]||(o[0]=u=>S(u))},null,8,["max","min","model-value"]),p(se,{max:e.max,min:e.min,"model-value":a.value,picker:"year","onUpdate:modelValue":o[1]||(o[1]=u=>S(u))},null,8,["max","min","model-value"])]),r("div",W,[p(ne,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:o[2]||(o[2]=()=>S(a.value.subtract(1,"month")))}),p(ne,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:o[3]||(o[3]=()=>S(a.value.add(1,"month")))})])]),r("div",null,[r("div",X,[(d(!0),c(C,null,w(m(Fe),u=>(d(),c("div",{key:u,class:"fm-calendar__cell"},V(u),1))),128))]),r("div",null,[(d(!0),c(C,null,w(m(Ue)(a.value),(u,xe)=>(d(),c("div",{key:xe,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(d(!0),c(C,null,w(u,k=>(d(),c("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.isCurrentMonth?(d(),c("button",{key:0,class:M([{"fm-calendar__cell__button--selected":k.date.isSame(f.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>ye(k.date)},V(k.date.date()),11,Z)):O("",!0)]))),128))]))),128))])])]),r("div",Q,[p(ue,{label:"Cancel",size:"md",variant:"tertiary",onClick:he}),p(ue,{disabled:!f.value,label:"Apply",size:"md",variant:"primary",onClick:be},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"]))}}),te=je(ae,[["__scopeId","data-v-6d34db79"]]),{defineComponent:oe}=await g("vue"),{unref:s,normalizeProps:$,guardReactiveProps:D,renderSlot:I,isRef:Y,mergeProps:F,withCtx:U,createSlots:E,openBlock:B,createBlock:j,createCommentVNode:q,Fragment:re,createElementBlock:de}=await g("vue"),me=oe({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(x)},max:{default:()=>_().add(25,"year").format(x)},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(N){const{breakpoints:v}=ge(),h=N,l=ie(h,"modelValue"),f=$e(h);return(t,n)=>(B(),de(re,null,[s(v).md||s(v).lg?(B(),j(te,F({key:0},s(f),{modelValue:s(l),"onUpdate:modelValue":n[0]||(n[0]=a=>Y(l)?l.value=a:null)}),E({_:2},[t.$slots["trigger-button"]?{name:"trigger-button",fn:U(a=>[I(t.$slots,"trigger-button",$(D(a)))]),key:"0"}:void 0]),1040,["modelValue"])):q("",!0),s(v).xs||s(v).sm?(B(),j(qe,F({key:1},s(f),{modelValue:s(l),"onUpdate:modelValue":n[1]||(n[1]=a=>Y(l)?l.value=a:null)}),E({_:2},[t.$slots["trigger-button"]?{name:"trigger-button",fn:U(a=>[I(t.$slots,"trigger-button",$(D(a)))]),key:"0"}:void 0]),1040,["modelValue"])):q("",!0)],64))}})});export{me as _,Re as __tla};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as N,__tla as Pa}from"./__federation_fn_import-DThBtRAV.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as pa,g as ya}from"./helper-Dphf0qEj.js";import ba,{__tla as Aa}from"./__federation_expose_FmIcon-BKc-kUKB.js";import Da,{__tla as Oa}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as _a,__tla as Sa}from"./useProxiedModel-DA9duj_S.js";import{_ as $a,__tla as La}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import W,{__tla as Ra}from"./__federation_expose_FmField-C4U6qz8m.js";import{F as Ta,__tla as za}from"./FmPopover-BeLBRWG0.js";import{_ as K,u as Ia,__tla as Ua}from"./useInheritFormState-BVALFY5X.js";import ha,{__tla as Ea}from"./__federation_expose_FmMenuItem-D51WHesl.js";import{_ as Fa,__tla as ja}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-BXNEveuZ.js";import Na,{__tla as Wa}from"./__federation_expose_FmSwitch-CmgsT_mG.js";import{_ as ie,__tla as qa}from"./FmLabel.vue_vue_type_script_setup_true_lang-CWZsudf4.js";import Ga,{C as S,__tla as Ha}from"./__federation_expose_FmDateRangePickerMobile-CrB_OYnr.js";import{i as k}from"./helpers-D8-zcjH0.js";import{F as Ja}from"./provider-keys-nUDvvk3o.js";import{_ as Ka}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Qa,__tla as Xa}from"./useBreakpoints-DqA4Z0bX.js";let ga,Za=Promise.all([(()=>{try{return Pa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{let me,p,fe,Ya,B,ce,h,b,D,u,y,c,i,f,x,V,Q,ve,pe,ye,be,X,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Ae,Oe,Se,$e,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,We,qe,U,Ge,P,He,Je,Ke,Qe,A,Z,ee,ae,te,le,re,oe,q,se,ne,Xe,Ze;({defineComponent:me}=await N("vue")),{unref:p,normalizeProps:fe,guardReactiveProps:Ya,renderSlot:B,mergeProps:ce,createCommentVNode:h,toDisplayString:b,normalizeClass:D,createElementVNode:u,withCtx:y,createVNode:c,openBlock:i,createElementBlock:f,Fragment:x,renderList:V,createBlock:Q,isRef:ve,createSlots:pe,pushScopeId:ye,popScopeId:be}=await N("vue"),X=L=>(ye("data-v-a35b0ec8"),L=L(),be(),L),De={key:0,class:"flex gap-4 items-center relative w-full"},_e={class:"flex flex-col gap-4 w-full"},he=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),ge={class:"flex flex-col gap-4 w-full"},Ye={key:1,class:"flex flex-col gap-4 w-full"},xe={class:"flex gap-4 p-12"},ke={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},we={key:0,class:"px-8"},Me={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Ce={class:"flex flex-col gap-24"},Be={key:0,class:"flex gap-4 items-center px-12 w-full"},Ve={class:"flex flex-col gap-4 w-full"},Pe=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ae={class:"flex flex-col gap-4 w-full"},Oe={class:"flex gap-24"},Se={class:"w-max"},$e={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Le={class:"flex gap-4 items-center"},Re={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Te={class:"h-[288px]"},ze={key:0,class:"fm-calendar__cell__button--today"},Ie=["onClick","onMouseover"],Ue={class:"w-max"},Ee={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Fe={class:"flex gap-4 items-center"},je={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Ne={key:0,class:"fm-calendar__cell__button--today"},We=["onClick","onMouseover"],qe={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:U,inject:Ge,ref:P,watch:He}=await N("vue"),Je=me({__name:"FmDateRangePickerDesktop",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:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){var la,ra;const z=[{id:S.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{O.value=S.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:S.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{O.value=S.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:S.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{O.value=S.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:S.Custom,label:"Custom",sublabel:"",action:()=>{O.value=S.Custom}}],w=L,M=Ge(Ja,null),R=r(),n=_a(w,"modelValue"),o=P([{startDate:(la=n.value)!=null&&la.startDate?r(n.value.startDate,s):null,endDate:(ra=n.value)!=null&&ra.endDate?r(n.value.endDate,s):null},{startDate:null,endDate:null}]),v=P(!1),g=U(()=>w.disabled??(M==null?void 0:M.getDisabled())??!1),_=P(!1),O=P(""),T=P(r().startOf("month")),E=P(r().startOf("month").add(1,"month")),de=P(""),ue=P(null);let Y=0;const ea=e=>{var a;if(de.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 d=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:d}}else o.value[Y].endDate=e;_.value&&(Y=1),z.find(d=>d.id===O.value)||(O.value=S.Custom)}(a=z.find(d=>d.id===O.value))==null||a.action()},xa=()=>{_.value?n.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):n.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{v.value=!1})},ka=()=>{var e,a;Array.isArray(n.value)?o.value=n.value:o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null},v.value=!1},I=(e,a)=>{e==="left"?(T.value=a,E.value=a.add(1,"month")):e==="right"&&(E.value=a,T.value=a.subtract(1,"month"))},aa=e=>{const a=o.value[0].startDate,d=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=ue.value,C=a==null?void 0:a.isSame(e),F=d==null?void 0:d.isSame(e),$=t==null?void 0:t.isSame(e),j=m==null?void 0:m.isSame(e),H=l==null?void 0:l.isSame(e),oa=C&&d&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isAfter(a))||a&&!d&&H&&(l==null?void 0:l.isBefore(a)),sa=$&&m&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&H&&(l==null?void 0:l.isBefore(t)),na=F&&a&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isBefore(a))||a&&!d&&H&&(l==null?void 0:l.isAfter(a)),da=j&&t&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&H&&(l==null?void 0:l.isAfter(t)),ua=C&&F||C&&!d,ia=$&&j||$&&!m,ma=a&&(d||l)&&d?e.isAfter(a)&&e.isBefore(d):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),fa=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),J=()=>{if(o.value.filter(ca=>{var va;for(const Va in ca)if((va=ca[Va])!=null&&va.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(C&&F&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&j&&(k(e,a,d)||k(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(oa||na)return k(e,t,m)||k(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(sa||da)return k(e,a,d)||k(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(ua)return"bg-fm-color-primary";if(ia)return"bg-fm-color-system-info-300";if(k(e,a,d)&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-system-success-100";if(ma)return"bg-fm-color-system-warning-100";if(fa)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${J()}`]:oa||sa,[`fm-calendar__cell__button--selected-end ${J()}`]:na||da,[`fm-calendar__cell__button--selected-between ${J()}`]:ma||fa,[`fm-calendar__cell__button--selected ${J()}`]:ua||ia}},ta=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){ue.value=e;return}ue.value=null},wa=e=>{de.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},Ma=U(()=>_.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),Ca=e=>{O.value="",_.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},G=U(()=>{if(!n.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=_.value&&Array.isArray(n.value)?n.value[0].startDate:n.value.startDate,a=_.value&&Array.isArray(n.value)?n.value[0].endDate:n.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"}}),Ba=U(()=>{const e=_.value&&Array.isArray(n.value)?n.value[1].startDate:null,a=_.value&&Array.isArray(n.value)?n.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return He(()=>n.value,()=>{var e,a;_.value?o.value=n.value.map(d=>({startDate:d!=null&&d.startDate?r(d.startDate,s):null,endDate:d!=null&&d.endDate?r(d.endDate,s):null})):o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null}}),(e,a)=>(i(),Q($a,{modelValue:p(n),"onUpdate:modelValue":a[8]||(a[8]=d=>ve(n)?n.value=d:null),disabled:g.value,focused:v.value,"helper-state":e.helperState,"helper-text":_.value?Ba.value:e.helperText,rules:e.rules,tag:"div"},pe({default:y(({invalid:d})=>[c(Ta,{disabled:g.value,"show-popover":v.value,"z-index":w.zIndex,onPopoverChanged:a[7]||(a[7]=t=>v.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?B(e.$slots,"trigger-button",fe(ce({key:0},{opened:v.value,invalid:d,showValidBorder:e.showValidBorder,isComparing:_.value,disabled:g.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?h("",!0):(i(),f("div",De,[u("label",_e,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.startLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.startDate?p(r)(p(n).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),he,u("label",ge,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.endLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.endDate?p(r)(p(n).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",Ye,[c(ie,{label:e.compareLabel},null,8,["label"]),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),focused:v.value,invalid:d,"show-valid-border":e.showValidBorder},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(G.value.startDate)+" - "+b(G.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):h("",!0)],64))]),default:y(()=>[u("div",xe,[e.showPredefinedRange?(i(),f("div",ke,[(i(!0),f(x,null,V(e.predefinedRange,(t,m)=>(i(),Q(ha,{key:m,label:t.label,"model-value":de.value===t.label,selectable:"",onClick:l=>wa(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",we,[c(Fa,{inset:""})])):h("",!0),e.compare?(i(),f(x,{key:1},[c(Na,{"model-value":_.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>Ca(t))},null,8,["model-value"]),_.value?(i(),f(x,{key:0},V(z,(t,m)=>c(ha,{key:m,label:t.label,"model-value":O.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):h("",!0)],64)):h("",!0)])):h("",!0),e.showPredefinedRange?(i(),f("div",Me)):h("",!0),u("div",{class:D({"pl-4":e.showPredefinedRange})},[u("div",Ce,[_.value?(i(),f("div",Be,[u("label",Ve,[c(ie,{label:"Custom"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(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-en-body-lg-400"])},b(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Pe,u("label",Ae,[c(ie,{label:"Compare"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(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-en-body-lg-400"])},b(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):h("",!0),u("div",Oe,[u("div",Se,[u("div",$e,[u("div",Le,[c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>I("left",T.value.subtract(1,"month")))}),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>I("left",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>I("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Re,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",Te,[(i(!0),f(x,null,V(p(ya)(T.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",ze)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,Ie)):h("",!0)]))),128))]))),128))])])]),u("div",Ue,[u("div",Ee,[u("div",Fe,[c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>I("right",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>I("right",t))},null,8,["max","min","model-value"])]),c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>I("left",T.value.add(1,"month")))})]),u("div",null,[u("div",je,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",null,[(i(!0),f(x,null,V(p(ya)(E.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",Ne)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,We)):h("",!0)]))),128))]))),128))])])])])]),u("div",qe,[c(Da,{label:"Cancel",size:"md",variant:"tertiary",onClick:ka}),c(Da,{disabled:Ma.value,label:"Apply",size:"md",variant:"primary",onClick:xa},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[B(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ka(Je,[["__scopeId","data-v-a35b0ec8"]]),{defineComponent:Qe}=await N("vue"),{unref:A,normalizeProps:Z,guardReactiveProps:ee,renderSlot:ae,isRef:te,mergeProps:le,withCtx:re,createSlots:oe,openBlock:q,createBlock:se,createCommentVNode:ne,Fragment:Xe,createElementBlock:Ze}=await N("vue"),ga=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(L){const z=L,{breakpoints:w}=Qa(),M=_a(z,"modelValue"),R=Ia(z);return(n,o)=>(q(),Ze(Xe,null,[A(w).md||A(w).lg?(q(),se(Ke,le({key:0},A(R),{modelValue:A(M),"onUpdate:modelValue":o[0]||(o[0]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0),A(w).xs||A(w).sm?(q(),se(Ga,le({key:1},A(R),{modelValue:A(M),"onUpdate:modelValue":o[1]||(o[1]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0)],64))}})});export{ga as _,Za as __tla};
|
|
1
|
+
import{importShared as N,__tla as Pa}from"./__federation_fn_import-DThBtRAV.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as pa,g as ya}from"./helper-Dphf0qEj.js";import ba,{__tla as Aa}from"./__federation_expose_FmIcon-BKc-kUKB.js";import Da,{__tla as Oa}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as _a,__tla as Sa}from"./useProxiedModel-DA9duj_S.js";import{_ as $a,__tla as La}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import W,{__tla as Ra}from"./__federation_expose_FmField-C4U6qz8m.js";import{F as Ta,__tla as za}from"./FmPopover-BeLBRWG0.js";import{_ as K,u as Ia,__tla as Ua}from"./useInheritFormState-Cck9CmNw.js";import ha,{__tla as Ea}from"./__federation_expose_FmMenuItem-DFl_DdOJ.js";import{_ as Fa,__tla as ja}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-BXNEveuZ.js";import Na,{__tla as Wa}from"./__federation_expose_FmSwitch-CmgsT_mG.js";import{_ as ie,__tla as qa}from"./FmLabel.vue_vue_type_script_setup_true_lang-CWZsudf4.js";import Ga,{C as S,__tla as Ha}from"./__federation_expose_FmDateRangePickerMobile-Blcb5Epr.js";import{i as k}from"./helpers-D8-zcjH0.js";import{F as Ja}from"./provider-keys-nUDvvk3o.js";import{_ as Ka}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Qa,__tla as Xa}from"./useBreakpoints-DqA4Z0bX.js";let ga,Za=Promise.all([(()=>{try{return Pa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{let me,p,fe,Ya,B,ce,h,b,D,u,y,c,i,f,x,V,Q,ve,pe,ye,be,X,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Ae,Oe,Se,$e,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,We,qe,U,Ge,P,He,Je,Ke,Qe,A,Z,ee,ae,te,le,re,oe,q,se,ne,Xe,Ze;({defineComponent:me}=await N("vue")),{unref:p,normalizeProps:fe,guardReactiveProps:Ya,renderSlot:B,mergeProps:ce,createCommentVNode:h,toDisplayString:b,normalizeClass:D,createElementVNode:u,withCtx:y,createVNode:c,openBlock:i,createElementBlock:f,Fragment:x,renderList:V,createBlock:Q,isRef:ve,createSlots:pe,pushScopeId:ye,popScopeId:be}=await N("vue"),X=L=>(ye("data-v-a35b0ec8"),L=L(),be(),L),De={key:0,class:"flex gap-4 items-center relative w-full"},_e={class:"flex flex-col gap-4 w-full"},he=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),ge={class:"flex flex-col gap-4 w-full"},Ye={key:1,class:"flex flex-col gap-4 w-full"},xe={class:"flex gap-4 p-12"},ke={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},we={key:0,class:"px-8"},Me={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Ce={class:"flex flex-col gap-24"},Be={key:0,class:"flex gap-4 items-center px-12 w-full"},Ve={class:"flex flex-col gap-4 w-full"},Pe=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ae={class:"flex flex-col gap-4 w-full"},Oe={class:"flex gap-24"},Se={class:"w-max"},$e={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Le={class:"flex gap-4 items-center"},Re={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Te={class:"h-[288px]"},ze={key:0,class:"fm-calendar__cell__button--today"},Ie=["onClick","onMouseover"],Ue={class:"w-max"},Ee={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Fe={class:"flex gap-4 items-center"},je={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Ne={key:0,class:"fm-calendar__cell__button--today"},We=["onClick","onMouseover"],qe={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:U,inject:Ge,ref:P,watch:He}=await N("vue"),Je=me({__name:"FmDateRangePickerDesktop",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:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){var la,ra;const z=[{id:S.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{O.value=S.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:S.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{O.value=S.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:S.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{O.value=S.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:S.Custom,label:"Custom",sublabel:"",action:()=>{O.value=S.Custom}}],w=L,M=Ge(Ja,null),R=r(),n=_a(w,"modelValue"),o=P([{startDate:(la=n.value)!=null&&la.startDate?r(n.value.startDate,s):null,endDate:(ra=n.value)!=null&&ra.endDate?r(n.value.endDate,s):null},{startDate:null,endDate:null}]),v=P(!1),g=U(()=>w.disabled??(M==null?void 0:M.getDisabled())??!1),_=P(!1),O=P(""),T=P(r().startOf("month")),E=P(r().startOf("month").add(1,"month")),de=P(""),ue=P(null);let Y=0;const ea=e=>{var a;if(de.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 d=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:d}}else o.value[Y].endDate=e;_.value&&(Y=1),z.find(d=>d.id===O.value)||(O.value=S.Custom)}(a=z.find(d=>d.id===O.value))==null||a.action()},xa=()=>{_.value?n.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):n.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{v.value=!1})},ka=()=>{var e,a;Array.isArray(n.value)?o.value=n.value:o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null},v.value=!1},I=(e,a)=>{e==="left"?(T.value=a,E.value=a.add(1,"month")):e==="right"&&(E.value=a,T.value=a.subtract(1,"month"))},aa=e=>{const a=o.value[0].startDate,d=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=ue.value,C=a==null?void 0:a.isSame(e),F=d==null?void 0:d.isSame(e),$=t==null?void 0:t.isSame(e),j=m==null?void 0:m.isSame(e),H=l==null?void 0:l.isSame(e),oa=C&&d&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isAfter(a))||a&&!d&&H&&(l==null?void 0:l.isBefore(a)),sa=$&&m&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&H&&(l==null?void 0:l.isBefore(t)),na=F&&a&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isBefore(a))||a&&!d&&H&&(l==null?void 0:l.isAfter(a)),da=j&&t&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&H&&(l==null?void 0:l.isAfter(t)),ua=C&&F||C&&!d,ia=$&&j||$&&!m,ma=a&&(d||l)&&d?e.isAfter(a)&&e.isBefore(d):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),fa=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),J=()=>{if(o.value.filter(ca=>{var va;for(const Va in ca)if((va=ca[Va])!=null&&va.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(C&&F&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&j&&(k(e,a,d)||k(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(oa||na)return k(e,t,m)||k(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(sa||da)return k(e,a,d)||k(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(ua)return"bg-fm-color-primary";if(ia)return"bg-fm-color-system-info-300";if(k(e,a,d)&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-system-success-100";if(ma)return"bg-fm-color-system-warning-100";if(fa)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${J()}`]:oa||sa,[`fm-calendar__cell__button--selected-end ${J()}`]:na||da,[`fm-calendar__cell__button--selected-between ${J()}`]:ma||fa,[`fm-calendar__cell__button--selected ${J()}`]:ua||ia}},ta=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){ue.value=e;return}ue.value=null},wa=e=>{de.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},Ma=U(()=>_.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),Ca=e=>{O.value="",_.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},G=U(()=>{if(!n.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=_.value&&Array.isArray(n.value)?n.value[0].startDate:n.value.startDate,a=_.value&&Array.isArray(n.value)?n.value[0].endDate:n.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"}}),Ba=U(()=>{const e=_.value&&Array.isArray(n.value)?n.value[1].startDate:null,a=_.value&&Array.isArray(n.value)?n.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return He(()=>n.value,()=>{var e,a;_.value?o.value=n.value.map(d=>({startDate:d!=null&&d.startDate?r(d.startDate,s):null,endDate:d!=null&&d.endDate?r(d.endDate,s):null})):o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null}}),(e,a)=>(i(),Q($a,{modelValue:p(n),"onUpdate:modelValue":a[8]||(a[8]=d=>ve(n)?n.value=d:null),disabled:g.value,focused:v.value,"helper-state":e.helperState,"helper-text":_.value?Ba.value:e.helperText,rules:e.rules,tag:"div"},pe({default:y(({invalid:d})=>[c(Ta,{disabled:g.value,"show-popover":v.value,"z-index":w.zIndex,onPopoverChanged:a[7]||(a[7]=t=>v.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?B(e.$slots,"trigger-button",fe(ce({key:0},{opened:v.value,invalid:d,showValidBorder:e.showValidBorder,isComparing:_.value,disabled:g.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?h("",!0):(i(),f("div",De,[u("label",_e,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.startLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.startDate?p(r)(p(n).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),he,u("label",ge,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.endLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.endDate?p(r)(p(n).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",Ye,[c(ie,{label:e.compareLabel},null,8,["label"]),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),focused:v.value,invalid:d,"show-valid-border":e.showValidBorder},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(G.value.startDate)+" - "+b(G.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):h("",!0)],64))]),default:y(()=>[u("div",xe,[e.showPredefinedRange?(i(),f("div",ke,[(i(!0),f(x,null,V(e.predefinedRange,(t,m)=>(i(),Q(ha,{key:m,label:t.label,"model-value":de.value===t.label,selectable:"",onClick:l=>wa(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",we,[c(Fa,{inset:""})])):h("",!0),e.compare?(i(),f(x,{key:1},[c(Na,{"model-value":_.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>Ca(t))},null,8,["model-value"]),_.value?(i(),f(x,{key:0},V(z,(t,m)=>c(ha,{key:m,label:t.label,"model-value":O.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):h("",!0)],64)):h("",!0)])):h("",!0),e.showPredefinedRange?(i(),f("div",Me)):h("",!0),u("div",{class:D({"pl-4":e.showPredefinedRange})},[u("div",Ce,[_.value?(i(),f("div",Be,[u("label",Ve,[c(ie,{label:"Custom"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(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-en-body-lg-400"])},b(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Pe,u("label",Ae,[c(ie,{label:"Compare"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(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-en-body-lg-400"])},b(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):h("",!0),u("div",Oe,[u("div",Se,[u("div",$e,[u("div",Le,[c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>I("left",T.value.subtract(1,"month")))}),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>I("left",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>I("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Re,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",Te,[(i(!0),f(x,null,V(p(ya)(T.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",ze)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,Ie)):h("",!0)]))),128))]))),128))])])]),u("div",Ue,[u("div",Ee,[u("div",Fe,[c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>I("right",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>I("right",t))},null,8,["max","min","model-value"])]),c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>I("left",T.value.add(1,"month")))})]),u("div",null,[u("div",je,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",null,[(i(!0),f(x,null,V(p(ya)(E.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",Ne)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,We)):h("",!0)]))),128))]))),128))])])])])]),u("div",qe,[c(Da,{label:"Cancel",size:"md",variant:"tertiary",onClick:ka}),c(Da,{disabled:Ma.value,label:"Apply",size:"md",variant:"primary",onClick:xa},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[B(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ka(Je,[["__scopeId","data-v-a35b0ec8"]]),{defineComponent:Qe}=await N("vue"),{unref:A,normalizeProps:Z,guardReactiveProps:ee,renderSlot:ae,isRef:te,mergeProps:le,withCtx:re,createSlots:oe,openBlock:q,createBlock:se,createCommentVNode:ne,Fragment:Xe,createElementBlock:Ze}=await N("vue"),ga=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(L){const z=L,{breakpoints:w}=Qa(),M=_a(z,"modelValue"),R=Ia(z);return(n,o)=>(q(),Ze(Xe,null,[A(w).md||A(w).lg?(q(),se(Ke,le({key:0},A(R),{modelValue:A(M),"onUpdate:modelValue":o[0]||(o[0]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0),A(w).xs||A(w).sm?(q(),se(Ga,le({key:1},A(R),{modelValue:A(M),"onUpdate:modelValue":o[1]||(o[1]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0)],64))}})});export{ga as _,Za as __tla};
|