origam 2.38.1 → 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 +24 -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 +6 -6
|
@@ -80,22 +80,110 @@ import { LOADER_KIND } from "../../enums/Commons/loader.enum";
|
|
|
80
80
|
import { PROGRESS_TYPE } from "../../enums/Progress/progress.enum";
|
|
81
81
|
import { pickDataTableHeaderColumnSlotNames } from "../../utils/DataTable/slot-name.util";
|
|
82
82
|
import { computed, ref, StyleValue, useSlots } from "vue";
|
|
83
|
+
/*********************************************************
|
|
84
|
+
* Global
|
|
85
|
+
********************************************************/
|
|
86
|
+
/*********************************************************
|
|
87
|
+
* inheritAttrs — #916 / #853
|
|
88
|
+
*
|
|
89
|
+
* @description
|
|
90
|
+
* BOTH branches of the root `v-if="mobile"` render a `<slot>`, and
|
|
91
|
+
* `renderSlot()` returns a FRAGMENT vnode — the root is a fragment in
|
|
92
|
+
* either case. Vue cannot merge fallthrough attributes onto a fragment
|
|
93
|
+
* and logs "Extraneous non-props attributes", whose trace serialises the
|
|
94
|
+
* whole ancestor chain including Vue Router's `RouteProvider` vnode
|
|
95
|
+
* (~4.4 MB per occurrence, #853).
|
|
96
|
+
*
|
|
97
|
+
* ⛔ NOTHING is forwarded, deliberately, and this one is a JUDGEMENT the
|
|
98
|
+
* next reader should be able to re-open: the slot's DEFAULT content is a
|
|
99
|
+
* single `<origam-data-table-headers-cell(-mobile)>`, so attributes
|
|
100
|
+
* COULD be pushed onto it. They are not, because a consumer overriding
|
|
101
|
+
* the slot leaves that element non-existent — the attributes would then
|
|
102
|
+
* land somewhere in one configuration and nowhere in the other, which is
|
|
103
|
+
* worse than consistently nowhere. Measured on `develop` before this
|
|
104
|
+
* flag, a consumer's `class` / `data-cy` / `aria-label` reached NOTHING;
|
|
105
|
+
* the flag keeps exactly that, and the cell's own `class` / `style` come
|
|
106
|
+
* from the `dataTableHeadersClasses` / `…Styles` props as before.
|
|
107
|
+
********************************************************/
|
|
83
108
|
defineOptions({ inheritAttrs: false });
|
|
84
109
|
const props = defineProps({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
110
|
+
id: {
|
|
111
|
+
type: String,
|
|
112
|
+
required: false
|
|
113
|
+
},
|
|
114
|
+
class: {
|
|
115
|
+
type: [
|
|
116
|
+
String,
|
|
117
|
+
Array,
|
|
118
|
+
Object
|
|
119
|
+
],
|
|
120
|
+
required: false
|
|
121
|
+
},
|
|
122
|
+
style: {
|
|
123
|
+
type: [
|
|
124
|
+
String,
|
|
125
|
+
Array,
|
|
126
|
+
Object,
|
|
127
|
+
Boolean,
|
|
128
|
+
null
|
|
129
|
+
],
|
|
130
|
+
required: false,
|
|
131
|
+
skipCheck: true
|
|
132
|
+
},
|
|
133
|
+
color: {
|
|
134
|
+
type: [
|
|
135
|
+
String,
|
|
136
|
+
Object,
|
|
137
|
+
Boolean,
|
|
138
|
+
null
|
|
139
|
+
],
|
|
140
|
+
required: false,
|
|
141
|
+
skipCheck: true
|
|
142
|
+
},
|
|
143
|
+
mobileBreakpoint: {
|
|
144
|
+
type: null,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
loading: {
|
|
148
|
+
type: [
|
|
149
|
+
Boolean,
|
|
150
|
+
Number,
|
|
151
|
+
Object
|
|
152
|
+
],
|
|
153
|
+
required: false
|
|
154
|
+
},
|
|
155
|
+
loadingText: {
|
|
156
|
+
type: String,
|
|
157
|
+
required: false
|
|
158
|
+
},
|
|
159
|
+
tag: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: false
|
|
162
|
+
},
|
|
163
|
+
disableSort: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
required: false
|
|
166
|
+
},
|
|
167
|
+
headerProps: {
|
|
168
|
+
type: null,
|
|
169
|
+
required: false
|
|
170
|
+
},
|
|
171
|
+
sticky: {
|
|
172
|
+
type: Boolean,
|
|
173
|
+
required: false
|
|
174
|
+
},
|
|
175
|
+
multiSort: {
|
|
176
|
+
type: Boolean,
|
|
177
|
+
required: false
|
|
178
|
+
},
|
|
179
|
+
sortAscIcon: {
|
|
180
|
+
type: null,
|
|
181
|
+
required: false
|
|
182
|
+
},
|
|
183
|
+
sortDescIcon: {
|
|
184
|
+
type: null,
|
|
185
|
+
required: false
|
|
186
|
+
}
|
|
99
187
|
});
|
|
100
188
|
defineEmits([]);
|
|
101
189
|
defineSlots();
|
|
@@ -103,58 +191,79 @@ const { filterProps } = useProps(props);
|
|
|
103
191
|
const slots = useSlots();
|
|
104
192
|
const origamDataTableHeadersCellRef = ref();
|
|
105
193
|
const origamDataTableHeadersCellMobileRef = ref();
|
|
194
|
+
/*********************************************************
|
|
195
|
+
* Composables
|
|
196
|
+
********************************************************/
|
|
106
197
|
const { toggleSort, sortBy, isSorted } = useSort();
|
|
107
198
|
const { someSelected, allSelected, selectAll } = useSelection();
|
|
108
199
|
const { columns, headers } = useHeaders();
|
|
200
|
+
/*********************************************************
|
|
201
|
+
* Loader
|
|
202
|
+
********************************************************/
|
|
109
203
|
const { loaderClasses, loaderConfig } = useLoader(props, LOADER_KIND.LINE);
|
|
110
204
|
const { getSortIcon } = useHeadersCell(props);
|
|
111
205
|
const { displayClasses, mobile } = useDisplay(props);
|
|
112
206
|
const slotProps = computed(() => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
207
|
+
return {
|
|
208
|
+
headers: headers.value,
|
|
209
|
+
columns: columns.value,
|
|
210
|
+
toggleSort,
|
|
211
|
+
isSorted,
|
|
212
|
+
sortBy: sortBy.value,
|
|
213
|
+
someSelected: someSelected.value,
|
|
214
|
+
allSelected: allSelected.value,
|
|
215
|
+
selectAll,
|
|
216
|
+
getSortIcon
|
|
217
|
+
};
|
|
124
218
|
});
|
|
219
|
+
/*********************************************************
|
|
220
|
+
* Forwarded props
|
|
221
|
+
********************************************************/
|
|
125
222
|
const dataTableHeadersCellProps = computed(() => {
|
|
126
|
-
|
|
223
|
+
return origamDataTableHeadersCellRef.value?.filterProps(props);
|
|
127
224
|
});
|
|
128
225
|
const dataTableHeadersCellMobileProps = computed(() => {
|
|
129
|
-
|
|
226
|
+
return origamDataTableHeadersCellMobileRef.value?.filterProps(props);
|
|
130
227
|
});
|
|
228
|
+
/*********************************************************
|
|
229
|
+
* Forwarded slots (#550, critere C7)
|
|
230
|
+
*
|
|
231
|
+
* @description
|
|
232
|
+
* `header.{cle}` est rendu tout au bout de la chaine, par
|
|
233
|
+
* `<origam-data-table-header-cell>`. Ce composant et
|
|
234
|
+
* `<origam-data-table-headers-cell>` ne font que le convoyer : sans ce
|
|
235
|
+
* relais, un `<template #header.commits>` ecrit sur
|
|
236
|
+
* `<origam-data-table>` n'atteignait jamais le `<th>`.
|
|
237
|
+
********************************************************/
|
|
131
238
|
const headerColumnSlotNames = computed(() => {
|
|
132
|
-
|
|
239
|
+
return pickDataTableHeaderColumnSlotNames(Object.keys(slots));
|
|
133
240
|
});
|
|
241
|
+
/*********************************************************
|
|
242
|
+
* Class & Style
|
|
243
|
+
********************************************************/
|
|
134
244
|
const dataTableHeadersClasses = computed(() => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
props.class
|
|
143
|
-
];
|
|
245
|
+
return [
|
|
246
|
+
"origam-data-table-headers",
|
|
247
|
+
{ "origam-data-table-headers--sticky": props.sticky },
|
|
248
|
+
displayClasses.value,
|
|
249
|
+
loaderClasses.value,
|
|
250
|
+
props.class
|
|
251
|
+
];
|
|
144
252
|
});
|
|
145
253
|
const dataTableHeadersStyles = computed(() => {
|
|
146
|
-
|
|
147
|
-
props.style
|
|
148
|
-
];
|
|
254
|
+
return [props.style];
|
|
149
255
|
});
|
|
150
256
|
const { id, css, load, isLoaded, unload } = useStyle(dataTableHeadersStyles, () => props.id);
|
|
257
|
+
/*********************************************************
|
|
258
|
+
* Expose
|
|
259
|
+
********************************************************/
|
|
151
260
|
defineExpose({
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
261
|
+
filterProps,
|
|
262
|
+
css,
|
|
263
|
+
id,
|
|
264
|
+
load,
|
|
265
|
+
unload,
|
|
266
|
+
isLoaded
|
|
158
267
|
});
|
|
159
268
|
</script>
|
|
160
269
|
|
|
@@ -42,52 +42,170 @@ import { useProps } from "../../composables/Commons/props.composable";
|
|
|
42
42
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
43
43
|
import { pickDataTableHeaderColumnSlotNames } from "../../utils/DataTable/slot-name.util";
|
|
44
44
|
import { computed, ref, StyleValue, useSlots } from "vue";
|
|
45
|
+
/*********************************************************
|
|
46
|
+
* Global
|
|
47
|
+
********************************************************/
|
|
48
|
+
/*********************************************************
|
|
49
|
+
* inheritAttrs — #916 / #853
|
|
50
|
+
*
|
|
51
|
+
* @description
|
|
52
|
+
* The template root is a `<template v-for="(row, y) in headers">`, i.e. a
|
|
53
|
+
* FRAGMENT of N `<tr>` elements. A `v-for` root compiles to a Fragment
|
|
54
|
+
* block even when the list holds a single entry, so there is no
|
|
55
|
+
* configuration in which this component has a single root. Vue cannot
|
|
56
|
+
* merge fallthrough attributes onto a fragment and logs "Extraneous
|
|
57
|
+
* non-props attributes", whose trace serialises every ancestor's props
|
|
58
|
+
* including Vue Router's `RouteProvider` vnode (~4.4 MB, #853).
|
|
59
|
+
*
|
|
60
|
+
* ⛔ NOTHING is forwarded, deliberately: N sibling `<tr>` rows have no
|
|
61
|
+
* single home for one `id` / `data-cy` / `aria-label`, and duplicating a
|
|
62
|
+
* consumer's `id` across rows would produce invalid markup. Measured on
|
|
63
|
+
* `develop` before this flag, a consumer's attributes reached NONE of the
|
|
64
|
+
* rows — the flag preserves that exactly.
|
|
65
|
+
********************************************************/
|
|
45
66
|
defineOptions({ inheritAttrs: false });
|
|
46
67
|
const props = defineProps({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
headers: {
|
|
69
|
+
type: Array,
|
|
70
|
+
required: true
|
|
71
|
+
},
|
|
72
|
+
id: {
|
|
73
|
+
type: String,
|
|
74
|
+
required: false
|
|
75
|
+
},
|
|
76
|
+
class: {
|
|
77
|
+
type: [
|
|
78
|
+
String,
|
|
79
|
+
Array,
|
|
80
|
+
Object
|
|
81
|
+
],
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
style: {
|
|
85
|
+
type: [
|
|
86
|
+
String,
|
|
87
|
+
Array,
|
|
88
|
+
Object,
|
|
89
|
+
Boolean,
|
|
90
|
+
null
|
|
91
|
+
],
|
|
92
|
+
required: false,
|
|
93
|
+
skipCheck: true
|
|
94
|
+
},
|
|
95
|
+
color: {
|
|
96
|
+
type: [
|
|
97
|
+
String,
|
|
98
|
+
Object,
|
|
99
|
+
Boolean,
|
|
100
|
+
null
|
|
101
|
+
],
|
|
102
|
+
required: false,
|
|
103
|
+
skipCheck: true
|
|
104
|
+
},
|
|
105
|
+
disableSort: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
109
|
+
headerProps: {
|
|
110
|
+
type: null,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
113
|
+
sticky: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
multiSort: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
sortAscIcon: {
|
|
122
|
+
type: null,
|
|
123
|
+
required: false
|
|
124
|
+
},
|
|
125
|
+
sortDescIcon: {
|
|
126
|
+
type: null,
|
|
127
|
+
required: false
|
|
128
|
+
}
|
|
58
129
|
});
|
|
59
130
|
defineEmits([]);
|
|
60
131
|
defineSlots();
|
|
61
132
|
const { filterProps } = useProps(props);
|
|
62
133
|
const slots = useSlots();
|
|
63
134
|
const origamDataTableHeaderCellRef = ref();
|
|
135
|
+
/*********************************************************
|
|
136
|
+
* Forwarded slots (#550, critere C7)
|
|
137
|
+
*
|
|
138
|
+
* @description
|
|
139
|
+
* Dernier maillon avant `<origam-data-table-header-cell>`, qui rend
|
|
140
|
+
* `header.{cle}`. `IDataTableHeadersCellSlots` etait declaree VIDE et
|
|
141
|
+
* decrivait le composant comme un « pur relais » — il relayait les
|
|
142
|
+
* props, pas les slots, et le contenu d'en-tete personnalise mourait
|
|
143
|
+
* ici.
|
|
144
|
+
********************************************************/
|
|
64
145
|
const headerColumnSlotNames = computed(() => {
|
|
65
|
-
|
|
146
|
+
return pickDataTableHeaderColumnSlotNames(Object.keys(slots));
|
|
66
147
|
});
|
|
148
|
+
/*********************************************************
|
|
149
|
+
* Forwarded props
|
|
150
|
+
********************************************************/
|
|
67
151
|
const dataTableHeaderCellProps = computed(() => {
|
|
68
|
-
|
|
152
|
+
// Pre-fix this used `Array.prototype.some()` to "iterate" the
|
|
153
|
+
// ref collection — but `.some()` returns a BOOLEAN, not the
|
|
154
|
+
// filtered props object. Result: every per-cell `v-bind` was
|
|
155
|
+
// receiving `true`, which Vue treats as "no props bound", so
|
|
156
|
+
// `sortAscIcon` / `sortDescIcon` (and any other forwarded
|
|
157
|
+
// IHeaderCellProps) never reached the inner
|
|
158
|
+
// `<origam-data-table-header-cell>`. The sort icon then
|
|
159
|
+
// resolved through OrigamComponentIcon's fallback path with
|
|
160
|
+
// `icon: undefined`, rendering an empty `<!--v-if-->`. Take
|
|
161
|
+
// the first ref's `filterProps`: every header cell shares the
|
|
162
|
+
// same component type, so the prop schema is identical.
|
|
163
|
+
return origamDataTableHeaderCellRef.value?.[0]?.filterProps(props);
|
|
69
164
|
});
|
|
165
|
+
/*********************************************************
|
|
166
|
+
* Class & Style
|
|
167
|
+
********************************************************/
|
|
70
168
|
const dataTableHeadersCellClasses = computed(() => {
|
|
71
|
-
|
|
72
|
-
props.class
|
|
73
|
-
];
|
|
169
|
+
return [props.class];
|
|
74
170
|
});
|
|
75
171
|
const dataTableHeadersCellStyles = computed(() => {
|
|
76
|
-
|
|
77
|
-
props.style
|
|
78
|
-
];
|
|
172
|
+
return [props.style];
|
|
79
173
|
});
|
|
80
174
|
const { id, css, load, isLoaded, unload } = useStyle(dataTableHeadersCellStyles, () => props.id);
|
|
175
|
+
/*********************************************************
|
|
176
|
+
* headerRowId — la PREMIERE ligne porte l'id du consommateur tel quel
|
|
177
|
+
*
|
|
178
|
+
* @description
|
|
179
|
+
* #372 avait donne un id a chacune des `<tr>` de cette racine-fragment,
|
|
180
|
+
* toutes DERIVEES (`<id>-row-<n>`). Necessaire — un id doit etre unique,
|
|
181
|
+
* et il y a N lignes d'en-tetes quand les colonnes sont groupees — mais
|
|
182
|
+
* la derivation etait appliquee AUSSI a la premiere, si bien qu'aucun
|
|
183
|
+
* noeud ne portait jamais la valeur EXACTE demandee par le consommateur.
|
|
184
|
+
*
|
|
185
|
+
* @description
|
|
186
|
+
* #790 mesure les deux consequences : un `getElementById('<id>')` ne
|
|
187
|
+
* trouvait rien, et la regle `#<id> { … }` injectee par le `useStyle`
|
|
188
|
+
* ci-dessus — qui recoit bien `() => props.id` — ne matchait aucun
|
|
189
|
+
* noeud : un style MORT. Ancrer la ligne 0 sur la valeur exacte referme
|
|
190
|
+
* les deux d'un seul geste, les lignes suivantes gardant leur suffixe.
|
|
191
|
+
*
|
|
192
|
+
* @description
|
|
193
|
+
* ⛔ Pas de doublon : les lignes 1..N restent suffixees, et rien d'autre
|
|
194
|
+
* dans cet arbre ne porte `props.id`.
|
|
195
|
+
********************************************************/
|
|
81
196
|
const headerRowId = (index) => {
|
|
82
|
-
|
|
83
|
-
|
|
197
|
+
if (!props.id) return undefined;
|
|
198
|
+
return index === 0 ? props.id : `${props.id}-row-${index}`;
|
|
84
199
|
};
|
|
200
|
+
/*********************************************************
|
|
201
|
+
* Expose
|
|
202
|
+
********************************************************/
|
|
85
203
|
defineExpose({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
204
|
+
filterProps,
|
|
205
|
+
css,
|
|
206
|
+
id,
|
|
207
|
+
load,
|
|
208
|
+
unload,
|
|
209
|
+
isLoaded
|
|
92
210
|
});
|
|
93
211
|
</script>
|
|
@@ -199,78 +199,161 @@ import { useStyle } from "../../composables/Commons/style.composable";
|
|
|
199
199
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
200
200
|
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
201
201
|
import { computed, mergeProps, useSlots } from "vue";
|
|
202
|
+
/*********************************************************
|
|
203
|
+
* Global
|
|
204
|
+
********************************************************/
|
|
202
205
|
const props = defineProps({
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
206
|
+
columns: {
|
|
207
|
+
type: Array,
|
|
208
|
+
required: true
|
|
209
|
+
},
|
|
210
|
+
colspan: {
|
|
211
|
+
type: Number,
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
id: {
|
|
215
|
+
type: String,
|
|
216
|
+
required: false
|
|
217
|
+
},
|
|
218
|
+
class: {
|
|
219
|
+
type: [
|
|
220
|
+
String,
|
|
221
|
+
Array,
|
|
222
|
+
Object
|
|
223
|
+
],
|
|
224
|
+
required: false
|
|
225
|
+
},
|
|
226
|
+
style: {
|
|
227
|
+
type: [
|
|
228
|
+
String,
|
|
229
|
+
Array,
|
|
230
|
+
Object,
|
|
231
|
+
Boolean,
|
|
232
|
+
null
|
|
233
|
+
],
|
|
234
|
+
required: false,
|
|
235
|
+
skipCheck: true
|
|
236
|
+
},
|
|
237
|
+
disableSort: {
|
|
238
|
+
type: Boolean,
|
|
239
|
+
required: false
|
|
240
|
+
},
|
|
241
|
+
headerProps: {
|
|
242
|
+
type: null,
|
|
243
|
+
required: false
|
|
244
|
+
},
|
|
245
|
+
sticky: {
|
|
246
|
+
type: Boolean,
|
|
247
|
+
required: false
|
|
248
|
+
},
|
|
249
|
+
multiSort: {
|
|
250
|
+
type: Boolean,
|
|
251
|
+
required: false
|
|
252
|
+
},
|
|
253
|
+
sortAscIcon: {
|
|
254
|
+
type: null,
|
|
255
|
+
required: false
|
|
256
|
+
},
|
|
257
|
+
sortDescIcon: {
|
|
258
|
+
type: null,
|
|
259
|
+
required: false
|
|
260
|
+
},
|
|
261
|
+
color: {
|
|
262
|
+
type: [
|
|
263
|
+
String,
|
|
264
|
+
Object,
|
|
265
|
+
Boolean,
|
|
266
|
+
null
|
|
267
|
+
],
|
|
268
|
+
required: false,
|
|
269
|
+
skipCheck: true
|
|
270
|
+
}
|
|
215
271
|
});
|
|
216
|
-
const emits = defineEmits([
|
|
272
|
+
const emits = defineEmits([
|
|
273
|
+
"click:clear",
|
|
274
|
+
"click:append",
|
|
275
|
+
"click:prepend"
|
|
276
|
+
]);
|
|
217
277
|
defineSlots();
|
|
218
278
|
const { filterProps } = useProps(props);
|
|
219
279
|
const { t } = useLocale();
|
|
220
280
|
const slots = useSlots();
|
|
281
|
+
/*********************************************************
|
|
282
|
+
* Composables
|
|
283
|
+
********************************************************/
|
|
221
284
|
const { toggleSort, sortBy, isSorted } = useSort();
|
|
222
285
|
const { someSelected, allSelected, selectAll } = useSelection();
|
|
223
286
|
const { getSortIcon } = useHeadersCell(props);
|
|
287
|
+
/*********************************************************
|
|
288
|
+
* ADR-005 — computed, not a plain const (#371)
|
|
289
|
+
*
|
|
290
|
+
* @description
|
|
291
|
+
* `mergeProps(props.headerProps ?? {})` evaluated directly in the
|
|
292
|
+
* `setup()` body is a snapshot taken BEFORE the theme-props-resolver's
|
|
293
|
+
* `beforeCreate` hook patches `instance.props` — a theme targeting
|
|
294
|
+
* `theme.components['origam-data-table-headers-cell-mobile'].headerProps`
|
|
295
|
+
* never lands, and nothing warns. Wrapping it in a `computed` defers
|
|
296
|
+
* the read to render time, after the resolver has run.
|
|
297
|
+
********************************************************/
|
|
224
298
|
const headerProps = computed(() => mergeProps(props.headerProps ?? {}));
|
|
225
299
|
const displayItems = computed(() => {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
300
|
+
return props.columns.filter((column) => {
|
|
301
|
+
return column?.sortable && !props.disableSort;
|
|
302
|
+
});
|
|
229
303
|
});
|
|
230
304
|
const appendIcon = computed(() => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
305
|
+
const showSelectColumn = props.columns.find((column) => {
|
|
306
|
+
return column.key === "data-table-select";
|
|
307
|
+
});
|
|
308
|
+
if (showSelectColumn == null) return;
|
|
309
|
+
return allSelected.value ? MDI_ICONS.CHECKBOX_MARKED_OUTLINE : someSelected.value ? MDI_ICONS.MINUS_BOX : MDI_ICONS.CHECKBOX_BLANK_OUTLINE;
|
|
236
310
|
});
|
|
311
|
+
/*********************************************************
|
|
312
|
+
* Event handlers
|
|
313
|
+
********************************************************/
|
|
237
314
|
const handleClear = (e) => {
|
|
238
|
-
|
|
239
|
-
|
|
315
|
+
sortBy.value = [];
|
|
316
|
+
emits("click:clear", e);
|
|
240
317
|
};
|
|
241
318
|
const handleAppendCLick = (e) => {
|
|
242
|
-
|
|
243
|
-
|
|
319
|
+
selectAll(!allSelected.value);
|
|
320
|
+
emits("click:append", e);
|
|
244
321
|
};
|
|
322
|
+
// No "select all" business logic attached here — unlike the append
|
|
323
|
+
// side, this cell never sets a `prependIcon` on the internal select
|
|
324
|
+
// itself, so a prepend click can only originate from a consumer's
|
|
325
|
+
// `#select.prepend` slot. Just pass the click through.
|
|
245
326
|
const handlePrependClick = (e) => {
|
|
246
|
-
|
|
327
|
+
emits("click:prepend", e);
|
|
247
328
|
};
|
|
248
329
|
const handleChipClick = (item) => {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
330
|
+
if (item.raw?.sortable) {
|
|
331
|
+
toggleSort(item.raw);
|
|
332
|
+
}
|
|
252
333
|
};
|
|
253
334
|
const handleChipMousedown = (e) => {
|
|
254
|
-
|
|
255
|
-
|
|
335
|
+
e.preventDefault();
|
|
336
|
+
e.stopPropagation();
|
|
256
337
|
};
|
|
338
|
+
/*********************************************************
|
|
339
|
+
* Class & Style
|
|
340
|
+
********************************************************/
|
|
257
341
|
const dataTableHeadersCellClasses = computed(() => {
|
|
258
|
-
|
|
259
|
-
props.class
|
|
260
|
-
];
|
|
342
|
+
return [props.class];
|
|
261
343
|
});
|
|
262
344
|
const dataTableHeadersCellStyles = computed(() => {
|
|
263
|
-
|
|
264
|
-
props.style
|
|
265
|
-
];
|
|
345
|
+
return [props.style];
|
|
266
346
|
});
|
|
267
347
|
const { id, css, load, isLoaded, unload } = useStyle(dataTableHeadersCellStyles, () => props.id);
|
|
348
|
+
/*********************************************************
|
|
349
|
+
* Expose
|
|
350
|
+
********************************************************/
|
|
268
351
|
defineExpose({
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
352
|
+
filterProps,
|
|
353
|
+
css,
|
|
354
|
+
id,
|
|
355
|
+
load,
|
|
356
|
+
unload,
|
|
357
|
+
isLoaded
|
|
275
358
|
});
|
|
276
359
|
</script>
|