origam 2.38.0 → 2.38.2
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/CHANGELOG.md +34 -0
- package/dist/src/assets/locales/en.json +1 -1
- package/dist/src/assets/locales/fr.json +2 -2
- package/dist/src/components/Alert/OrigamAlert.vue +739 -165
- package/dist/src/components/App/OrigamApp.vue +95 -19
- package/dist/src/components/App/OrigamAppBar.vue +751 -158
- package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
- package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
- package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
- package/dist/src/components/Badge/OrigamBadge.vue +548 -135
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
- package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
- package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
- package/dist/src/components/Btn/OrigamBtn.vue +928 -249
- package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
- package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
- package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
- package/dist/src/components/Card/OrigamCard.vue +938 -194
- package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
- package/dist/src/components/Card/OrigamCardText.vue +536 -84
- package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
- package/dist/src/components/Chart/OrigamChart.vue +942 -452
- package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
- package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
- package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
- package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
- package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
- package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
- package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
- package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
- package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
- package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
- package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
- package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
- package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
- package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
- package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
- package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
- package/dist/src/components/Chip/OrigamChip.vue +867 -202
- package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
- package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
- package/dist/src/components/Code/OrigamCode.vue +844 -206
- package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
- package/dist/src/components/Counter/OrigamCounter.vue +588 -96
- package/dist/src/components/DataList/OrigamDataList.vue +619 -113
- package/dist/src/components/DataList/OrigamDataText.vue +295 -65
- package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
- package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
- package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
- package/dist/src/components/Divider/OrigamDivider.vue +210 -50
- package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
- package/dist/src/components/Field/OrigamField.vue +1118 -306
- package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
- package/dist/src/components/Form/OrigamForm.vue +197 -74
- package/dist/src/components/Grid/OrigamGrid.vue +707 -147
- package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
- package/dist/src/components/Grids/OrigamCol.vue +593 -110
- package/dist/src/components/Grids/OrigamContainer.vue +461 -80
- package/dist/src/components/Grids/OrigamRow.vue +573 -112
- package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
- package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
- package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
- package/dist/src/components/Icon/OrigamIcon.vue +561 -98
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
- package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
- package/dist/src/components/Img/OrigamImg.vue +869 -228
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
- package/dist/src/components/Input/OrigamInput.vue +747 -180
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
- package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
- package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
- package/dist/src/components/Label/OrigamLabel.vue +584 -95
- package/dist/src/components/Layout/OrigamLayout.vue +563 -94
- package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
- package/dist/src/components/List/OrigamList.vue +755 -170
- package/dist/src/components/List/OrigamListChildren.vue +59 -19
- package/dist/src/components/List/OrigamListGroup.vue +631 -134
- package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
- package/dist/src/components/List/OrigamListItem.vue +890 -224
- package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
- package/dist/src/components/List/OrigamListSubheader.vue +542 -93
- package/dist/src/components/Loader/OrigamLoader.vue +110 -25
- package/dist/src/components/Main/OrigamMain.vue +565 -96
- package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
- package/dist/src/components/Media/OrigamMediaController.vue +465 -182
- package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
- package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
- package/dist/src/components/Messages/OrigamMessages.vue +606 -97
- package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
- package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
- package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
- package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
- package/dist/src/components/Picker/OrigamPicker.vue +655 -108
- package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
- package/dist/src/components/Progress/OrigamProgress.vue +436 -70
- package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
- package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
- package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
- package/dist/src/components/Radio/OrigamRadio.vue +772 -132
- package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
- package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
- package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
- package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
- package/dist/src/components/Select/OrigamSelect.vue +1639 -567
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
- package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
- package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
- package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
- package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
- package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
- package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
- package/dist/src/components/Table/OrigamTable.vue +585 -124
- package/dist/src/components/Tabs/OrigamTab.vue +239 -73
- package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
- package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
- package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
- package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
- package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
- package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
- package/dist/src/components/Title/OrigamTitle.vue +505 -82
- package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
- package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
- package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
- package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
- package/dist/src/components/Transition/OrigamFade.vue +47 -9
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
- package/dist/src/components/Transition/OrigamSnack.vue +52 -10
- package/dist/src/components/Transition/OrigamTransition.vue +40 -12
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
- package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
- package/dist/src/components/Video/OrigamVideo.vue +1178 -331
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
- package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
- package/dist/src/components/Window/OrigamWindow.vue +745 -175
- package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
- package/dist/src/composables/Commons/display.composable.cjs +2 -0
- package/dist/src/composables/Commons/display.composable.js +1 -1
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
- package/package.json +8 -8
|
@@ -113,352 +113,1139 @@ import { CALENDAR_STRATEGY } from "../../enums/Commons/calendar.enum";
|
|
|
113
113
|
import { DATE_MODE } from "../../enums/DatePicker/date-picker.enum";
|
|
114
114
|
import { wrapInArray } from "../../utils/Commons/commons.util";
|
|
115
115
|
import { computed, ref, shallowRef, StyleValue, useSlots, watch } from "vue";
|
|
116
|
+
/*********************************************************
|
|
117
|
+
* Global
|
|
118
|
+
*
|
|
119
|
+
* @description
|
|
120
|
+
* Props, emits, composables and top-level refs.
|
|
121
|
+
********************************************************/
|
|
116
122
|
const props = defineProps({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
123
|
+
modelValue: {
|
|
124
|
+
type: [
|
|
125
|
+
String,
|
|
126
|
+
Date,
|
|
127
|
+
Array
|
|
128
|
+
],
|
|
129
|
+
required: false
|
|
130
|
+
},
|
|
131
|
+
id: {
|
|
132
|
+
type: String,
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
class: {
|
|
136
|
+
type: [
|
|
137
|
+
String,
|
|
138
|
+
Array,
|
|
139
|
+
Object
|
|
140
|
+
],
|
|
141
|
+
required: false
|
|
142
|
+
},
|
|
143
|
+
style: {
|
|
144
|
+
type: [
|
|
145
|
+
String,
|
|
146
|
+
Array,
|
|
147
|
+
Object,
|
|
148
|
+
Boolean,
|
|
149
|
+
null
|
|
150
|
+
],
|
|
151
|
+
required: false,
|
|
152
|
+
skipCheck: true
|
|
153
|
+
},
|
|
154
|
+
color: {
|
|
155
|
+
type: [
|
|
156
|
+
String,
|
|
157
|
+
Object,
|
|
158
|
+
Boolean,
|
|
159
|
+
null
|
|
160
|
+
],
|
|
161
|
+
required: false,
|
|
162
|
+
skipCheck: true
|
|
163
|
+
},
|
|
164
|
+
border: {
|
|
165
|
+
type: [
|
|
166
|
+
Boolean,
|
|
167
|
+
Number,
|
|
168
|
+
String,
|
|
169
|
+
Array
|
|
170
|
+
],
|
|
171
|
+
required: false,
|
|
172
|
+
skipCheck: true
|
|
173
|
+
},
|
|
174
|
+
borderTop: {
|
|
175
|
+
type: [
|
|
176
|
+
Boolean,
|
|
177
|
+
Number,
|
|
178
|
+
String
|
|
179
|
+
],
|
|
180
|
+
required: false
|
|
181
|
+
},
|
|
182
|
+
borderLeft: {
|
|
183
|
+
type: [
|
|
184
|
+
Boolean,
|
|
185
|
+
Number,
|
|
186
|
+
String
|
|
187
|
+
],
|
|
188
|
+
required: false
|
|
189
|
+
},
|
|
190
|
+
borderBottom: {
|
|
191
|
+
type: [
|
|
192
|
+
Boolean,
|
|
193
|
+
Number,
|
|
194
|
+
String
|
|
195
|
+
],
|
|
196
|
+
required: false
|
|
197
|
+
},
|
|
198
|
+
borderRight: {
|
|
199
|
+
type: [
|
|
200
|
+
Boolean,
|
|
201
|
+
Number,
|
|
202
|
+
String
|
|
203
|
+
],
|
|
204
|
+
required: false
|
|
205
|
+
},
|
|
206
|
+
borderBlock: {
|
|
207
|
+
type: [
|
|
208
|
+
Boolean,
|
|
209
|
+
Number,
|
|
210
|
+
String
|
|
211
|
+
],
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
borderInline: {
|
|
215
|
+
type: [
|
|
216
|
+
Boolean,
|
|
217
|
+
Number,
|
|
218
|
+
String
|
|
219
|
+
],
|
|
220
|
+
required: false
|
|
221
|
+
},
|
|
222
|
+
borderInlineStart: {
|
|
223
|
+
type: [
|
|
224
|
+
Boolean,
|
|
225
|
+
Number,
|
|
226
|
+
String
|
|
227
|
+
],
|
|
228
|
+
required: false
|
|
229
|
+
},
|
|
230
|
+
borderInlineEnd: {
|
|
231
|
+
type: [
|
|
232
|
+
Boolean,
|
|
233
|
+
Number,
|
|
234
|
+
String
|
|
235
|
+
],
|
|
236
|
+
required: false
|
|
237
|
+
},
|
|
238
|
+
borderBlockStart: {
|
|
239
|
+
type: [
|
|
240
|
+
Boolean,
|
|
241
|
+
Number,
|
|
242
|
+
String
|
|
243
|
+
],
|
|
244
|
+
required: false
|
|
245
|
+
},
|
|
246
|
+
borderBlockEnd: {
|
|
247
|
+
type: [
|
|
248
|
+
Boolean,
|
|
249
|
+
Number,
|
|
250
|
+
String
|
|
251
|
+
],
|
|
252
|
+
required: false
|
|
253
|
+
},
|
|
254
|
+
borderColor: {
|
|
255
|
+
type: String,
|
|
256
|
+
required: false
|
|
257
|
+
},
|
|
258
|
+
borderStyle: {
|
|
259
|
+
type: String,
|
|
260
|
+
required: false
|
|
261
|
+
},
|
|
262
|
+
borderTopColor: {
|
|
263
|
+
type: [
|
|
264
|
+
String,
|
|
265
|
+
Object,
|
|
266
|
+
Boolean,
|
|
267
|
+
null
|
|
268
|
+
],
|
|
269
|
+
required: false,
|
|
270
|
+
skipCheck: true
|
|
271
|
+
},
|
|
272
|
+
borderRightColor: {
|
|
273
|
+
type: [
|
|
274
|
+
String,
|
|
275
|
+
Object,
|
|
276
|
+
Boolean,
|
|
277
|
+
null
|
|
278
|
+
],
|
|
279
|
+
required: false,
|
|
280
|
+
skipCheck: true
|
|
281
|
+
},
|
|
282
|
+
borderBottomColor: {
|
|
283
|
+
type: [
|
|
284
|
+
String,
|
|
285
|
+
Object,
|
|
286
|
+
Boolean,
|
|
287
|
+
null
|
|
288
|
+
],
|
|
289
|
+
required: false,
|
|
290
|
+
skipCheck: true
|
|
291
|
+
},
|
|
292
|
+
borderLeftColor: {
|
|
293
|
+
type: [
|
|
294
|
+
String,
|
|
295
|
+
Object,
|
|
296
|
+
Boolean,
|
|
297
|
+
null
|
|
298
|
+
],
|
|
299
|
+
required: false,
|
|
300
|
+
skipCheck: true
|
|
301
|
+
},
|
|
302
|
+
borderInlineStartColor: {
|
|
303
|
+
type: [
|
|
304
|
+
String,
|
|
305
|
+
Object,
|
|
306
|
+
Boolean,
|
|
307
|
+
null
|
|
308
|
+
],
|
|
309
|
+
required: false,
|
|
310
|
+
skipCheck: true
|
|
311
|
+
},
|
|
312
|
+
borderInlineEndColor: {
|
|
313
|
+
type: [
|
|
314
|
+
String,
|
|
315
|
+
Object,
|
|
316
|
+
Boolean,
|
|
317
|
+
null
|
|
318
|
+
],
|
|
319
|
+
required: false,
|
|
320
|
+
skipCheck: true
|
|
321
|
+
},
|
|
322
|
+
borderBlockStartColor: {
|
|
323
|
+
type: [
|
|
324
|
+
String,
|
|
325
|
+
Object,
|
|
326
|
+
Boolean,
|
|
327
|
+
null
|
|
328
|
+
],
|
|
329
|
+
required: false,
|
|
330
|
+
skipCheck: true
|
|
331
|
+
},
|
|
332
|
+
borderBlockEndColor: {
|
|
333
|
+
type: [
|
|
334
|
+
String,
|
|
335
|
+
Object,
|
|
336
|
+
Boolean,
|
|
337
|
+
null
|
|
338
|
+
],
|
|
339
|
+
required: false,
|
|
340
|
+
skipCheck: true
|
|
341
|
+
},
|
|
342
|
+
rounded: {
|
|
343
|
+
type: [
|
|
344
|
+
Boolean,
|
|
345
|
+
Number,
|
|
346
|
+
String,
|
|
347
|
+
null
|
|
348
|
+
],
|
|
349
|
+
required: false,
|
|
350
|
+
skipCheck: true
|
|
351
|
+
},
|
|
352
|
+
roundedTopRight: {
|
|
353
|
+
type: [
|
|
354
|
+
Boolean,
|
|
355
|
+
Number,
|
|
356
|
+
String
|
|
357
|
+
],
|
|
358
|
+
required: false
|
|
359
|
+
},
|
|
360
|
+
roundedTopLeft: {
|
|
361
|
+
type: [
|
|
362
|
+
Boolean,
|
|
363
|
+
Number,
|
|
364
|
+
String
|
|
365
|
+
],
|
|
366
|
+
required: false
|
|
367
|
+
},
|
|
368
|
+
roundedBottomLeft: {
|
|
369
|
+
type: [
|
|
370
|
+
Boolean,
|
|
371
|
+
Number,
|
|
372
|
+
String
|
|
373
|
+
],
|
|
374
|
+
required: false
|
|
375
|
+
},
|
|
376
|
+
roundedBottomRight: {
|
|
377
|
+
type: [
|
|
378
|
+
Boolean,
|
|
379
|
+
Number,
|
|
380
|
+
String
|
|
381
|
+
],
|
|
382
|
+
required: false
|
|
383
|
+
},
|
|
384
|
+
roundedStartStart: {
|
|
385
|
+
type: [
|
|
386
|
+
Boolean,
|
|
387
|
+
Number,
|
|
388
|
+
String
|
|
389
|
+
],
|
|
390
|
+
required: false
|
|
391
|
+
},
|
|
392
|
+
roundedStartEnd: {
|
|
393
|
+
type: [
|
|
394
|
+
Boolean,
|
|
395
|
+
Number,
|
|
396
|
+
String
|
|
397
|
+
],
|
|
398
|
+
required: false
|
|
399
|
+
},
|
|
400
|
+
roundedEndStart: {
|
|
401
|
+
type: [
|
|
402
|
+
Boolean,
|
|
403
|
+
Number,
|
|
404
|
+
String
|
|
405
|
+
],
|
|
406
|
+
required: false
|
|
407
|
+
},
|
|
408
|
+
roundedEndEnd: {
|
|
409
|
+
type: [
|
|
410
|
+
Boolean,
|
|
411
|
+
Number,
|
|
412
|
+
String
|
|
413
|
+
],
|
|
414
|
+
required: false
|
|
415
|
+
},
|
|
416
|
+
elevation: {
|
|
417
|
+
type: [Number, String],
|
|
418
|
+
required: false
|
|
419
|
+
},
|
|
420
|
+
padding: {
|
|
421
|
+
type: [
|
|
422
|
+
Boolean,
|
|
423
|
+
Number,
|
|
424
|
+
String
|
|
425
|
+
],
|
|
426
|
+
required: false
|
|
427
|
+
},
|
|
428
|
+
paddingTop: {
|
|
429
|
+
type: [
|
|
430
|
+
Boolean,
|
|
431
|
+
Number,
|
|
432
|
+
String
|
|
433
|
+
],
|
|
434
|
+
required: false
|
|
435
|
+
},
|
|
436
|
+
paddingLeft: {
|
|
437
|
+
type: [
|
|
438
|
+
Boolean,
|
|
439
|
+
Number,
|
|
440
|
+
String
|
|
441
|
+
],
|
|
442
|
+
required: false
|
|
443
|
+
},
|
|
444
|
+
paddingBottom: {
|
|
445
|
+
type: [
|
|
446
|
+
Boolean,
|
|
447
|
+
Number,
|
|
448
|
+
String
|
|
449
|
+
],
|
|
450
|
+
required: false
|
|
451
|
+
},
|
|
452
|
+
paddingRight: {
|
|
453
|
+
type: [
|
|
454
|
+
Boolean,
|
|
455
|
+
Number,
|
|
456
|
+
String
|
|
457
|
+
],
|
|
458
|
+
required: false
|
|
459
|
+
},
|
|
460
|
+
paddingBlock: {
|
|
461
|
+
type: [
|
|
462
|
+
Boolean,
|
|
463
|
+
Number,
|
|
464
|
+
String
|
|
465
|
+
],
|
|
466
|
+
required: false
|
|
467
|
+
},
|
|
468
|
+
paddingInline: {
|
|
469
|
+
type: [
|
|
470
|
+
Boolean,
|
|
471
|
+
Number,
|
|
472
|
+
String
|
|
473
|
+
],
|
|
474
|
+
required: false
|
|
475
|
+
},
|
|
476
|
+
paddingInlineStart: {
|
|
477
|
+
type: [
|
|
478
|
+
Boolean,
|
|
479
|
+
Number,
|
|
480
|
+
String
|
|
481
|
+
],
|
|
482
|
+
required: false
|
|
483
|
+
},
|
|
484
|
+
paddingInlineEnd: {
|
|
485
|
+
type: [
|
|
486
|
+
Boolean,
|
|
487
|
+
Number,
|
|
488
|
+
String
|
|
489
|
+
],
|
|
490
|
+
required: false
|
|
491
|
+
},
|
|
492
|
+
paddingBlockStart: {
|
|
493
|
+
type: [
|
|
494
|
+
Boolean,
|
|
495
|
+
Number,
|
|
496
|
+
String
|
|
497
|
+
],
|
|
498
|
+
required: false
|
|
499
|
+
},
|
|
500
|
+
paddingBlockEnd: {
|
|
501
|
+
type: [
|
|
502
|
+
Boolean,
|
|
503
|
+
Number,
|
|
504
|
+
String
|
|
505
|
+
],
|
|
506
|
+
required: false
|
|
507
|
+
},
|
|
508
|
+
margin: {
|
|
509
|
+
type: [
|
|
510
|
+
Boolean,
|
|
511
|
+
Number,
|
|
512
|
+
String
|
|
513
|
+
],
|
|
514
|
+
required: false
|
|
515
|
+
},
|
|
516
|
+
marginTop: {
|
|
517
|
+
type: [
|
|
518
|
+
Boolean,
|
|
519
|
+
Number,
|
|
520
|
+
String
|
|
521
|
+
],
|
|
522
|
+
required: false
|
|
523
|
+
},
|
|
524
|
+
marginLeft: {
|
|
525
|
+
type: [
|
|
526
|
+
Boolean,
|
|
527
|
+
Number,
|
|
528
|
+
String
|
|
529
|
+
],
|
|
530
|
+
required: false
|
|
531
|
+
},
|
|
532
|
+
marginBottom: {
|
|
533
|
+
type: [
|
|
534
|
+
Boolean,
|
|
535
|
+
Number,
|
|
536
|
+
String
|
|
537
|
+
],
|
|
538
|
+
required: false
|
|
539
|
+
},
|
|
540
|
+
marginRight: {
|
|
541
|
+
type: [
|
|
542
|
+
Boolean,
|
|
543
|
+
Number,
|
|
544
|
+
String
|
|
545
|
+
],
|
|
546
|
+
required: false
|
|
547
|
+
},
|
|
548
|
+
marginBlock: {
|
|
549
|
+
type: [
|
|
550
|
+
Boolean,
|
|
551
|
+
Number,
|
|
552
|
+
String
|
|
553
|
+
],
|
|
554
|
+
required: false
|
|
555
|
+
},
|
|
556
|
+
marginInline: {
|
|
557
|
+
type: [
|
|
558
|
+
Boolean,
|
|
559
|
+
Number,
|
|
560
|
+
String
|
|
561
|
+
],
|
|
562
|
+
required: false
|
|
563
|
+
},
|
|
564
|
+
marginInlineStart: {
|
|
565
|
+
type: [
|
|
566
|
+
Boolean,
|
|
567
|
+
Number,
|
|
568
|
+
String
|
|
569
|
+
],
|
|
570
|
+
required: false
|
|
571
|
+
},
|
|
572
|
+
marginInlineEnd: {
|
|
573
|
+
type: [
|
|
574
|
+
Boolean,
|
|
575
|
+
Number,
|
|
576
|
+
String
|
|
577
|
+
],
|
|
578
|
+
required: false
|
|
579
|
+
},
|
|
580
|
+
marginBlockStart: {
|
|
581
|
+
type: [
|
|
582
|
+
Boolean,
|
|
583
|
+
Number,
|
|
584
|
+
String
|
|
585
|
+
],
|
|
586
|
+
required: false
|
|
587
|
+
},
|
|
588
|
+
marginBlockEnd: {
|
|
589
|
+
type: [
|
|
590
|
+
Boolean,
|
|
591
|
+
Number,
|
|
592
|
+
String
|
|
593
|
+
],
|
|
594
|
+
required: false
|
|
595
|
+
},
|
|
596
|
+
landscape: {
|
|
597
|
+
type: Boolean,
|
|
598
|
+
required: false
|
|
599
|
+
},
|
|
600
|
+
hideHeader: {
|
|
601
|
+
type: Boolean,
|
|
602
|
+
required: false
|
|
603
|
+
},
|
|
604
|
+
side: {
|
|
605
|
+
type: null,
|
|
606
|
+
required: false
|
|
607
|
+
},
|
|
608
|
+
swipeable: {
|
|
609
|
+
type: Boolean,
|
|
610
|
+
required: false
|
|
611
|
+
},
|
|
612
|
+
snapPoints: {
|
|
613
|
+
type: Array,
|
|
614
|
+
required: false
|
|
615
|
+
},
|
|
616
|
+
defaultSnap: {
|
|
617
|
+
type: null,
|
|
618
|
+
required: false
|
|
619
|
+
},
|
|
620
|
+
open: {
|
|
621
|
+
type: Boolean,
|
|
622
|
+
required: false
|
|
623
|
+
},
|
|
624
|
+
disabled: {
|
|
625
|
+
type: Boolean,
|
|
626
|
+
required: false
|
|
627
|
+
},
|
|
628
|
+
persistent: {
|
|
629
|
+
type: Boolean,
|
|
630
|
+
required: false
|
|
631
|
+
},
|
|
632
|
+
handleLabel: {
|
|
633
|
+
type: String,
|
|
634
|
+
required: false
|
|
635
|
+
},
|
|
636
|
+
tag: {
|
|
637
|
+
type: String,
|
|
638
|
+
required: false
|
|
639
|
+
},
|
|
640
|
+
bgColor: {
|
|
641
|
+
type: [
|
|
642
|
+
String,
|
|
643
|
+
Object,
|
|
644
|
+
Boolean,
|
|
645
|
+
null
|
|
646
|
+
],
|
|
647
|
+
required: false,
|
|
648
|
+
skipCheck: true
|
|
649
|
+
},
|
|
650
|
+
height: {
|
|
651
|
+
type: [Number, String],
|
|
652
|
+
required: false
|
|
653
|
+
},
|
|
654
|
+
maxHeight: {
|
|
655
|
+
type: [Number, String],
|
|
656
|
+
required: false
|
|
657
|
+
},
|
|
658
|
+
maxWidth: {
|
|
659
|
+
type: [Number, String],
|
|
660
|
+
required: false
|
|
661
|
+
},
|
|
662
|
+
minHeight: {
|
|
663
|
+
type: [Number, String],
|
|
664
|
+
required: false
|
|
665
|
+
},
|
|
666
|
+
minWidth: {
|
|
667
|
+
type: [Number, String],
|
|
668
|
+
required: false
|
|
669
|
+
},
|
|
670
|
+
width: {
|
|
671
|
+
type: [Number, String],
|
|
672
|
+
required: false
|
|
673
|
+
},
|
|
674
|
+
location: {
|
|
675
|
+
type: null,
|
|
676
|
+
required: false
|
|
677
|
+
},
|
|
678
|
+
position: {
|
|
679
|
+
type: null,
|
|
680
|
+
required: false
|
|
681
|
+
},
|
|
682
|
+
top: {
|
|
683
|
+
type: [Number, String],
|
|
684
|
+
required: false
|
|
685
|
+
},
|
|
686
|
+
bottom: {
|
|
687
|
+
type: [Number, String],
|
|
688
|
+
required: false
|
|
689
|
+
},
|
|
690
|
+
left: {
|
|
691
|
+
type: [Number, String],
|
|
692
|
+
required: false
|
|
693
|
+
},
|
|
694
|
+
right: {
|
|
695
|
+
type: [Number, String],
|
|
696
|
+
required: false
|
|
697
|
+
},
|
|
698
|
+
active: {
|
|
699
|
+
type: [Boolean, Object],
|
|
700
|
+
required: false
|
|
701
|
+
},
|
|
702
|
+
activeClass: {
|
|
703
|
+
type: String,
|
|
704
|
+
required: false
|
|
705
|
+
},
|
|
706
|
+
hover: {
|
|
707
|
+
type: [Boolean, Object],
|
|
708
|
+
required: false
|
|
709
|
+
},
|
|
710
|
+
hoverClass: {
|
|
711
|
+
type: String,
|
|
712
|
+
required: false
|
|
713
|
+
},
|
|
714
|
+
title: {
|
|
715
|
+
type: String,
|
|
716
|
+
required: false,
|
|
717
|
+
default: "origam.date_picker.title"
|
|
718
|
+
},
|
|
719
|
+
fontSize: {
|
|
720
|
+
type: null,
|
|
721
|
+
required: false
|
|
722
|
+
},
|
|
723
|
+
fontWeight: {
|
|
724
|
+
type: null,
|
|
725
|
+
required: false
|
|
726
|
+
},
|
|
727
|
+
letterSpacing: {
|
|
728
|
+
type: null,
|
|
729
|
+
required: false
|
|
730
|
+
},
|
|
731
|
+
disabledMonth: {
|
|
732
|
+
type: Boolean,
|
|
733
|
+
required: false
|
|
734
|
+
},
|
|
735
|
+
disabledYear: {
|
|
736
|
+
type: Boolean,
|
|
737
|
+
required: false
|
|
738
|
+
},
|
|
739
|
+
disabledNext: {
|
|
740
|
+
type: Boolean,
|
|
741
|
+
required: false
|
|
742
|
+
},
|
|
743
|
+
disabledPrev: {
|
|
744
|
+
type: Boolean,
|
|
745
|
+
required: false
|
|
746
|
+
},
|
|
747
|
+
nextIcon: {
|
|
748
|
+
type: null,
|
|
749
|
+
required: false
|
|
750
|
+
},
|
|
751
|
+
prevIcon: {
|
|
752
|
+
type: null,
|
|
753
|
+
required: false
|
|
754
|
+
},
|
|
755
|
+
modeIcon: {
|
|
756
|
+
type: null,
|
|
757
|
+
required: false
|
|
758
|
+
},
|
|
759
|
+
text: {
|
|
760
|
+
type: String,
|
|
761
|
+
required: false
|
|
762
|
+
},
|
|
763
|
+
yearText: {
|
|
764
|
+
type: String,
|
|
765
|
+
required: false
|
|
766
|
+
},
|
|
767
|
+
viewMode: {
|
|
768
|
+
type: null,
|
|
769
|
+
required: false
|
|
770
|
+
},
|
|
771
|
+
hideWeekdays: {
|
|
772
|
+
type: Boolean,
|
|
773
|
+
required: false
|
|
774
|
+
},
|
|
775
|
+
multiple: {
|
|
776
|
+
type: [
|
|
777
|
+
Boolean,
|
|
778
|
+
Number,
|
|
779
|
+
String,
|
|
780
|
+
Object
|
|
781
|
+
],
|
|
782
|
+
required: false
|
|
783
|
+
},
|
|
784
|
+
range: {
|
|
785
|
+
type: Boolean,
|
|
786
|
+
required: false
|
|
787
|
+
},
|
|
788
|
+
showWeek: {
|
|
789
|
+
type: Boolean,
|
|
790
|
+
required: false
|
|
791
|
+
},
|
|
792
|
+
transition: {
|
|
793
|
+
type: Object,
|
|
794
|
+
required: false
|
|
795
|
+
},
|
|
796
|
+
reverseTransition: {
|
|
797
|
+
type: Object,
|
|
798
|
+
required: false
|
|
799
|
+
},
|
|
800
|
+
allowedDates: {
|
|
801
|
+
type: [Array, Function],
|
|
802
|
+
required: false
|
|
803
|
+
},
|
|
804
|
+
displayValue: {
|
|
805
|
+
type: null,
|
|
806
|
+
required: false
|
|
807
|
+
},
|
|
808
|
+
date: {
|
|
809
|
+
type: Array,
|
|
810
|
+
required: false
|
|
811
|
+
},
|
|
812
|
+
month: {
|
|
813
|
+
type: Number,
|
|
814
|
+
required: false
|
|
815
|
+
},
|
|
816
|
+
max: {
|
|
817
|
+
type: null,
|
|
818
|
+
required: false
|
|
819
|
+
},
|
|
820
|
+
min: {
|
|
821
|
+
type: null,
|
|
822
|
+
required: false
|
|
823
|
+
},
|
|
824
|
+
showAdjacentMonths: {
|
|
825
|
+
type: Boolean,
|
|
826
|
+
required: false
|
|
827
|
+
},
|
|
828
|
+
year: {
|
|
829
|
+
type: Number,
|
|
830
|
+
required: false
|
|
831
|
+
},
|
|
832
|
+
weekdays: {
|
|
833
|
+
type: Array,
|
|
834
|
+
required: false
|
|
835
|
+
},
|
|
836
|
+
weeksInMonth: {
|
|
837
|
+
type: null,
|
|
838
|
+
required: false,
|
|
839
|
+
default: CALENDAR_STRATEGY.STATIC
|
|
840
|
+
},
|
|
841
|
+
firstDayOfWeek: {
|
|
842
|
+
type: Number,
|
|
843
|
+
required: false
|
|
844
|
+
},
|
|
845
|
+
header: {
|
|
846
|
+
type: String,
|
|
847
|
+
required: false,
|
|
848
|
+
default: "origam.date_picker.header"
|
|
849
|
+
},
|
|
850
|
+
appendAvatar: {
|
|
851
|
+
type: String,
|
|
852
|
+
required: false
|
|
853
|
+
},
|
|
854
|
+
appendIcon: {
|
|
855
|
+
type: null,
|
|
856
|
+
required: false
|
|
857
|
+
},
|
|
858
|
+
prependAvatar: {
|
|
859
|
+
type: String,
|
|
860
|
+
required: false
|
|
861
|
+
},
|
|
862
|
+
prependIcon: {
|
|
863
|
+
type: null,
|
|
864
|
+
required: false
|
|
865
|
+
},
|
|
866
|
+
prependAriaLabel: {
|
|
867
|
+
type: String,
|
|
868
|
+
required: false
|
|
869
|
+
},
|
|
870
|
+
appendAriaLabel: {
|
|
871
|
+
type: String,
|
|
872
|
+
required: false
|
|
873
|
+
},
|
|
874
|
+
density: {
|
|
875
|
+
type: null,
|
|
876
|
+
required: false
|
|
877
|
+
}
|
|
242
878
|
});
|
|
243
|
-
const emits = defineEmits([
|
|
879
|
+
const emits = defineEmits([
|
|
880
|
+
"update:month",
|
|
881
|
+
"update:year",
|
|
882
|
+
"update:viewMode",
|
|
883
|
+
"update:modelValue"
|
|
884
|
+
]);
|
|
244
885
|
defineSlots();
|
|
245
886
|
const slots = useSlots();
|
|
246
887
|
const { filterProps } = useProps(props);
|
|
247
888
|
const { t } = useLocale();
|
|
248
889
|
const adapter = useDate();
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
);
|
|
890
|
+
/*********************************************************
|
|
891
|
+
* Value
|
|
892
|
+
*
|
|
893
|
+
* @description
|
|
894
|
+
* Model binding, view-mode state and date internals.
|
|
895
|
+
********************************************************/
|
|
896
|
+
const model = useVModel(props, "modelValue", undefined, (v) => wrapInArray(v), (v) => props.multiple || props.range ? v : v[0]);
|
|
256
897
|
const viewMode = useVModel(props, "viewMode", DATE_MODE.MONTH);
|
|
257
898
|
const viewModeIsMonth = computed(() => {
|
|
258
|
-
|
|
899
|
+
return viewMode.value === DATE_MODE.MONTH;
|
|
259
900
|
});
|
|
260
901
|
const viewModeIsMonths = computed(() => {
|
|
261
|
-
|
|
902
|
+
return viewMode.value === DATE_MODE.MONTHS;
|
|
262
903
|
});
|
|
263
904
|
const viewModeIsYears = computed(() => {
|
|
264
|
-
|
|
905
|
+
return viewMode.value === DATE_MODE.YEARS;
|
|
265
906
|
});
|
|
266
907
|
const internal = computed(() => {
|
|
267
|
-
|
|
268
|
-
|
|
908
|
+
const value = adapter.date(model.value?.[0]);
|
|
909
|
+
return value && adapter.isValid(value) ? value : adapter.date();
|
|
269
910
|
});
|
|
911
|
+
/*********************************************************
|
|
912
|
+
* month / year — displayed month/year, ADR-005 lazy seed
|
|
913
|
+
*
|
|
914
|
+
* @description
|
|
915
|
+
* `month`/`year` (from `ICalendarProps`) carry no `withDefaults`
|
|
916
|
+
* default, so `props.month`/`props.year` are `undefined` unless the
|
|
917
|
+
* consumer passes them explicitly OR a theme sets one on
|
|
918
|
+
* `origam-date-picker`. They used to be seeded via a plain
|
|
919
|
+
* `ref(Number(props.month ?? ...))` — an EAGER read in the body of
|
|
920
|
+
* `setup()`. Vue runs `setup()` BEFORE the `beforeCreate` hook where
|
|
921
|
+
* the ADR-005 theme-props resolver patches `instance.props` (root
|
|
922
|
+
* CLAUDE.md), so a theme default for `month`/`year` was captured too
|
|
923
|
+
* late and silently lost. Same family as #429/#448 — fixed the same
|
|
924
|
+
* way: the internal ref starts `UNSEEDED`, and the fallback
|
|
925
|
+
* expression is only evaluated on first read, through the writable
|
|
926
|
+
* `month`/`year` computed below (evaluated at render, comfortably
|
|
927
|
+
* after `beforeCreate`). Every existing call site (`month.value++`,
|
|
928
|
+
* `v-model:month="month"`, …) keeps working unchanged since a
|
|
929
|
+
* writable `computed` implements the same `.value` interface as a
|
|
930
|
+
* `ref`.
|
|
931
|
+
********************************************************/
|
|
270
932
|
const internalMonth = ref(UNSEEDED);
|
|
271
933
|
const month = computed({
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
934
|
+
get: () => internalMonth.value === UNSEEDED ? Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))) : internalMonth.value,
|
|
935
|
+
set: (value) => {
|
|
936
|
+
internalMonth.value = value;
|
|
937
|
+
}
|
|
276
938
|
});
|
|
277
939
|
const internalYear = ref(UNSEEDED);
|
|
278
940
|
const year = computed({
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
941
|
+
get: () => internalYear.value === UNSEEDED ? Number(props.year ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))) : internalYear.value,
|
|
942
|
+
set: (value) => {
|
|
943
|
+
internalYear.value = value;
|
|
944
|
+
}
|
|
283
945
|
});
|
|
284
946
|
const isReversing = shallowRef(false);
|
|
285
947
|
const header = computed(() => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
948
|
+
if ((props.multiple || props.range) && model.value?.length > 1) {
|
|
949
|
+
return t("origam.date_picker.items_selected", model.value?.length);
|
|
950
|
+
}
|
|
951
|
+
return model.value?.[0] && adapter.isValid(model.value?.[0]) ? adapter.format(adapter.date(model.value?.[0]), "normalDateWithWeekday") : t(props.header);
|
|
290
952
|
});
|
|
953
|
+
/*********************************************************
|
|
954
|
+
* monthText / controlsText / controlsYearText (#700, #1365)
|
|
955
|
+
*
|
|
956
|
+
* @description
|
|
957
|
+
* The derived month label used to be called `text`, which MASKED the
|
|
958
|
+
* `text` prop. `IDatePickerProps` reaches `text?: string` through
|
|
959
|
+
* `Omit<IDatePickerControlsProps, 'active'>` — the `Omit` drops
|
|
960
|
+
* `active`, NOT `text` — so the prop is genuinely declared and a
|
|
961
|
+
* consumer can pass it. But in `<script lang="ts" setup>` the template reads a
|
|
962
|
+
* prop by its BARE NAME, so a module-scope binding of the same name
|
|
963
|
+
* wins: `:text="text"` forwarded the derived label, never the prop.
|
|
964
|
+
* `props.text` was read nowhere else, and `text` sits in the
|
|
965
|
+
* `filterProps` exclusion list of `datePickerControlsProps` below —
|
|
966
|
+
* which is the opposite of a read — so no second path existed:
|
|
967
|
+
* `<origam-date-picker text="…">` was silently ignored.
|
|
968
|
+
* Same family as #622 / #665 / #666 / #693 / #696.
|
|
969
|
+
*
|
|
970
|
+
* @description
|
|
971
|
+
* `controlsText` is what `<origam-date-picker-controls>` receives,
|
|
972
|
+
* and `text` there is the visible LABEL of the month button — the
|
|
973
|
+
* ONLY place the user reads which month is on screen. `text` carries
|
|
974
|
+
* no `withDefaults` default, so `props.text` is `undefined` unless
|
|
975
|
+
* the consumer (or a theme, cf. ADR-005 — the read sits inside a
|
|
976
|
+
* `computed`, therefore lazy, therefore late enough for the
|
|
977
|
+
* resolver) sets it: the unset case resolves to `monthAndYearText`,
|
|
978
|
+
* byte for byte what the component rendered before this fix.
|
|
979
|
+
*
|
|
980
|
+
* @description
|
|
981
|
+
* The fallback is `||`, not `??` — same operator as the `label` fix
|
|
982
|
+
* of #665 / #666 (PR #692), for the same reason: an EMPTY string
|
|
983
|
+
* would leave the toolbar with no month indication at all, which is
|
|
984
|
+
* a hole rather than a feature. `''` therefore falls back too.
|
|
985
|
+
*
|
|
986
|
+
* @description
|
|
987
|
+
* ⛔ `text` MUST stay in the `filterProps` exclusion list. The
|
|
988
|
+
* template binds `:text="controlsText"` BEFORE `v-bind="{...
|
|
989
|
+
* datePickerControlsProps}"`; a later `v-bind` wins, so letting
|
|
990
|
+
* `text` through the passthrough would bypass this computed entirely
|
|
991
|
+
* and reinstate a different variant of the same defect (the derived
|
|
992
|
+
* month/year label would never be rendered again).
|
|
993
|
+
********************************************************/
|
|
291
994
|
const displayedDate = computed(() => {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
995
|
+
let date = adapter.date();
|
|
996
|
+
date = adapter.setDate(date, 1);
|
|
997
|
+
date = adapter.setMonth(date, month.value);
|
|
998
|
+
return adapter.setYear(date, year.value);
|
|
296
999
|
});
|
|
297
1000
|
const monthText = computed(() => adapter.format(displayedDate.value, "month"));
|
|
298
1001
|
const displayedYearText = computed(() => adapter.format(displayedDate.value, "year"));
|
|
299
1002
|
const controlsText = computed(() => {
|
|
300
|
-
|
|
1003
|
+
return props.text || monthText.value;
|
|
301
1004
|
});
|
|
302
1005
|
const controlsYearText = computed(() => {
|
|
303
|
-
|
|
1006
|
+
return props.yearText || displayedYearText.value;
|
|
304
1007
|
});
|
|
305
1008
|
const headerTransition = computed(() => {
|
|
306
|
-
|
|
307
|
-
component: isReversing.value ? OrigamReverseTranslatePicker : OrigamTranslatePicker
|
|
308
|
-
};
|
|
1009
|
+
return { component: isReversing.value ? OrigamReverseTranslatePicker : OrigamTranslatePicker };
|
|
309
1010
|
});
|
|
310
1011
|
const minDate = computed(() => {
|
|
311
|
-
|
|
312
|
-
|
|
1012
|
+
const date = adapter.date(props.min);
|
|
1013
|
+
return props.min && adapter.isValid(date) ? date : null;
|
|
313
1014
|
});
|
|
314
1015
|
const maxDate = computed(() => {
|
|
315
|
-
|
|
316
|
-
|
|
1016
|
+
const date = adapter.date(props.max);
|
|
1017
|
+
return props.max && adapter.isValid(date) ? date : null;
|
|
317
1018
|
});
|
|
1019
|
+
/*********************************************************
|
|
1020
|
+
* Disabled controls
|
|
1021
|
+
*
|
|
1022
|
+
* @description
|
|
1023
|
+
* Computes which navigation controls should be disabled based on min/max constraints.
|
|
1024
|
+
* prev/next shift the day grid, so they are disabled on the months/years grids.
|
|
1025
|
+
********************************************************/
|
|
318
1026
|
const disabledControlers = computed(() => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
1027
|
+
if (props.disabled) return { disabled: props.disabled };
|
|
1028
|
+
const targets = {
|
|
1029
|
+
disabledMonth: props.disabledMonth,
|
|
1030
|
+
disabledYear: props.disabledYear,
|
|
1031
|
+
disabledNext: props.disabledNext,
|
|
1032
|
+
disabledPrev: props.disabledPrev
|
|
1033
|
+
};
|
|
1034
|
+
if (!viewModeIsMonth.value) {
|
|
1035
|
+
targets.disabledNext = true;
|
|
1036
|
+
targets.disabledPrev = true;
|
|
1037
|
+
} else {
|
|
1038
|
+
let _date = adapter.date();
|
|
1039
|
+
_date = adapter.setYear(_date, year.value);
|
|
1040
|
+
_date = adapter.setMonth(_date, month.value);
|
|
1041
|
+
if (minDate.value) {
|
|
1042
|
+
const date = adapter.addDays(adapter.startOfMonth(_date), -1);
|
|
1043
|
+
if (adapter.isAfter(minDate.value, date)) {
|
|
1044
|
+
targets.disabledPrev = true;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
if (maxDate.value) {
|
|
1048
|
+
const date = adapter.addDays(adapter.endOfMonth(_date), 1);
|
|
1049
|
+
if (adapter.isAfter(date, maxDate.value)) {
|
|
1050
|
+
targets.disabledNext = true;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
return targets;
|
|
347
1055
|
});
|
|
1056
|
+
/*********************************************************
|
|
1057
|
+
* Event handlers
|
|
1058
|
+
*
|
|
1059
|
+
* @description
|
|
1060
|
+
* Navigation and view-mode click handlers.
|
|
1061
|
+
********************************************************/
|
|
348
1062
|
const handleClickNext = () => {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
1063
|
+
if (month.value < 11) {
|
|
1064
|
+
month.value++;
|
|
1065
|
+
} else {
|
|
1066
|
+
year.value++;
|
|
1067
|
+
month.value = 0;
|
|
1068
|
+
handleUpdateYear(year.value);
|
|
1069
|
+
}
|
|
1070
|
+
handleUpdateMonth(month.value);
|
|
357
1071
|
};
|
|
358
1072
|
const handleClickPrev = () => {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
1073
|
+
if (month.value > 0) {
|
|
1074
|
+
month.value--;
|
|
1075
|
+
} else {
|
|
1076
|
+
year.value--;
|
|
1077
|
+
month.value = 11;
|
|
1078
|
+
handleUpdateYear(year.value);
|
|
1079
|
+
}
|
|
1080
|
+
handleUpdateMonth(month.value);
|
|
367
1081
|
};
|
|
368
1082
|
const handleClickDate = () => {
|
|
369
|
-
|
|
1083
|
+
viewMode.value = DATE_MODE.MONTH;
|
|
370
1084
|
};
|
|
1085
|
+
/*********************************************************
|
|
1086
|
+
* handleHeaderClick (#410)
|
|
1087
|
+
*
|
|
1088
|
+
* @description
|
|
1089
|
+
* The header's `@click` used to bind a ternary expression
|
|
1090
|
+
* (`!viewModeIsMonth ? handleClickDate : undefined`) directly — a
|
|
1091
|
+
* non-trivial expression on an event binding is evaluated once and
|
|
1092
|
+
* its RESULT (a function reference, or `undefined`) becomes the
|
|
1093
|
+
* handler; `handleClickDate` itself was therefore returned, never
|
|
1094
|
+
* invoked. A dedicated named handler keeps the branch out of the
|
|
1095
|
+
* template (repo convention) and actually calls it.
|
|
1096
|
+
********************************************************/
|
|
371
1097
|
const handleHeaderClick = () => {
|
|
372
|
-
|
|
1098
|
+
if (!viewModeIsMonth.value) handleClickDate();
|
|
373
1099
|
};
|
|
374
1100
|
const handleClickMonth = () => {
|
|
375
|
-
|
|
1101
|
+
viewMode.value = viewModeIsMonths.value ? DATE_MODE.MONTH : DATE_MODE.MONTHS;
|
|
376
1102
|
};
|
|
377
1103
|
const handleClickYear = () => {
|
|
378
|
-
|
|
1104
|
+
viewMode.value = viewModeIsYears.value ? DATE_MODE.MONTH : DATE_MODE.YEARS;
|
|
379
1105
|
};
|
|
380
1106
|
const handleUpdateMonth = (value) => {
|
|
381
|
-
|
|
382
|
-
|
|
1107
|
+
if (viewModeIsMonths.value) handleClickMonth();
|
|
1108
|
+
emits("update:month", value);
|
|
383
1109
|
};
|
|
384
1110
|
const handleUpdateYear = (value) => {
|
|
385
|
-
|
|
386
|
-
|
|
1111
|
+
if (viewModeIsYears.value) viewMode.value = DATE_MODE.MONTHS;
|
|
1112
|
+
emits("update:year", value);
|
|
387
1113
|
};
|
|
388
1114
|
watch(model, (val, oldVal) => {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1115
|
+
const arrBefore = wrapInArray(oldVal);
|
|
1116
|
+
const arrAfter = wrapInArray(val);
|
|
1117
|
+
if (!arrAfter.length) return;
|
|
1118
|
+
const before = adapter.date(arrBefore[arrBefore.length - 1]);
|
|
1119
|
+
const after = adapter.date(arrAfter[arrAfter.length - 1]);
|
|
1120
|
+
const newMonth = adapter.getMonth(after);
|
|
1121
|
+
const newYear = adapter.getYear(after);
|
|
1122
|
+
if (newMonth !== month.value) {
|
|
1123
|
+
month.value = newMonth;
|
|
1124
|
+
handleUpdateMonth(month.value);
|
|
1125
|
+
}
|
|
1126
|
+
if (newYear !== year.value) {
|
|
1127
|
+
year.value = newYear;
|
|
1128
|
+
handleUpdateYear(year.value);
|
|
1129
|
+
}
|
|
1130
|
+
isReversing.value = adapter.isBefore(before, after);
|
|
405
1131
|
});
|
|
1132
|
+
/*********************************************************
|
|
1133
|
+
* Props forwarding
|
|
1134
|
+
*
|
|
1135
|
+
* @description
|
|
1136
|
+
* Filtered props passed down to child picker sub-components.
|
|
1137
|
+
********************************************************/
|
|
406
1138
|
const origamPickerRef = ref();
|
|
407
1139
|
const origamDatePickerControlsRef = ref();
|
|
408
1140
|
const origamDatePickerHeaderRef = ref();
|
|
409
1141
|
const origamDatePickerMonthRef = ref();
|
|
410
1142
|
const origamDatePickerMonthsRef = ref();
|
|
411
1143
|
const origamDatePickerYearsRef = ref();
|
|
1144
|
+
/*********************************************************
|
|
1145
|
+
* Forwarded props
|
|
1146
|
+
********************************************************/
|
|
412
1147
|
const pickerProps = computed(() => {
|
|
413
|
-
|
|
1148
|
+
return origamPickerRef.value?.filterProps(props, [
|
|
1149
|
+
"class",
|
|
1150
|
+
"style",
|
|
1151
|
+
"title",
|
|
1152
|
+
"id"
|
|
1153
|
+
]);
|
|
414
1154
|
});
|
|
415
1155
|
const datePickerControlsProps = computed(() => {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
1156
|
+
// Cast: `props` is IDatePickerProps ⊃ IDatePickerControlsProps.
|
|
1157
|
+
// filterProps is typed against the child's T=IDatePickerControlsProps and
|
|
1158
|
+
// its <U extends Partial<ExtractPropTypes<T>>> constraint rejects the wider
|
|
1159
|
+
// type. The cast is safe — every key of IDatePickerControlsProps is present
|
|
1160
|
+
// in IDatePickerProps.
|
|
1161
|
+
return origamDatePickerControlsRef.value?.filterProps(props, [
|
|
1162
|
+
"class",
|
|
1163
|
+
"style",
|
|
1164
|
+
"id",
|
|
1165
|
+
"text",
|
|
1166
|
+
"yearText",
|
|
1167
|
+
"viewMode",
|
|
1168
|
+
"disabled"
|
|
1169
|
+
]);
|
|
420
1170
|
});
|
|
421
1171
|
const datePickerHeaderProps = computed(() => {
|
|
422
|
-
|
|
1172
|
+
return origamDatePickerHeaderRef.value?.filterProps(props, [
|
|
1173
|
+
"class",
|
|
1174
|
+
"style",
|
|
1175
|
+
"header",
|
|
1176
|
+
"id"
|
|
1177
|
+
]);
|
|
423
1178
|
});
|
|
424
1179
|
const datePickerMonthProps = computed(() => {
|
|
425
|
-
|
|
1180
|
+
return origamDatePickerMonthRef.value?.filterProps(props, [
|
|
1181
|
+
"class",
|
|
1182
|
+
"style",
|
|
1183
|
+
"id",
|
|
1184
|
+
"date",
|
|
1185
|
+
"min",
|
|
1186
|
+
"max",
|
|
1187
|
+
"year",
|
|
1188
|
+
"month"
|
|
1189
|
+
]);
|
|
426
1190
|
});
|
|
427
1191
|
const datePickerMonthsProps = computed(() => {
|
|
428
|
-
|
|
1192
|
+
return origamDatePickerMonthsRef.value?.filterProps(props, [
|
|
1193
|
+
"class",
|
|
1194
|
+
"style",
|
|
1195
|
+
"id",
|
|
1196
|
+
"month",
|
|
1197
|
+
"min",
|
|
1198
|
+
"max",
|
|
1199
|
+
"year"
|
|
1200
|
+
]);
|
|
429
1201
|
});
|
|
430
1202
|
const datePickerYearsProps = computed(() => {
|
|
431
|
-
|
|
1203
|
+
return origamDatePickerYearsRef.value?.filterProps(props, [
|
|
1204
|
+
"class",
|
|
1205
|
+
"style",
|
|
1206
|
+
"id",
|
|
1207
|
+
"year",
|
|
1208
|
+
"min",
|
|
1209
|
+
"max"
|
|
1210
|
+
]);
|
|
432
1211
|
});
|
|
433
1212
|
const headerProps = computed(() => {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
1213
|
+
return {
|
|
1214
|
+
header: header.value,
|
|
1215
|
+
transition: headerTransition.value
|
|
1216
|
+
};
|
|
438
1217
|
});
|
|
1218
|
+
/*********************************************************
|
|
1219
|
+
* Class & Style
|
|
1220
|
+
*
|
|
1221
|
+
* @description
|
|
1222
|
+
* Root element classes and inline styles.
|
|
1223
|
+
********************************************************/
|
|
439
1224
|
const datePickerStyles = computed(() => {
|
|
440
|
-
|
|
441
|
-
props.style
|
|
442
|
-
];
|
|
1225
|
+
return [props.style];
|
|
443
1226
|
});
|
|
444
1227
|
const datePickerClasses = computed(() => {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
props.class
|
|
452
|
-
];
|
|
1228
|
+
return [
|
|
1229
|
+
"origam-date-picker",
|
|
1230
|
+
`origam-date-picker--${viewMode.value}`,
|
|
1231
|
+
{ "origam-date-picker--show-week": props.showWeek },
|
|
1232
|
+
props.class
|
|
1233
|
+
];
|
|
453
1234
|
});
|
|
454
1235
|
const { id, css, load, isLoaded, unload } = useStyle(datePickerStyles, () => props.id);
|
|
1236
|
+
/*********************************************************
|
|
1237
|
+
* Expose
|
|
1238
|
+
*
|
|
1239
|
+
* @description
|
|
1240
|
+
* Public API surface exposed to parent components.
|
|
1241
|
+
********************************************************/
|
|
455
1242
|
defineExpose({
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
1243
|
+
filterProps,
|
|
1244
|
+
css,
|
|
1245
|
+
id,
|
|
1246
|
+
load,
|
|
1247
|
+
unload,
|
|
1248
|
+
isLoaded
|
|
462
1249
|
});
|
|
463
1250
|
</script>
|
|
464
1251
|
|