lightning-base-components 1.13.8-alpha → 1.14.2-alpha
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/metadata/raptor.json +7 -0
- package/package.json +5 -1
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningLookup.recentItems.js +1 -0
- package/src/lightning/ariaObserver/__component__/ariaObserver.spec.js +103 -0
- package/src/lightning/{utilsPrivate/contentMutation.js → ariaObserver/ariaObserver.js} +51 -78
- package/src/lightning/baseCombobox/baseCombobox.html +1 -0
- package/src/lightning/baseCombobox/baseCombobox.js +14 -1
- package/src/lightning/combobox/combobox.css +12 -0
- package/src/lightning/combobox/combobox.html +1 -0
- package/src/lightning/datatable/columnWidthManager.js +7 -3
- package/src/lightning/datatable/datatable.js +27 -25
- package/src/lightning/datatable/inlineEdit.js +15 -3
- package/src/lightning/datatable/keyboard.js +1077 -933
- package/src/lightning/datatable/resizer.js +91 -108
- package/src/lightning/datatable/state.js +0 -9
- package/src/lightning/datatable/templates/div/div.css +19 -0
- package/src/lightning/datatable/templates/div/div.html +10 -8
- package/src/lightning/datatable/templates/table/table.html +8 -6
- package/src/lightning/datatable/widthManagerShared.js +1 -1
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +1 -0
- package/src/lightning/helptext/helptext.js +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/input/input.html +0 -1
- package/src/lightning/input/input.js +69 -48
- package/src/lightning/positionLibrary/positionLibrary.js +43 -31
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +20 -0
- package/src/lightning/primitiveDatatableIeditTypeFactory/primitiveDatatableIeditTypeFactory.js +10 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +5 -4
- package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +64 -47
- package/src/lightning/primitiveHeaderFactory/selectableHeader.html +25 -23
- package/src/lightning/primitiveHeaderFactory/sortableHeader.html +13 -9
- package/src/lightning/progressIndicator/progressIndicator.js +3 -5
- package/src/lightning/progressStep/progressStep.js +31 -22
- package/src/lightning/utilsPrivate/utilsPrivate.js +12 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { normalizeBoolean, isRTL } from 'lightning/utilsPrivate';
|
|
2
2
|
import { isCustomerColumn } from './columns';
|
|
3
3
|
import { clamp, normalizeNumberAttribute } from './utils';
|
|
4
|
+
import { buildCSSWidthStyle } from './widthManagerShared';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @returns {
|
|
7
|
+
* Returns the default state/values of the resizer metadata
|
|
8
|
+
* @returns {Object} - resizer default state
|
|
8
9
|
*/
|
|
9
10
|
export function getResizerDefaultState() {
|
|
10
11
|
return {
|
|
@@ -18,13 +19,9 @@ export function getResizerDefaultState() {
|
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
// states Getters/Setters
|
|
23
|
-
// *******************************
|
|
22
|
+
/***************** GETTERS / SETTERS for Resizer Metadata (widthsData) *****************/
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
* resizeColumnDisabled
|
|
27
|
-
*/
|
|
24
|
+
/************* resizeColumnDisabled *************/
|
|
28
25
|
|
|
29
26
|
export function isResizeColumnDisabled(widthsData) {
|
|
30
27
|
return widthsData.resizeColumnDisabled;
|
|
@@ -33,9 +30,11 @@ export function setResizeColumnDisabled(widthsData, value) {
|
|
|
33
30
|
widthsData.resizeColumnDisabled = normalizeBoolean(value);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
/************* resizeStep *************/
|
|
34
|
+
|
|
35
|
+
export function getResizeStep(widthsData) {
|
|
36
|
+
return widthsData.resizeStep;
|
|
37
|
+
}
|
|
39
38
|
|
|
40
39
|
export function setResizeStep(widthsData, value) {
|
|
41
40
|
widthsData.resizeStep = normalizeNumberAttribute(
|
|
@@ -45,24 +44,11 @@ export function setResizeStep(widthsData, value) {
|
|
|
45
44
|
getResizerDefaultState().resizeStep
|
|
46
45
|
);
|
|
47
46
|
}
|
|
48
|
-
export function getResizeStep(widthsData) {
|
|
49
|
-
return widthsData.resizeStep;
|
|
50
|
-
}
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
* columnWidths
|
|
54
|
-
*/
|
|
48
|
+
/************* columnWidths *************/
|
|
55
49
|
|
|
56
50
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @param {object} widthsData - data regarding column and table widths
|
|
59
|
-
* @returns {boolean} - true if there are widths store in the state
|
|
60
|
-
*/
|
|
61
|
-
export function hasDefinedColumnsWidths(widthsData) {
|
|
62
|
-
return widthsData.columnWidths.length > 0;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* It return the columnsWidths saved in the state
|
|
51
|
+
* Returns the columnsWidths saved in the state
|
|
66
52
|
* @param {object} widthsData - data regarding column and table widths
|
|
67
53
|
* @returns {Array|*} - list of column widths
|
|
68
54
|
*/
|
|
@@ -70,16 +56,22 @@ export function getColumnsWidths(widthsData) {
|
|
|
70
56
|
return widthsData.columnWidths;
|
|
71
57
|
}
|
|
72
58
|
/**
|
|
73
|
-
*
|
|
59
|
+
* Sets columnWidths to empty array
|
|
74
60
|
* @param {object} widthsData - data regarding column and table widths
|
|
75
61
|
*/
|
|
76
62
|
export function resetColumnWidths(widthsData) {
|
|
77
63
|
widthsData.columnWidths = [];
|
|
78
64
|
}
|
|
79
|
-
|
|
80
65
|
/**
|
|
81
|
-
*
|
|
66
|
+
* Returns true if there are widths stored in the state
|
|
67
|
+
* @param {object} widthsData - data regarding column and table widths
|
|
68
|
+
* @returns {boolean} - true if there are widths store in the state
|
|
82
69
|
*/
|
|
70
|
+
export function hasDefinedColumnsWidths(widthsData) {
|
|
71
|
+
return widthsData.columnWidths.length > 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/************* tableWidth *************/
|
|
83
75
|
|
|
84
76
|
/**
|
|
85
77
|
* Get the full width of table
|
|
@@ -93,11 +85,13 @@ function setTableWidth(widthsData, tableWidth) {
|
|
|
93
85
|
widthsData.tableWidth = tableWidth;
|
|
94
86
|
}
|
|
95
87
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
/************* minColumnWidth *************/
|
|
89
|
+
|
|
90
|
+
export function getMinColumnWidth(widthsData) {
|
|
91
|
+
return widthsData.minColumnWidth;
|
|
92
|
+
}
|
|
99
93
|
|
|
100
|
-
export function setMinColumnWidth(
|
|
94
|
+
export function setMinColumnWidth(columns, widthsData, value) {
|
|
101
95
|
widthsData.minColumnWidth = normalizeNumberAttribute(
|
|
102
96
|
'minColumnWidth',
|
|
103
97
|
value,
|
|
@@ -105,20 +99,15 @@ export function setMinColumnWidth(state, widthsData, value) {
|
|
|
105
99
|
getResizerDefaultState().minColumnWidth
|
|
106
100
|
);
|
|
107
101
|
|
|
108
|
-
updateColumnWidthsMetadata(
|
|
109
|
-
}
|
|
110
|
-
export function getMinColumnWidth(widthsData) {
|
|
111
|
-
return widthsData.minColumnWidth;
|
|
102
|
+
updateColumnWidthsMetadata(columns, widthsData);
|
|
112
103
|
}
|
|
113
104
|
|
|
114
|
-
|
|
115
|
-
* maxColumnWidth
|
|
116
|
-
*/
|
|
105
|
+
/************* maxColumnWidth *************/
|
|
117
106
|
|
|
118
107
|
export function getMaxColumnWidth(widthsData) {
|
|
119
108
|
return widthsData.maxColumnWidth;
|
|
120
109
|
}
|
|
121
|
-
export function setMaxColumnWidth(
|
|
110
|
+
export function setMaxColumnWidth(columns, widthsData, value) {
|
|
122
111
|
widthsData.maxColumnWidth = normalizeNumberAttribute(
|
|
123
112
|
'maxColumnWidth',
|
|
124
113
|
value,
|
|
@@ -126,20 +115,18 @@ export function setMaxColumnWidth(state, widthsData, value) {
|
|
|
126
115
|
getResizerDefaultState().maxColumnWidth
|
|
127
116
|
);
|
|
128
117
|
|
|
129
|
-
updateColumnWidthsMetadata(
|
|
118
|
+
updateColumnWidthsMetadata(columns, widthsData);
|
|
130
119
|
}
|
|
131
120
|
|
|
132
|
-
|
|
133
|
-
// Logics
|
|
134
|
-
// *******************************
|
|
121
|
+
/***************************** RESIZE LOGIC *****************************/
|
|
135
122
|
|
|
136
123
|
/**
|
|
137
124
|
* Get the style to match the full width of table
|
|
138
125
|
* @param {object} widthsData - data regarding column and table widths
|
|
139
126
|
* @returns {string} - style string
|
|
140
127
|
*/
|
|
141
|
-
export function
|
|
142
|
-
return
|
|
128
|
+
export function getCSSWidthStyleOfTable(widthsData) {
|
|
129
|
+
return buildCSSWidthStyle(getTableWidth(widthsData));
|
|
143
130
|
}
|
|
144
131
|
|
|
145
132
|
/**
|
|
@@ -149,7 +136,7 @@ export function getTableWidthStyle(widthsData) {
|
|
|
149
136
|
*
|
|
150
137
|
* @param {object} state - table state
|
|
151
138
|
*/
|
|
152
|
-
export
|
|
139
|
+
export function adjustColumnsSizeFromState(state) {
|
|
153
140
|
const columnsWidths = getColumnsWidths(state);
|
|
154
141
|
let columnsWidthSum = 0;
|
|
155
142
|
getColumns(state).forEach((column, colIndex) => {
|
|
@@ -160,80 +147,64 @@ export const adjustColumnsSizeFromState = function (state) {
|
|
|
160
147
|
}
|
|
161
148
|
columnsWidthSum += width;
|
|
162
149
|
column.columnWidth = columnsWidths[colIndex];
|
|
163
|
-
column.style =
|
|
150
|
+
column.style = buildCSSWidthStyle(columnsWidths[colIndex]);
|
|
164
151
|
}
|
|
165
152
|
});
|
|
166
153
|
setTableWidth(state, columnsWidthSum);
|
|
167
|
-
}
|
|
154
|
+
}
|
|
168
155
|
|
|
169
156
|
/**
|
|
170
|
-
*
|
|
171
|
-
* @param {object}
|
|
157
|
+
* Resizes a column width
|
|
158
|
+
* @param {object} columns - all columns on the table
|
|
159
|
+
* @param {object} widthsData - object containing the resizer metadata
|
|
172
160
|
* @param {number} colIndex - the index of the column based on state.columns
|
|
173
161
|
* @param {number} width - the new width is gonna be applied
|
|
174
162
|
*/
|
|
175
|
-
export
|
|
176
|
-
const
|
|
163
|
+
export function resizeColumn(columns, widthsData, colIndex, width) {
|
|
164
|
+
const columnToResize = columns[colIndex];
|
|
177
165
|
const columnsWidths = getColumnsWidths(widthsData);
|
|
178
166
|
const currentWidth = columnsWidths[colIndex];
|
|
179
|
-
const { minWidth, maxWidth } =
|
|
167
|
+
const { minWidth, maxWidth } = columnToResize;
|
|
180
168
|
|
|
181
169
|
const newWidth = clamp(width, minWidth, maxWidth);
|
|
182
170
|
if (currentWidth !== newWidth) {
|
|
183
171
|
const newDelta = newWidth - currentWidth;
|
|
184
172
|
setTableWidth(widthsData, getTableWidth(widthsData) + newDelta);
|
|
185
|
-
updateColumnWidth(
|
|
173
|
+
updateColumnWidth(columns, widthsData, colIndex, newWidth);
|
|
186
174
|
// Workaround for header positioning issues in RTL
|
|
187
|
-
updateColumnOffsets(
|
|
188
|
-
|
|
175
|
+
updateColumnOffsets(columns, colIndex + 1, newDelta);
|
|
176
|
+
columnToResize.isResized = true;
|
|
189
177
|
}
|
|
190
|
-
}
|
|
178
|
+
}
|
|
191
179
|
|
|
192
180
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @param {object}
|
|
181
|
+
* Resize a column width with an additional delta
|
|
182
|
+
* @param {object} columns - all columns of the table
|
|
195
183
|
* @param {object} widthsData - data regarding column and table widths
|
|
196
184
|
* @param {number} colIndex - the index of the column based on state.columns
|
|
197
185
|
* @param {number} widthDelta - the delta that creates the new width
|
|
198
186
|
*/
|
|
199
|
-
export
|
|
200
|
-
|
|
187
|
+
export function resizeColumnWithDelta(
|
|
188
|
+
columns,
|
|
201
189
|
widthsData,
|
|
202
190
|
colIndex,
|
|
203
191
|
widthDelta
|
|
204
192
|
) {
|
|
205
193
|
const currentWidth = getColumnsWidths(widthsData)[colIndex];
|
|
206
|
-
resizeColumn(
|
|
207
|
-
}
|
|
194
|
+
resizeColumn(columns, widthsData, colIndex, currentWidth + widthDelta);
|
|
195
|
+
}
|
|
208
196
|
|
|
209
|
-
function updateColumnWidth(
|
|
197
|
+
function updateColumnWidth(columns, widthsData, colIndex, newWidth) {
|
|
210
198
|
const columnsWidths = getColumnsWidths(widthsData);
|
|
211
199
|
columnsWidths[colIndex] = newWidth;
|
|
212
200
|
|
|
213
|
-
const column =
|
|
201
|
+
const column = columns[colIndex];
|
|
214
202
|
column.columnWidth = newWidth;
|
|
215
|
-
column.style =
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* It return the current widths for customer columns
|
|
220
|
-
* @param {object} state - table state
|
|
221
|
-
* @param {object} widthsData - data regarding column and table widths
|
|
222
|
-
* @returns {Array} - the widths collection, every element
|
|
223
|
-
* belong to a column with the same index in column prop
|
|
224
|
-
*/
|
|
225
|
-
export function getCustomerColumnWidths(state, widthsData) {
|
|
226
|
-
const columns = getColumns(state);
|
|
227
|
-
return columns.reduce((prev, column, index) => {
|
|
228
|
-
if (isCustomerColumn(column)) {
|
|
229
|
-
prev.push(widthsData.columnWidths[index]);
|
|
230
|
-
}
|
|
231
|
-
return prev;
|
|
232
|
-
}, []);
|
|
203
|
+
column.style = buildCSSWidthStyle(newWidth);
|
|
233
204
|
}
|
|
234
205
|
|
|
235
|
-
export function updateColumnWidthsMetadata(
|
|
236
|
-
|
|
206
|
+
export function updateColumnWidthsMetadata(columns, widthsData) {
|
|
207
|
+
columns.forEach((col) => {
|
|
237
208
|
if (!col.internal) {
|
|
238
209
|
col.minWidth = getMinColumnWidth(widthsData);
|
|
239
210
|
col.maxWidth = getMaxColumnWidth(widthsData);
|
|
@@ -249,6 +220,39 @@ export function updateColumnWidthsMetadata(state, widthsData) {
|
|
|
249
220
|
});
|
|
250
221
|
}
|
|
251
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Updates the column offsets based on the specified delta, starting from the specified index.
|
|
225
|
+
* This is used to position the column headers properly in RTL.
|
|
226
|
+
*
|
|
227
|
+
* @param {object} columns - All columns of the table
|
|
228
|
+
* @param {number} colIndex - The first index to start applying the change in column width
|
|
229
|
+
* @param {number} newDelta - The change in column width to apply to
|
|
230
|
+
*/
|
|
231
|
+
function updateColumnOffsets(columns, colIndex, newDelta) {
|
|
232
|
+
if (isRTL()) {
|
|
233
|
+
const offsetColumns = columns.slice(colIndex);
|
|
234
|
+
offsetColumns.forEach((column) => {
|
|
235
|
+
column.offset += newDelta;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Returns the current widths for customer columns
|
|
242
|
+
* @param {object} columns - all columns of the table
|
|
243
|
+
* @param {object} widthsData - data regarding column and table widths
|
|
244
|
+
* @returns {Array} - the widths collection, every element
|
|
245
|
+
* belong to a column with the same index in column prop
|
|
246
|
+
*/
|
|
247
|
+
export function getCustomerColumnWidths(columns, widthsData) {
|
|
248
|
+
return columns.reduce((prev, column, index) => {
|
|
249
|
+
if (isCustomerColumn(column)) {
|
|
250
|
+
prev.push(widthsData.columnWidths[index]);
|
|
251
|
+
}
|
|
252
|
+
return prev;
|
|
253
|
+
}, []);
|
|
254
|
+
}
|
|
255
|
+
|
|
252
256
|
/**
|
|
253
257
|
* It returns if table is rendered and not hidden
|
|
254
258
|
* @param {node} root - table root element
|
|
@@ -262,27 +266,6 @@ export function isTableRenderedVisible(root) {
|
|
|
262
266
|
);
|
|
263
267
|
}
|
|
264
268
|
|
|
265
|
-
function getWidthStyle(pixels) {
|
|
266
|
-
return pixels > 0 ? `width:${pixels}px` : '';
|
|
267
|
-
}
|
|
268
|
-
|
|
269
269
|
function getColumns(state) {
|
|
270
270
|
return state.columns;
|
|
271
271
|
}
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Updates the column offsets based on the specified delta, starting from the specified index.
|
|
275
|
-
* This is used to position the column headers properly in RTL.
|
|
276
|
-
*
|
|
277
|
-
* @param {object} state
|
|
278
|
-
* @param {number} colIndex - The first index to start applying the change in column width
|
|
279
|
-
* @param {number} newDelta - The change in column width to apply to
|
|
280
|
-
*/
|
|
281
|
-
function updateColumnOffsets(state, colIndex, newDelta) {
|
|
282
|
-
if (isRTL()) {
|
|
283
|
-
const columns = getColumns(state).slice(colIndex);
|
|
284
|
-
columns.forEach((column) => {
|
|
285
|
-
column.offset += newDelta;
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
}
|
|
@@ -46,15 +46,6 @@ export const getDefaultState = function () {
|
|
|
46
46
|
showRowNumberColumn: false,
|
|
47
47
|
rowNumberOffset: 0,
|
|
48
48
|
|
|
49
|
-
// resizer
|
|
50
|
-
resizeColumnDisabled: false,
|
|
51
|
-
resizeStep: 10,
|
|
52
|
-
columnWidths: [],
|
|
53
|
-
tableWidth: 0,
|
|
54
|
-
minColumnWidth: 50,
|
|
55
|
-
maxColumnWidth: 1000,
|
|
56
|
-
columnWidthsMode: 'fixed',
|
|
57
|
-
|
|
58
49
|
// infinite loading
|
|
59
50
|
enableInfiniteLoading: false,
|
|
60
51
|
loadMoreOffset: 20,
|
|
@@ -32,3 +32,22 @@
|
|
|
32
32
|
[role="grid"] > [role="rowgroup"]:nth-child(1) {
|
|
33
33
|
margin-left: -0.5rem;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
[role="columnheader"] {
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[role="row"]:hover {
|
|
41
|
+
background-color: var(--sds-c-color-background, #f3f2f2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[role="row"].slds-is-selected {
|
|
45
|
+
background-color: var(--sds-c-color-background-dark, #ecebea);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[role="rowheader"].slds-has-focus,
|
|
49
|
+
[role="rowheader"]:focus {
|
|
50
|
+
-webkit-box-shadow: var(--sds-c-color-border-selection, #0176d3) 0 0 0 1px inset;
|
|
51
|
+
box-shadow: var(--sds-c-color-border-selection, #0176d3) 0 0 0 1px inset;
|
|
52
|
+
outline: 0;
|
|
53
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<!-- aria-live region to announce the keyboard navigation mode -->
|
|
3
3
|
<span aria-live="polite">
|
|
4
4
|
<!-- TODO: Look to merge this to a single span -->
|
|
5
|
-
<span class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
6
|
-
<span class={computedAriaLiveClassForActionMode}>{i18n.
|
|
5
|
+
<span data-keyboard-mode="navigation" class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
6
|
+
<span data-keyboard-mode="action" class={computedAriaLiveClassForActionMode}>{i18n.ariaLiveActionMode}</span>
|
|
7
7
|
</span>
|
|
8
8
|
<div lwc:dom="manual" class="dt-width-observer" style="width: 100%; height: 0px;"></div>
|
|
9
9
|
<div class="dt-outer-container" style="height: 100%; position: relative;">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
<template if:true={hasValidKeyField}>
|
|
43
43
|
<!-- Corresponds to <thead> -->
|
|
44
|
-
<div
|
|
44
|
+
<div role="rowgroup">
|
|
45
45
|
<!-- TODO: Fix aria-rowindex to not be hardcoded -->
|
|
46
46
|
<!-- TODO: might need to move the table-header class out or rename -->
|
|
47
47
|
<!-- Column Header Row -->
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<!-- Column Header -->
|
|
55
55
|
<div class="column-header cell"
|
|
56
56
|
style={def.style}
|
|
57
|
-
role
|
|
57
|
+
role="columnheader"
|
|
58
58
|
tabindex={def.tabIndex}
|
|
59
59
|
aria-label={def.ariaLabel}
|
|
60
60
|
aria-sort={def.sortAriaLabel}
|
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
sorted={def.sorted}
|
|
77
77
|
sorted-direction={def.sortedDirection}
|
|
78
78
|
column-width={def.columnWidth}
|
|
79
|
-
show-checkbox={showSelectAllCheckbox}
|
|
79
|
+
show-checkbox={showSelectAllCheckbox}
|
|
80
|
+
hide-header={hideTableHeader}>
|
|
80
81
|
</lightning-primitive-header-factory>
|
|
81
82
|
</template>
|
|
82
83
|
<template if:false={def.fixedWidth}>
|
|
@@ -96,7 +97,8 @@
|
|
|
96
97
|
sorted-direction={def.sortedDirection}
|
|
97
98
|
column-width={def.columnWidth}
|
|
98
99
|
resizable={hasResizebleColumns}
|
|
99
|
-
resizestep={
|
|
100
|
+
resizestep={widthsData.resizeStep}
|
|
101
|
+
hide-header={hideTableHeader}>
|
|
100
102
|
</lightning-primitive-header-factory>
|
|
101
103
|
</template>
|
|
102
104
|
</div>
|
|
@@ -110,7 +112,7 @@
|
|
|
110
112
|
<div class={row.classnames}
|
|
111
113
|
role="row"
|
|
112
114
|
key={row.key}
|
|
113
|
-
onkeydown={
|
|
115
|
+
onkeydown={handleKeydownOnDataRow}
|
|
114
116
|
data-row-key-value={row.key}
|
|
115
117
|
aria-selected={row.ariaSelected}
|
|
116
118
|
aria-level={row.level}
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
style={cell.style}
|
|
127
129
|
role="gridcell"
|
|
128
130
|
tabindex={cell.tabIndex}
|
|
129
|
-
data-label={cell.dataLabel}
|
|
131
|
+
data-label={cell.dataLabel}
|
|
130
132
|
key={cell.colKeyValue}>
|
|
131
133
|
<lightning-primitive-cell-checkbox
|
|
132
134
|
dt-context-id={_datatableId}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- aria-live region to announce the keyboard navigation mode -->
|
|
3
3
|
<span aria-live="polite">
|
|
4
|
-
<span class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
5
|
-
<span class={computedAriaLiveClassForActionMode}>{i18n.ariaLiveActionMode}</span>
|
|
4
|
+
<span data-keyboard-mode="navigation" class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
5
|
+
<span data-keyboard-mode="action" class={computedAriaLiveClassForActionMode}>{i18n.ariaLiveActionMode}</span>
|
|
6
6
|
</span>
|
|
7
7
|
<div lwc:dom="manual" class="dt-width-observer" style="width: 100%; height: 0px;"></div>
|
|
8
8
|
<div class="dt-outer-container" style="height: 100%; position: relative;">
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<!-- empty since keyField wasn't provided TODO: Why is this here? Test and remove! -->
|
|
39
39
|
</template>
|
|
40
40
|
<template if:true={hasValidKeyField}>
|
|
41
|
-
<thead
|
|
41
|
+
<thead>
|
|
42
42
|
<!-- Column Header Row -->
|
|
43
43
|
<tr class="slds-line-height_reset"
|
|
44
44
|
onprivateresizestart={handleResizeStart}
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
sorted={def.sorted}
|
|
69
69
|
sorted-direction={def.sortedDirection}
|
|
70
70
|
column-width={def.columnWidth}
|
|
71
|
-
show-checkbox={showSelectAllCheckbox}
|
|
71
|
+
show-checkbox={showSelectAllCheckbox}
|
|
72
|
+
hide-header={hideTableHeader}>
|
|
72
73
|
</lightning-primitive-header-factory>
|
|
73
74
|
</template>
|
|
74
75
|
<template if:false={def.fixedWidth}>
|
|
@@ -88,7 +89,8 @@
|
|
|
88
89
|
sorted-direction={def.sortedDirection}
|
|
89
90
|
column-width={def.columnWidth}
|
|
90
91
|
resizable={hasResizebleColumns}
|
|
91
|
-
resizestep={
|
|
92
|
+
resizestep={widthsData.resizeStep}
|
|
93
|
+
hide-header={hideTableHeader}>
|
|
92
94
|
</lightning-primitive-header-factory>
|
|
93
95
|
</template>
|
|
94
96
|
</th>
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
<template for:each={renderedRows} for:item="row" for:index="rowIndex">
|
|
100
102
|
<!-- Data Rows -->
|
|
101
103
|
<tr class={row.classnames}
|
|
102
|
-
onkeydown={
|
|
104
|
+
onkeydown={handleKeydownOnDataRow}
|
|
103
105
|
key={row.key}
|
|
104
106
|
data-row-key-value={row.key}
|
|
105
107
|
aria-selected={row.ariaSelected}
|
|
@@ -44,6 +44,6 @@ export function getColumnWidthFromDef(column) {
|
|
|
44
44
|
return column.fixedWidth || resizedWidth || column.initialWidth;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
47
|
+
export function buildCSSWidthStyle(pixels) {
|
|
48
48
|
return pixels > 0 ? `width:${pixels}px` : '';
|
|
49
49
|
}
|
|
@@ -102,6 +102,7 @@ We recommend using the `em` element instead of `i` to emphasize text with italic
|
|
|
102
102
|
- cid
|
|
103
103
|
- xmpp
|
|
104
104
|
- ciscotel
|
|
105
|
+
- navision
|
|
105
106
|
|
|
106
107
|
URLs such as `www.salesforce.com` or `salesforce.com` are also displayed as links. All links, including those that don't include a protocol, are displayed using the anchor tag with a target value of `_blank`. To display links with other target values, use [lightning-formatted-url](bundle/lightning-formatted-url/) instead.
|
|
107
108
|
|
|
@@ -125,6 +125,14 @@ export default class LightningHelptext extends LightningElement {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Sets focus on the button.
|
|
130
|
+
*/
|
|
131
|
+
@api
|
|
132
|
+
focus() {
|
|
133
|
+
this.template.querySelector('button').focus();
|
|
134
|
+
}
|
|
135
|
+
|
|
128
136
|
_tooltip = null;
|
|
129
137
|
|
|
130
138
|
disconnectedCallback() {
|