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
|
@@ -101,18 +101,57 @@ import { getObjectValueByPath } from "../../utils/Commons/commons.util";
|
|
|
101
101
|
import { ORIGAM_DATA_TABLE_SHOW_SELECT_KEY } from "../../consts/DataTable/data-table.const";
|
|
102
102
|
import { computed, inject, ref, Ref, StyleValue, toDisplayString } from "vue";
|
|
103
103
|
const vm = getCurrentInstance("dataTableRow");
|
|
104
|
+
/*********************************************************
|
|
105
|
+
* Global
|
|
106
|
+
********************************************************/
|
|
104
107
|
const props = defineProps({
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
item: {
|
|
109
|
+
type: Object,
|
|
110
|
+
required: true
|
|
111
|
+
},
|
|
112
|
+
cellProps: {
|
|
113
|
+
type: [Object, Function],
|
|
114
|
+
required: false
|
|
115
|
+
},
|
|
116
|
+
id: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: false
|
|
119
|
+
},
|
|
120
|
+
class: {
|
|
121
|
+
type: [
|
|
122
|
+
String,
|
|
123
|
+
Array,
|
|
124
|
+
Object
|
|
125
|
+
],
|
|
126
|
+
required: false
|
|
127
|
+
},
|
|
128
|
+
style: {
|
|
129
|
+
type: [
|
|
130
|
+
String,
|
|
131
|
+
Array,
|
|
132
|
+
Object,
|
|
133
|
+
Boolean,
|
|
134
|
+
null
|
|
135
|
+
],
|
|
136
|
+
required: false,
|
|
137
|
+
skipCheck: true
|
|
138
|
+
},
|
|
139
|
+
mobileBreakpoint: {
|
|
140
|
+
type: null,
|
|
141
|
+
required: false
|
|
142
|
+
}
|
|
111
143
|
});
|
|
144
|
+
/*********************************************************
|
|
145
|
+
* Labels — localised through the DS i18n provider (`useLocale`).
|
|
146
|
+
* Keys live under `origam.dataTableRow.*` in the shipped locale messages.
|
|
147
|
+
********************************************************/
|
|
112
148
|
const { t } = useLocale();
|
|
113
149
|
const emits = defineEmits(["expand", "select"]);
|
|
114
150
|
defineSlots();
|
|
115
151
|
const { filterProps } = useProps(props);
|
|
152
|
+
/*********************************************************
|
|
153
|
+
* Composables
|
|
154
|
+
********************************************************/
|
|
116
155
|
const showSelect = inject(ORIGAM_DATA_TABLE_SHOW_SELECT_KEY, ref(false));
|
|
117
156
|
const { displayClasses, mobile } = useDisplay(props, "origam-data-table-row");
|
|
118
157
|
const { isSelected, toggleSelect, someSelected, allSelected, selectAll } = useSelection();
|
|
@@ -121,94 +160,133 @@ const { toggleSort, sortBy, isSorted } = useSort();
|
|
|
121
160
|
const { columns } = useHeaders();
|
|
122
161
|
const { getPadding } = useCell();
|
|
123
162
|
const slotProps = (index, column) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
163
|
+
return {
|
|
164
|
+
index,
|
|
165
|
+
item: props.item?.raw,
|
|
166
|
+
internalItem: props.item,
|
|
167
|
+
value: getObjectValueByPath(props.item?.columns, column.key),
|
|
168
|
+
column,
|
|
169
|
+
isSelected,
|
|
170
|
+
toggleSelect,
|
|
171
|
+
isExpanded,
|
|
172
|
+
toggleExpand
|
|
173
|
+
};
|
|
135
174
|
};
|
|
136
175
|
const columnSlotProps = (column) => {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
176
|
+
return {
|
|
177
|
+
column,
|
|
178
|
+
selectAll,
|
|
179
|
+
isSorted,
|
|
180
|
+
toggleSort,
|
|
181
|
+
sortBy: sortBy.value,
|
|
182
|
+
someSelected: someSelected.value,
|
|
183
|
+
allSelected: allSelected.value,
|
|
184
|
+
getSortIcon: () => ""
|
|
185
|
+
};
|
|
147
186
|
};
|
|
148
187
|
const cellProps = (index, column) => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
188
|
+
const localSlotProp = slotProps(index, column);
|
|
189
|
+
return typeof props.cellProps === "function" ? props.cellProps({
|
|
190
|
+
index: localSlotProp.index,
|
|
191
|
+
item: localSlotProp.item,
|
|
192
|
+
internalItem: localSlotProp.internalItem,
|
|
193
|
+
value: localSlotProp.value,
|
|
194
|
+
column
|
|
195
|
+
}) : props.cellProps;
|
|
157
196
|
};
|
|
158
197
|
const columnCellProps = (index, column) => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
198
|
+
const localSlotProp = slotProps(index, column);
|
|
199
|
+
return typeof column.cellProps === "function" ? column.cellProps({
|
|
200
|
+
index: localSlotProp.index,
|
|
201
|
+
item: localSlotProp.item,
|
|
202
|
+
internalItem: localSlotProp.internalItem,
|
|
203
|
+
value: localSlotProp.value
|
|
204
|
+
}) : column.cellProps;
|
|
166
205
|
};
|
|
167
206
|
const displayValue = (index, column) => {
|
|
168
|
-
|
|
207
|
+
return toDisplayString(slotProps(index, column).value);
|
|
169
208
|
};
|
|
209
|
+
/*********************************************************
|
|
210
|
+
* Event handlers
|
|
211
|
+
********************************************************/
|
|
212
|
+
/*********************************************************
|
|
213
|
+
* handleCheckBoxClick / handleBtnClick (#439)
|
|
214
|
+
*
|
|
215
|
+
* @description
|
|
216
|
+
* `withModifiers(fn, ['stop'])` is a FACTORY: it returns a new wrapped
|
|
217
|
+
* handler, it does not call `fn` nor stop anything on its own. Calling
|
|
218
|
+
* it as a bare statement (pre-fix) built a throwaway function and
|
|
219
|
+
* discarded it — `toggleSelect` / `toggleExpand` were never invoked,
|
|
220
|
+
* while `emits('select')` / `emits('expand')` fired right after
|
|
221
|
+
* regardless, so the row reported a selection/expansion that never
|
|
222
|
+
* happened.
|
|
223
|
+
* @description
|
|
224
|
+
* `stopPropagation()` is what `.stop` compiles down to — called
|
|
225
|
+
* directly here since these handlers already receive the real native
|
|
226
|
+
* event (bare `@click="handleCheckBoxClick"` / `@click=
|
|
227
|
+
* "handleBtnClick"` bindings, Vue's auto-invoked "blessed form").
|
|
228
|
+
********************************************************/
|
|
229
|
+
/*********************************************************
|
|
230
|
+
* Charge utile de `select` / `expand` (#550, critere C7)
|
|
231
|
+
*
|
|
232
|
+
* @description
|
|
233
|
+
* `IDataTableRowEmits` annonce depuis toujours un objet
|
|
234
|
+
* `{ item, value }` optionnel ; le code emettait sans rien. Un
|
|
235
|
+
* consommateur qui ecoutait `@expand` recevait `undefined` et ne
|
|
236
|
+
* pouvait pas savoir QUELLE ligne avait bascule — la seule
|
|
237
|
+
* information que l'evenement porte au-dela de `update:expanded`.
|
|
238
|
+
*
|
|
239
|
+
* @description
|
|
240
|
+
* L'etat est lu APRES la bascule : `value` est donc l'etat resultant,
|
|
241
|
+
* pas l'ancien.
|
|
242
|
+
********************************************************/
|
|
170
243
|
const handleCheckBoxClick = (e) => {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
244
|
+
e.stopPropagation();
|
|
245
|
+
toggleSelect(props.item);
|
|
246
|
+
emits("select", {
|
|
247
|
+
item: props.item,
|
|
248
|
+
value: isSelected([props.item])
|
|
249
|
+
});
|
|
174
250
|
};
|
|
175
251
|
const handleBtnClick = (e) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
252
|
+
e.stopPropagation();
|
|
253
|
+
toggleExpand(props.item);
|
|
254
|
+
emits("expand", {
|
|
255
|
+
item: props.item,
|
|
256
|
+
value: isExpanded(props.item)
|
|
257
|
+
});
|
|
179
258
|
};
|
|
180
259
|
const dataTableColumnCellClasses = (key) => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"origam-data-table-row__column--select-row": key === "data-table-select"
|
|
186
|
-
}
|
|
187
|
-
];
|
|
260
|
+
return ["origam-data-table-row__column", {
|
|
261
|
+
"origam-data-table-row__column--expanded-row": key === "data-table-expand",
|
|
262
|
+
"origam-data-table-row__column--select-row": key === "data-table-select"
|
|
263
|
+
}];
|
|
188
264
|
};
|
|
265
|
+
/*********************************************************
|
|
266
|
+
* Class & Style
|
|
267
|
+
********************************************************/
|
|
189
268
|
const dataTableRowClasses = computed(() => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
props.class
|
|
197
|
-
];
|
|
269
|
+
return [
|
|
270
|
+
"origam-data-table-row",
|
|
271
|
+
{ "origam-data-table-row--clickable": !!(Object.prototype.hasOwnProperty.call(vm.vnode.props, "onClick") || Object.prototype.hasOwnProperty.call(vm.vnode.props, "onContextmenu") || Object.prototype.hasOwnProperty.call(vm.vnode.props, "onDblclick")) },
|
|
272
|
+
displayClasses.value,
|
|
273
|
+
props.class
|
|
274
|
+
];
|
|
198
275
|
});
|
|
199
276
|
const dataTableRowStyles = computed(() => {
|
|
200
|
-
|
|
201
|
-
props.style
|
|
202
|
-
];
|
|
277
|
+
return [props.style];
|
|
203
278
|
});
|
|
204
279
|
const { id, css, load, isLoaded, unload } = useStyle(dataTableRowStyles, () => props.id);
|
|
280
|
+
/*********************************************************
|
|
281
|
+
* Expose
|
|
282
|
+
********************************************************/
|
|
205
283
|
defineExpose({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
284
|
+
filterProps,
|
|
285
|
+
css,
|
|
286
|
+
id,
|
|
287
|
+
load,
|
|
288
|
+
unload,
|
|
289
|
+
isLoaded
|
|
212
290
|
});
|
|
213
291
|
</script>
|
|
214
292
|
|
|
@@ -147,52 +147,194 @@ import { LOADER_KIND } from "../../enums/Commons/loader.enum";
|
|
|
147
147
|
import { getPrefixedEventHandlers } from "../../utils/Commons/event.util";
|
|
148
148
|
import { getSkeletonCellShape } from "../../utils/DataTable/skeleton-cell.util";
|
|
149
149
|
import { getSkeletonHostClasses, splitSkeletonOverrides } from "../../utils/Skeleton/skeleton.util";
|
|
150
|
-
import {
|
|
151
|
-
pickDataTableHeaderColumnSlotNames,
|
|
152
|
-
pickDataTableItemColumnSlotNames
|
|
153
|
-
} from "../../utils/DataTable/slot-name.util";
|
|
150
|
+
import { pickDataTableHeaderColumnSlotNames, pickDataTableItemColumnSlotNames } from "../../utils/DataTable/slot-name.util";
|
|
154
151
|
import { computed, mergeProps, useAttrs, useSlots } from "vue";
|
|
155
152
|
const attrs = useAttrs();
|
|
153
|
+
/*********************************************************
|
|
154
|
+
* inheritAttrs — #916 / #853
|
|
155
|
+
*
|
|
156
|
+
* @description
|
|
157
|
+
* The root `v-if` chain is MIXED. Asked of the Vue 3.5.39 compiler rather
|
|
158
|
+
* than eyeballed, the root codegen node is:
|
|
159
|
+
*
|
|
160
|
+
* COND{ FRAGMENT | COND{ element(tr) | FRAGMENT } }
|
|
161
|
+
*
|
|
162
|
+
* i.e. EXACTLY ONE of the three outcomes is a single element — the
|
|
163
|
+
* `no-data` `<tr>`. The `loaderConfig.isActive` branch is a FRAGMENT even
|
|
164
|
+
* when it renders one `<tr>`, because that outer `<template v-if>` wraps a
|
|
165
|
+
* nested `v-if` chain and the compiler emits a `Fragment` block for it;
|
|
166
|
+
* the default branch is a `v-for` over `items`. Vue cannot merge
|
|
167
|
+
* fallthrough attributes onto a fragment and logs "Extraneous non-props
|
|
168
|
+
* attributes", whose trace serialises every ancestor's props including Vue
|
|
169
|
+
* Router's `RouteProvider` vnode (~4.4 MB per occurrence, #853).
|
|
170
|
+
*
|
|
171
|
+
* ⛔ Measured on `develop` before this change, mounting with `class` /
|
|
172
|
+
* `data-cy` / `aria-label`:
|
|
173
|
+
*
|
|
174
|
+
* no-data branch (element root) -> all three LAND
|
|
175
|
+
* loader branch (fragment) -> all three land NOWHERE
|
|
176
|
+
* items branch (fragment) -> all three land NOWHERE
|
|
177
|
+
*
|
|
178
|
+
* So the flag alone would silently strip them from the `no-data` row —
|
|
179
|
+
* #492's defect. `v-bind="{ ...$attrs }"` is re-bound THERE ONLY.
|
|
180
|
+
*
|
|
181
|
+
* ⚠️ Deliberately NOT added to the `--loading` `<tr>`, even though it
|
|
182
|
+
* looks like a twin of the `no-data` one. It is not a root: attributes do
|
|
183
|
+
* not reach it today, and binding them there would be a NEW behaviour
|
|
184
|
+
* smuggled in under a warning fix. The resulting asymmetry — the no-data
|
|
185
|
+
* row carries a consumer's `class`, the loading row does not — is
|
|
186
|
+
* pre-existing, is now measured, and is left for a decision of its own.
|
|
187
|
+
* The `v-for` branches likewise forward nothing: N sibling rows have no
|
|
188
|
+
* single home for one `id`, and each row already receives its own
|
|
189
|
+
* attributes through `itemSlotProps()` / `groupHeaderRowProps()`.
|
|
190
|
+
*
|
|
191
|
+
* ⚠️ The explicit `v-bind="{ ...$attrs }"` is EQUIVALENT to the automatic
|
|
192
|
+
* fallthrough it replaces — same object, same element, same merge order
|
|
193
|
+
* (`mergeProps` concatenates `class` / `style`, later source wins for a
|
|
194
|
+
* scalar). That equivalence is what makes it safe here, and it matters
|
|
195
|
+
* because this component's `$attrs` is also a CONTROL channel: the
|
|
196
|
+
* prefixed `:row` / `:group-header` handlers are read out of it by
|
|
197
|
+
* `getPrefixedEventHandlers` above. #371 was exactly the failure of
|
|
198
|
+
* letting a non-DOM key reach a `<tr>` root, where Vue serialises it as a
|
|
199
|
+
* literal attribute (`index="0" mobile="false"`). This change neither
|
|
200
|
+
* adds nor removes any key from that path — do NOT "tidy" it into a
|
|
201
|
+
* broader forward without re-measuring #371's symptom.
|
|
202
|
+
********************************************************/
|
|
156
203
|
defineOptions({ inheritAttrs: false });
|
|
204
|
+
/*********************************************************
|
|
205
|
+
* Global
|
|
206
|
+
********************************************************/
|
|
157
207
|
const props = defineProps({
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
208
|
+
hideNoData: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
required: false
|
|
211
|
+
},
|
|
212
|
+
items: {
|
|
213
|
+
type: Array,
|
|
214
|
+
required: false
|
|
215
|
+
},
|
|
216
|
+
noDataText: {
|
|
217
|
+
type: String,
|
|
218
|
+
required: false,
|
|
219
|
+
default: "origam.no_data_text"
|
|
220
|
+
},
|
|
221
|
+
rowProps: {
|
|
222
|
+
type: [Object, Function],
|
|
223
|
+
required: false
|
|
224
|
+
},
|
|
225
|
+
cellProps: {
|
|
226
|
+
type: [Object, Function],
|
|
227
|
+
required: false
|
|
228
|
+
},
|
|
229
|
+
loading: {
|
|
230
|
+
type: [
|
|
231
|
+
Boolean,
|
|
232
|
+
Number,
|
|
233
|
+
Object
|
|
234
|
+
],
|
|
235
|
+
required: false
|
|
236
|
+
},
|
|
237
|
+
loadingText: {
|
|
238
|
+
type: String,
|
|
239
|
+
required: false,
|
|
240
|
+
default: "origam.data_iterator.loading_text"
|
|
241
|
+
},
|
|
242
|
+
id: {
|
|
243
|
+
type: String,
|
|
244
|
+
required: false
|
|
245
|
+
},
|
|
246
|
+
color: {
|
|
247
|
+
type: [
|
|
248
|
+
String,
|
|
249
|
+
Object,
|
|
250
|
+
Boolean,
|
|
251
|
+
null
|
|
252
|
+
],
|
|
253
|
+
required: false,
|
|
254
|
+
skipCheck: true
|
|
255
|
+
},
|
|
256
|
+
mobileBreakpoint: {
|
|
257
|
+
type: null,
|
|
258
|
+
required: false
|
|
259
|
+
}
|
|
168
260
|
});
|
|
169
261
|
const emit = defineEmits(["expand", "select"]);
|
|
170
262
|
defineSlots();
|
|
263
|
+
/*********************************************************
|
|
264
|
+
* Forwarded slots (#550, critere C7)
|
|
265
|
+
*
|
|
266
|
+
* @description
|
|
267
|
+
* `<origam-data-table-row>` rend `item.{cle}` (valeur de cellule) et,
|
|
268
|
+
* en disposition mobile, `header.{cle}` (titre de colonne). Aucun des
|
|
269
|
+
* deux n'etait relaye : le contenu du consommateur s'arretait ici.
|
|
270
|
+
*
|
|
271
|
+
* @description
|
|
272
|
+
* `useSlots()` n'est pas une prop — la lecture ci-dessous ne tombe pas
|
|
273
|
+
* sous la reserve ADR-005 sur les lectures eager du corps de `setup`.
|
|
274
|
+
********************************************************/
|
|
171
275
|
const slots = useSlots();
|
|
172
276
|
const itemColumnSlotNames = computed(() => {
|
|
173
|
-
|
|
277
|
+
return pickDataTableItemColumnSlotNames(Object.keys(slots));
|
|
174
278
|
});
|
|
175
279
|
const headerColumnSlotNames = computed(() => {
|
|
176
|
-
|
|
280
|
+
return pickDataTableHeaderColumnSlotNames(Object.keys(slots));
|
|
177
281
|
});
|
|
178
282
|
const { filterProps } = useProps(props);
|
|
179
283
|
const { t } = useLocale();
|
|
284
|
+
/** Fixed number of skeleton placeholder rows when kind='skeleton'. */
|
|
180
285
|
const SKELETON_ROW_COUNT = 5;
|
|
181
|
-
const skeletonRowId = (index) => props.id ? `${props.id}-skeleton-row-${index}` :
|
|
182
|
-
const itemRowId = (index) => props.id ? `${props.id}-row-${index}` :
|
|
286
|
+
const skeletonRowId = (index) => props.id ? `${props.id}-skeleton-row-${index}` : undefined;
|
|
287
|
+
const itemRowId = (index) => props.id ? `${props.id}-row-${index}` : undefined;
|
|
288
|
+
/*********************************************************
|
|
289
|
+
* Composables
|
|
290
|
+
********************************************************/
|
|
183
291
|
const { loaderConfig } = useLoader(props, LOADER_KIND.LINE);
|
|
292
|
+
/*********************************************************
|
|
293
|
+
* Skeleton rows — zero node added
|
|
294
|
+
*
|
|
295
|
+
* @description
|
|
296
|
+
* The placeholder rows add NO element of their own: each `<td>` is the
|
|
297
|
+
* host (`.origam--skeleton`) and paints its bar with its own `::after`.
|
|
298
|
+
* Before this, every cell mounted an `<origam-skeleton>` — a `role=status`
|
|
299
|
+
* node each, so a table announced itself once per cell.
|
|
300
|
+
*
|
|
301
|
+
* @description
|
|
302
|
+
* The table makes ONE announcement and it is NOT made here: a `<tr>` cannot
|
|
303
|
+
* hold a live region, so `<OrigamDataTable>` renders a single visually
|
|
304
|
+
* hidden `role="status"` next to the table. Every row and cell here is
|
|
305
|
+
* `aria-hidden`. The `loading="{ type: 'skeleton', ... }"` `animation`
|
|
306
|
+
* override is honoured through `splitSkeletonOverrides`; the per-block
|
|
307
|
+
* props (`color`, `rounded`...) have no node to land on here.
|
|
308
|
+
********************************************************/
|
|
184
309
|
const skeletonOverrides = computed(() => splitSkeletonOverrides(loaderConfig.value.overrides, props.loadingText));
|
|
185
310
|
const skeletonCells = computed(() => columns.value.map((col) => ({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
311
|
+
key: `skeleton-cell_${col.key}`,
|
|
312
|
+
attrs: {
|
|
313
|
+
"aria-hidden": true,
|
|
314
|
+
class: [
|
|
315
|
+
"origam-data-table-rows__skeleton-cell",
|
|
316
|
+
`origam-data-table-rows__skeleton-cell--${getSkeletonCellShape(col)}`,
|
|
317
|
+
getSkeletonHostClasses(skeletonOverrides.value.group.animation)
|
|
318
|
+
]
|
|
319
|
+
}
|
|
195
320
|
})));
|
|
321
|
+
/*********************************************************
|
|
322
|
+
* Couleur des lignes propres au composant (#550)
|
|
323
|
+
*
|
|
324
|
+
* @description
|
|
325
|
+
* `color` etait declaree (heritee d'`ILoaderProps`) et lue nulle part,
|
|
326
|
+
* alors que la story expose un controle de couleur qui la traverse.
|
|
327
|
+
*
|
|
328
|
+
* @description
|
|
329
|
+
* Elle peint desormais les deux seules lignes que ce composant rend
|
|
330
|
+
* lui-meme : la ligne de chargement et la ligne « aucune donnee ». Les
|
|
331
|
+
* lignes d'items sont rendues par `<origam-data-table-row>` et se
|
|
332
|
+
* colorent via `rowProps`.
|
|
333
|
+
*
|
|
334
|
+
* @description
|
|
335
|
+
* `useTextColor` lit la prop dans un `computed` : la valeur ecrite par
|
|
336
|
+
* le resolveur de theme en `beforeCreate` (ADR-005) reste visible.
|
|
337
|
+
********************************************************/
|
|
196
338
|
const { textColorClasses, textColorStyles } = useTextColor(props, "color");
|
|
197
339
|
const { columns } = useHeaders();
|
|
198
340
|
const { expandOnClick, toggleExpand, isExpanded } = useExpanded();
|
|
@@ -200,92 +342,105 @@ const { isSelected, toggleSelect } = useSelection();
|
|
|
200
342
|
const { toggleGroup, isGroupOpen } = useGroupBy();
|
|
201
343
|
const { startIndex } = usePagination();
|
|
202
344
|
const slotProps = (item, index) => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
345
|
+
return {
|
|
346
|
+
index,
|
|
347
|
+
item: item.raw,
|
|
348
|
+
internalItem: item,
|
|
349
|
+
columns: columns.value,
|
|
350
|
+
isExpanded,
|
|
351
|
+
toggleExpand,
|
|
352
|
+
isSelected,
|
|
353
|
+
toggleSelect
|
|
354
|
+
};
|
|
213
355
|
};
|
|
214
356
|
const groupHeaderSlotProps = (item, index) => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
357
|
+
const slotPropsLocal = slotProps(item, index);
|
|
358
|
+
return Object.assign({}, slotPropsLocal, {
|
|
359
|
+
index,
|
|
360
|
+
item,
|
|
361
|
+
columns: columns.value,
|
|
362
|
+
...getPrefixedEventHandlers(attrs, ":group-header", () => slotPropsLocal),
|
|
363
|
+
isExpanded,
|
|
364
|
+
toggleExpand,
|
|
365
|
+
isSelected,
|
|
366
|
+
toggleSelect,
|
|
367
|
+
toggleGroup,
|
|
368
|
+
isGroupOpen
|
|
369
|
+
});
|
|
228
370
|
};
|
|
371
|
+
/*********************************************************
|
|
372
|
+
* Props reellement declarees par la ligne d'en-tete de groupe
|
|
373
|
+
*
|
|
374
|
+
* @description
|
|
375
|
+
* ⛔ Ne PAS spreader `groupHeaderSlotProps()` sur le composant. Le
|
|
376
|
+
* scope de slot porte volontairement plus de cles que l'interface du
|
|
377
|
+
* composant n'en declare (`internalItem`, `isExpanded`, `toggleExpand`,
|
|
378
|
+
* `toggleSelect`, `isGroupOpen`) : elles servent au consommateur qui
|
|
379
|
+
* remplace le rendu via `#group-header`.
|
|
380
|
+
*
|
|
381
|
+
* @description
|
|
382
|
+
* Une cle non declaree ne disparait pas — elle tombe dans `$attrs` et
|
|
383
|
+
* atterrit sur la racine du composant, un `<tr>`, ou Vue la pose en
|
|
384
|
+
* ATTRIBUT DOM. Une fonction y serait serialisee en chaine
|
|
385
|
+
* (`toggleexpand="(item) => {…}"`). D'ou ce second constructeur, borne
|
|
386
|
+
* a ce que `IDataTableGroupHeaderRowProps` declare, plus les
|
|
387
|
+
* gestionnaires prefixes `:group-header` qui, eux, doivent bien passer.
|
|
388
|
+
********************************************************/
|
|
229
389
|
const groupHeaderRowProps = (item, index) => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
390
|
+
const slotPropsLocal = slotProps(item, index);
|
|
391
|
+
return {
|
|
392
|
+
index,
|
|
393
|
+
item,
|
|
394
|
+
columns: columns.value,
|
|
395
|
+
isSelected,
|
|
396
|
+
toggleGroup,
|
|
397
|
+
...getPrefixedEventHandlers(attrs, ":group-header", () => slotPropsLocal)
|
|
398
|
+
};
|
|
239
399
|
};
|
|
240
400
|
const itemSlotProps = (item, index) => {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
item: slotPropsLocal.item,
|
|
280
|
-
index: slotPropsLocal.index,
|
|
281
|
-
internalItem: slotPropsLocal.internalItem
|
|
282
|
-
}) : props.rowProps
|
|
283
|
-
)
|
|
284
|
-
});
|
|
401
|
+
const slotPropsLocal = slotProps(item, index);
|
|
402
|
+
return Object.assign({}, slotPropsLocal, { props: mergeProps({
|
|
403
|
+
key: `item_${item.key ?? item.index}`,
|
|
404
|
+
onClick: expandOnClick.value ? () => {
|
|
405
|
+
toggleExpand(item);
|
|
406
|
+
} : undefined,
|
|
407
|
+
item,
|
|
408
|
+
cellProps: props.cellProps,
|
|
409
|
+
/*********************************************************
|
|
410
|
+
* Forward `mobileBreakpoint` — never `mobile` (#371)
|
|
411
|
+
*
|
|
412
|
+
* @description
|
|
413
|
+
* `IDataTableRowProps` (extends `IDisplayProps`)
|
|
414
|
+
* declares `mobileBreakpoint`, not `index` or
|
|
415
|
+
* `mobile`. Each row resolves its OWN `mobile` from
|
|
416
|
+
* `mobileBreakpoint` via its own `useDisplay(props)`
|
|
417
|
+
* call — passing a precomputed `mobile` here was
|
|
418
|
+
* always dead weight, and passing `index` was never
|
|
419
|
+
* read by the row at all. Both fell through
|
|
420
|
+
* `<OrigamDataTableRow>`'s undeclared-key path
|
|
421
|
+
* straight into `$attrs`, which its
|
|
422
|
+
* `v-bind="{ ...$attrs }"` root then serialised as literal
|
|
423
|
+
* DOM attributes on every rendered `<tr>`:
|
|
424
|
+
* `index="0" mobile="false"`.
|
|
425
|
+
*
|
|
426
|
+
* @description
|
|
427
|
+
* A prior fix (mobileBreakpoint forwarding) added
|
|
428
|
+
* the correct key without removing the stale one it
|
|
429
|
+
* replaced — same shape as the point-1 closure leak
|
|
430
|
+
* in this same file's `groupHeaderRowProps()`.
|
|
431
|
+
********************************************************/
|
|
432
|
+
mobileBreakpoint: props.mobileBreakpoint,
|
|
433
|
+
"aria-rowindex": startIndex.value + index + 2
|
|
434
|
+
}, getPrefixedEventHandlers(attrs, ":row", () => slotPropsLocal), typeof props.rowProps === "function" ? props.rowProps({
|
|
435
|
+
item: slotPropsLocal.item,
|
|
436
|
+
index: slotPropsLocal.index,
|
|
437
|
+
internalItem: slotPropsLocal.internalItem
|
|
438
|
+
}) : props.rowProps) });
|
|
285
439
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
440
|
+
/*********************************************************
|
|
441
|
+
* Expose
|
|
442
|
+
********************************************************/
|
|
443
|
+
defineExpose({ filterProps });
|
|
289
444
|
</script>
|
|
290
445
|
|
|
291
446
|
<style lang="scss" scoped>
|