@salesforce/design-system-react 0.10.43 → 0.10.46
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/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/components/brand-band/__docs__/storybook-stories.jsx +4 -2
- package/components/brand-band/__examples__/{lightning-blue-theme.jsx → group-image.jsx} +1 -11
- package/components/brand-band/__examples__/no-image.jsx +1 -2
- package/{lib/components/brand-band/__examples__/lightning-blue-theme.jsx → components/brand-band/__examples__/user-image.jsx} +1 -11
- package/components/brand-band/check-props.js +18 -0
- package/components/brand-band/component.json +8 -4
- package/components/brand-band/index.jsx +23 -66
- package/components/brand-band.d.ts +1 -26
- package/components/button/__tests__/button.browser-test.jsx +0 -1
- package/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/components/combobox/combobox.d.ts +3 -0
- package/components/combobox/combobox.jsx +7 -1
- package/components/component-docs.json +14 -39
- package/components/data-table/cell.jsx +2 -2
- package/components/data-table/index.jsx +134 -85
- package/components/data-table/private/context-helper.js +26 -14
- package/components/data-table/private/head.jsx +269 -260
- package/components/data-table/private/header-cell.jsx +204 -230
- package/components/data-table/private/row.jsx +140 -105
- package/components/data-table/row-actions.jsx +2 -2
- package/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/components/pill-container/private/selected-listbox.jsx +1 -0
- package/components/site-stories.js +8 -4
- package/components/slider.d.ts +10 -4
- package/components/utilities/truncate/index.jsx +1 -1
- package/lib/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/lib/components/brand-band/__docs__/storybook-stories.jsx +4 -2
- package/lib/components/brand-band/__examples__/group-image.jsx +12 -0
- package/lib/components/brand-band/__examples__/no-image.jsx +1 -2
- package/lib/components/brand-band/__examples__/user-image.jsx +12 -0
- package/lib/components/brand-band/check-props.js +29 -0
- package/lib/components/brand-band/component.json +8 -4
- package/lib/components/brand-band/index.js +9 -50
- package/lib/components/brand-band.d.ts +1 -26
- package/lib/components/button/__tests__/button.browser-test.jsx +0 -1
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/lib/components/combobox/combobox.d.ts +3 -0
- package/lib/components/combobox/combobox.js +9 -2
- package/lib/components/component-docs.json +14 -39
- package/lib/components/data-table/cell.js +6 -6
- package/lib/components/data-table/index.js +131 -99
- package/lib/components/data-table/private/context-helper.js +13 -14
- package/lib/components/data-table/private/head.js +233 -252
- package/lib/components/data-table/private/header-cell.js +185 -221
- package/lib/components/data-table/private/row.js +97 -89
- package/lib/components/data-table/row-actions.js +6 -6
- package/lib/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/lib/components/pill-container/private/selected-listbox.js +3 -0
- package/lib/components/site-stories.js +6 -3
- package/lib/components/slider.d.ts +10 -4
- package/lib/components/utilities/truncate/index.js +2 -2
- package/lib/package.json +14 -10
- package/module/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/module/components/brand-band/__docs__/storybook-stories.js +6 -3
- package/module/components/brand-band/__docs__/storybook-stories.js.map +1 -1
- package/module/components/brand-band/__examples__/{lightning-blue-theme.js → group-image.js} +4 -9
- package/module/components/brand-band/__examples__/group-image.js.map +1 -0
- package/module/components/brand-band/__examples__/no-image.js +2 -4
- package/module/components/brand-band/__examples__/no-image.js.map +1 -1
- package/module/components/brand-band/__examples__/user-image.js +52 -0
- package/module/components/brand-band/__examples__/user-image.js.map +1 -0
- package/module/components/brand-band/check-props.js +20 -0
- package/module/components/brand-band/check-props.js.map +1 -0
- package/module/components/brand-band/component.json +8 -4
- package/module/components/brand-band/index.js +10 -51
- package/module/components/brand-band/index.js.map +1 -1
- package/module/components/brand-band.d.ts +1 -26
- package/module/components/button/__tests__/button.browser-test.js +0 -1
- package/module/components/button/__tests__/button.browser-test.js.map +1 -1
- package/module/components/combobox/__tests__/combobox.browser-test.js +22 -0
- package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
- package/module/components/combobox/combobox.d.ts +3 -0
- package/module/components/combobox/combobox.js +9 -2
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +14 -39
- package/module/components/data-table/cell.js +6 -6
- package/module/components/data-table/cell.js.map +1 -1
- package/module/components/data-table/index.js +124 -95
- package/module/components/data-table/index.js.map +1 -1
- package/module/components/data-table/private/context-helper.js +12 -12
- package/module/components/data-table/private/context-helper.js.map +1 -1
- package/module/components/data-table/private/head.js +230 -255
- package/module/components/data-table/private/head.js.map +1 -1
- package/module/components/data-table/private/header-cell.js +184 -225
- package/module/components/data-table/private/header-cell.js.map +1 -1
- package/module/components/data-table/private/row.js +95 -87
- package/module/components/data-table/private/row.js.map +1 -1
- package/module/components/data-table/row-actions.js +6 -6
- package/module/components/data-table/row-actions.js.map +1 -1
- package/module/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/module/components/pill-container/private/selected-listbox.js +3 -0
- package/module/components/pill-container/private/selected-listbox.js.map +1 -1
- package/module/components/site-stories.js +6 -3
- package/module/components/site-stories.js.map +1 -1
- package/module/components/slider.d.ts +10 -4
- package/module/components/utilities/truncate/index.js +1 -1
- package/module/components/utilities/truncate/index.js.map +1 -1
- package/package.json +14 -10
- package/module/components/brand-band/__examples__/lightning-blue-theme.js.map +0 -1
|
@@ -4,7 +4,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
4
4
|
|
|
5
5
|
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
6
6
|
// ### React
|
|
7
|
-
import React, { useContext } from 'react';
|
|
7
|
+
import React, { useCallback, useContext, useMemo } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types'; // ### classNames
|
|
9
9
|
|
|
10
10
|
import classNames from 'classnames'; // ### find
|
|
@@ -18,7 +18,7 @@ import { DATA_TABLE_ROW, DATA_TABLE_ROW_ACTIONS, DATA_TABLE_CELL } from '../../.
|
|
|
18
18
|
import InteractiveElement from '../interactive-element';
|
|
19
19
|
import CellContext from '../private/cell-context';
|
|
20
20
|
import TableContext from '../private/table-context';
|
|
21
|
-
import
|
|
21
|
+
import useContextHelper from './context-helper';
|
|
22
22
|
var InteractiveCheckbox = InteractiveElement(Checkbox);
|
|
23
23
|
var InteractiveRadio = InteractiveElement(Radio);
|
|
24
24
|
var propTypes = {
|
|
@@ -54,29 +54,35 @@ var propTypes = {
|
|
|
54
54
|
|
|
55
55
|
var DataTableRow = function DataTableRow(props) {
|
|
56
56
|
var tableContext = useContext(TableContext);
|
|
57
|
-
var selectRowCellContext = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
var selectRowCellContext = useMemo(function () {
|
|
58
|
+
return {
|
|
59
|
+
rowIndex: props.rowIndex,
|
|
60
|
+
columnIndex: 0
|
|
61
|
+
};
|
|
62
|
+
}, [props.rowIndex]);
|
|
61
63
|
|
|
62
|
-
var
|
|
63
|
-
tabIndex =
|
|
64
|
-
hasFocus =
|
|
65
|
-
handleFocus =
|
|
66
|
-
handleKeyDown =
|
|
64
|
+
var _useContextHelper = useContextHelper(tableContext, selectRowCellContext, props.fixedLayout),
|
|
65
|
+
tabIndex = _useContextHelper.tabIndex,
|
|
66
|
+
hasFocus = _useContextHelper.hasFocus,
|
|
67
|
+
handleFocus = _useContextHelper.handleFocus,
|
|
68
|
+
handleKeyDown = _useContextHelper.handleKeyDown;
|
|
67
69
|
|
|
68
|
-
var
|
|
70
|
+
var item = props.item,
|
|
71
|
+
onToggle = props.onToggle;
|
|
72
|
+
var handleToggle = useCallback(function (e, _ref) {
|
|
69
73
|
var checked = _ref.checked;
|
|
70
|
-
return
|
|
71
|
-
};
|
|
74
|
+
return onToggle(item, checked, e);
|
|
75
|
+
}, [item, onToggle]);
|
|
76
|
+
var isSelected = !!find(props.selection, item);
|
|
77
|
+
var ariaProps = useMemo(function () {
|
|
78
|
+
var result = {};
|
|
72
79
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (props.canSelectRows) {
|
|
77
|
-
ariaProps['aria-selected'] = isSelected ? 'true' : 'false';
|
|
78
|
-
} // i18n
|
|
80
|
+
if (props.canSelectRows) {
|
|
81
|
+
result['aria-selected'] = isSelected ? 'true' : 'false';
|
|
82
|
+
}
|
|
79
83
|
|
|
84
|
+
return result;
|
|
85
|
+
}, [isSelected, props.canSelectRows]); // i18n
|
|
80
86
|
|
|
81
87
|
return /*#__PURE__*/React.createElement("tr", _extends({}, ariaProps, {
|
|
82
88
|
className: classNames(props.className, {
|
|
@@ -84,76 +90,78 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
84
90
|
'slds-is-selected': props.canSelectRows && isSelected,
|
|
85
91
|
'slds-has-focus': hasFocus
|
|
86
92
|
})
|
|
87
|
-
}),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_ref2
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
93
|
+
}), useMemo(function () {
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.canSelectRows ?
|
|
95
|
+
/*#__PURE__*/
|
|
96
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
97
|
+
React.createElement("td", {
|
|
98
|
+
role: props.fixedLayout ? 'gridcell' : null,
|
|
99
|
+
className: "slds-text-align_right",
|
|
100
|
+
"data-label": props.stacked ? 'Select Row' : undefined,
|
|
101
|
+
style: {
|
|
102
|
+
width: '3.25rem'
|
|
103
|
+
},
|
|
104
|
+
onFocus: handleFocus,
|
|
105
|
+
onKeyDown: handleKeyDown,
|
|
106
|
+
ref: function ref(_ref2) {
|
|
107
|
+
if (_ref2 && hasFocus) {
|
|
108
|
+
_ref2.focus();
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
tabIndex: tabIndex
|
|
112
|
+
}, /*#__PURE__*/React.createElement(CellContext.Provider, {
|
|
113
|
+
value: selectRowCellContext
|
|
114
|
+
}, props.canSelectRows === 'radio' ? /*#__PURE__*/React.createElement(InteractiveRadio, {
|
|
115
|
+
assistiveText: {
|
|
116
|
+
label: "".concat(props.assistiveText.selectRow, " ").concat(Number(props.index) + 1)
|
|
117
|
+
},
|
|
118
|
+
"aria-labelledby": "".concat(props.id, "-SelectRow-label ").concat(props.tableId, "-SLDSDataTableHead-column-group-header-row-select"),
|
|
119
|
+
checked: isSelected,
|
|
120
|
+
className: "slds-m-right_x-small",
|
|
121
|
+
id: "".concat(props.id, "-SelectRow"),
|
|
122
|
+
labelId: "".concat(props.id, "-SelectRow-label"),
|
|
123
|
+
name: "".concat(props.tableId, "-SelectRow"),
|
|
124
|
+
onChange: handleToggle
|
|
125
|
+
}) : /*#__PURE__*/React.createElement(InteractiveCheckbox, {
|
|
126
|
+
assistiveText: {
|
|
127
|
+
label: "".concat(props.assistiveText.selectRow, " ").concat(Number(props.index) + 1)
|
|
128
|
+
},
|
|
129
|
+
"aria-labelledby": "".concat(props.id, "-SelectRow-label ").concat(props.tableId, "-SLDSDataTableHead-column-group-header-row-select"),
|
|
130
|
+
checked: isSelected,
|
|
131
|
+
id: "".concat(props.id, "-SelectRow"),
|
|
132
|
+
labelId: "".concat(props.id, "-SelectRow-label"),
|
|
133
|
+
name: "SelectRow".concat(props.index + 1),
|
|
134
|
+
onChange: handleToggle
|
|
135
|
+
}))) : null, props.columns.map(function (column, index) {
|
|
136
|
+
var Cell = column.Cell;
|
|
137
|
+
var cellId = "".concat(props.id, "-").concat(DATA_TABLE_CELL, "-").concat(column.props.property);
|
|
138
|
+
return /*#__PURE__*/React.createElement(CellContext.Provider, {
|
|
139
|
+
key: cellId,
|
|
140
|
+
value: {
|
|
141
|
+
columnIndex: props.canSelectRows ? index + 1 : index,
|
|
142
|
+
rowIndex: props.rowIndex
|
|
143
|
+
}
|
|
144
|
+
}, /*#__PURE__*/React.createElement(Cell, _extends({}, column.props, {
|
|
145
|
+
className: column.props.truncate ? 'slds-truncate' : null,
|
|
146
|
+
fixedLayout: props.fixedLayout,
|
|
147
|
+
rowHeader: column.props.primaryColumn,
|
|
148
|
+
id: cellId,
|
|
149
|
+
item: item,
|
|
150
|
+
width: column.props.width,
|
|
151
|
+
headerId: item.headerId,
|
|
152
|
+
columns: props.columns
|
|
153
|
+
}), item[column.props.property]));
|
|
154
|
+
}), /*#__PURE__*/React.createElement(CellContext.Provider, {
|
|
133
155
|
value: {
|
|
134
|
-
columnIndex: props.canSelectRows ?
|
|
156
|
+
columnIndex: props.canSelectRows ? props.columns.length + 1 : props.columns.length,
|
|
135
157
|
rowIndex: props.rowIndex
|
|
136
158
|
}
|
|
137
|
-
}, /*#__PURE__*/React.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
width: column.props.width,
|
|
144
|
-
headerId: props.item.headerId,
|
|
145
|
-
columns: props.columns
|
|
146
|
-
}), props.item[column.props.property]));
|
|
147
|
-
}), /*#__PURE__*/React.createElement(CellContext.Provider, {
|
|
148
|
-
value: {
|
|
149
|
-
columnIndex: props.canSelectRows ? props.columns.length + 1 : props.columns.length,
|
|
150
|
-
rowIndex: props.rowIndex
|
|
151
|
-
}
|
|
152
|
-
}, props.rowActions ? /*#__PURE__*/React.cloneElement(props.rowActions, {
|
|
153
|
-
id: "".concat(props.id, "-").concat(DATA_TABLE_ROW_ACTIONS),
|
|
154
|
-
item: props.item,
|
|
155
|
-
fixedLayout: props.fixedLayout
|
|
156
|
-
}) : null));
|
|
159
|
+
}, props.rowActions ? /*#__PURE__*/React.cloneElement(props.rowActions, {
|
|
160
|
+
id: "".concat(props.id, "-").concat(DATA_TABLE_ROW_ACTIONS),
|
|
161
|
+
item: item,
|
|
162
|
+
fixedLayout: props.fixedLayout
|
|
163
|
+
}) : null));
|
|
164
|
+
}, [handleFocus, handleKeyDown, handleToggle, hasFocus, isSelected, item, tabIndex, props.assistiveText.selectRow, props.canSelectRows, props.columns, props.fixedLayout, props.id, props.index, props.rowActions, props.rowIndex, props.stacked, props.tableId, selectRowCellContext]));
|
|
157
165
|
};
|
|
158
166
|
|
|
159
167
|
DataTableRow.displayName = DATA_TABLE_ROW;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/data-table/private/row.jsx"],"names":["React","useContext","PropTypes","classNames","find","Checkbox","Radio","DATA_TABLE_ROW","DATA_TABLE_ROW_ACTIONS","DATA_TABLE_CELL","InteractiveElement","CellContext","TableContext","contextHelper","InteractiveCheckbox","InteractiveRadio","propTypes","assistiveText","shape","actionsHeader","string","columnSort","columnSortedAscending","columnSortedDescending","selectAllRows","selectRow","canSelectRows","oneOfType","bool","oneOf","className","columns","arrayOf","Cell","func","props","object","fixedLayout","id","isRequired","item","onToggle","rowActions","element","selection","array","tableId","DataTableRow","tableContext","selectRowCellContext","rowIndex","columnIndex","tabIndex","hasFocus","handleFocus","handleKeyDown","handleToggle","e","checked","ariaProps","isSelected","stacked","undefined","width","ref","focus","label","Number","index","map","column","cellId","property","truncate","primaryColumn","headerId","length","cloneElement","displayName"],"mappings":";;AAAA;;AACA;AAEA;AACA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,SAAP,MAAsB,YAAtB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,YAAvB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ourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// ### React\nimport React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### find\nimport find from 'lodash.find';\n\n// ## Children\nimport Checkbox from '../../checkbox';\nimport Radio from '../../radio';\n\n// ## Constants\nimport {\n\tDATA_TABLE_ROW,\n\tDATA_TABLE_ROW_ACTIONS,\n\tDATA_TABLE_CELL,\n} from '../../../utilities/constants';\n\nimport InteractiveElement from '../interactive-element';\nimport CellContext from '../private/cell-context';\nimport TableContext from '../private/table-context';\nimport contextHelper from './context-helper';\n\nconst InteractiveCheckbox = InteractiveElement(Checkbox);\nconst InteractiveRadio = InteractiveElement(Radio);\n\nconst propTypes = {\n\tassistiveText: PropTypes.shape({\n\t\tactionsHeader: PropTypes.string,\n\t\tcolumnSort: PropTypes.string,\n\t\tcolumnSortedAscending: PropTypes.string,\n\t\tcolumnSortedDescending: PropTypes.string,\n\t\tselectAllRows: PropTypes.string,\n\t\tselectRow: PropTypes.string,\n\t}),\n\tcanSelectRows: PropTypes.oneOfType([\n\t\tPropTypes.bool,\n\t\tPropTypes.oneOf(['checkbox', 'radio']),\n\t]),\n\tclassName: PropTypes.string,\n\tcolumns: PropTypes.arrayOf(\n\t\tPropTypes.shape({\n\t\t\tCell: PropTypes.func,\n\t\t\tprops: PropTypes.object,\n\t\t})\n\t),\n\t/**\n\t * Use this if you are creating an advanced table (selectable, sortable, or resizable rows)\n\t */\n\tfixedLayout: PropTypes.bool,\n\tid: PropTypes.string.isRequired,\n\titem: PropTypes.object.isRequired,\n\tonToggle: PropTypes.func,\n\trowActions: PropTypes.element,\n\tselection: PropTypes.array,\n\ttableId: PropTypes.string,\n};\n\n/**\n * Used internally, provides row rendering to the DataTable.\n */\nconst DataTableRow = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst selectRowCellContext = {\n\t\trowIndex: props.rowIndex,\n\t\tcolumnIndex: 0,\n\t};\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = contextHelper(\n\t\ttableContext,\n\t\tselectRowCellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst handleToggle = (e, { checked }) =>\n\t\tprops.onToggle(props.item, checked, e);\n\n\tconst ariaProps = {};\n\tconst isSelected = !!find(props.selection, props.item);\n\n\tif (props.canSelectRows) {\n\t\tariaProps['aria-selected'] = isSelected ? 'true' : 'false';\n\t}\n\n\t// i18n\n\treturn (\n\t\t<tr\n\t\t\t{...ariaProps}\n\t\t\tclassName={classNames(props.className, {\n\t\t\t\t'slds-hint-parent': props.rowActions,\n\t\t\t\t'slds-is-selected': props.canSelectRows && isSelected,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t>\n\t\t\t{props.canSelectRows ? (\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t\t\t<td\n\t\t\t\t\trole={props.fixedLayout ? 'gridcell' : null}\n\t\t\t\t\tclassName=\"slds-text-align_right\"\n\t\t\t\t\tdata-label={props.stacked ? 'Select Row' : undefined}\n\t\t\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t>\n\t\t\t\t\t<CellContext.Provider value={selectRowCellContext}>\n\t\t\t\t\t\t{props.canSelectRows === 'radio' ? (\n\t\t\t\t\t\t\t<InteractiveRadio\n\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\tlabel: `${props.assistiveText.selectRow} ${\n\t\t\t\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<InteractiveCheckbox\n\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\tlabel: `${props.assistiveText.selectRow} ${\n\t\t\t\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\t\t\t\tname={`SelectRow${props.index + 1}`}\n\t\t\t\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t</td>\n\t\t\t) : null}\n\t\t\t{props.columns.map((column, index) => {\n\t\t\t\tconst { Cell } = column;\n\t\t\t\tconst cellId = `${props.id}-${DATA_TABLE_CELL}-${column.props.property}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\tkey={cellId}\n\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\trowIndex: props.rowIndex,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t\tclassName={column.props.truncate ? 'slds-truncate' : null}\n\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\trowHeader={column.props.primaryColumn}\n\t\t\t\t\t\t\tid={cellId}\n\t\t\t\t\t\t\titem={props.item}\n\t\t\t\t\t\t\twidth={column.props.width}\n\t\t\t\t\t\t\theaderId={props.item.headerId}\n\t\t\t\t\t\t\tcolumns={props.columns}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.item[column.props.property]}\n\t\t\t\t\t\t</Cell>\n\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t);\n\t\t\t})}\n\t\t\t<CellContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tcolumnIndex: props.canSelectRows\n\t\t\t\t\t\t? props.columns.length + 1\n\t\t\t\t\t\t: props.columns.length,\n\t\t\t\t\trowIndex: props.rowIndex,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{props.rowActions\n\t\t\t\t\t? React.cloneElement(props.rowActions, {\n\t\t\t\t\t\t\tid: `${props.id}-${DATA_TABLE_ROW_ACTIONS}`,\n\t\t\t\t\t\t\titem: props.item,\n\t\t\t\t\t\t\tfixedLayout: props.fixedLayout,\n\t\t\t\t\t })\n\t\t\t\t\t: null}\n\t\t\t</CellContext.Provider>\n\t\t</tr>\n\t);\n};\n\nDataTableRow.displayName = DATA_TABLE_ROW;\nDataTableRow.propTypes = propTypes;\nexport default DataTableRow;\n"],"file":"row.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/data-table/private/row.jsx"],"names":["React","useCallback","useContext","useMemo","PropTypes","classNames","find","Checkbox","Radio","DATA_TABLE_ROW","DATA_TABLE_ROW_ACTIONS","DATA_TABLE_CELL","InteractiveElement","CellContext","TableContext","useContextHelper","InteractiveCheckbox","InteractiveRadio","propTypes","assistiveText","shape","actionsHeader","string","columnSort","columnSortedAscending","columnSortedDescending","selectAllRows","selectRow","canSelectRows","oneOfType","bool","oneOf","className","columns","arrayOf","Cell","func","props","object","fixedLayout","id","isRequired","item","onToggle","rowActions","element","selection","array","tableId","DataTableRow","tableContext","selectRowCellContext","rowIndex","columnIndex","tabIndex","hasFocus","handleFocus","handleKeyDown","handleToggle","e","checked","isSelected","ariaProps","result","stacked","undefined","width","ref","focus","label","Number","index","map","column","cellId","property","truncate","primaryColumn","headerId","length","cloneElement","displayName"],"mappings":";;AAAA;;AACA;AAEA;AACA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,UAA7B,EAAyCC,OAAzC,QAAwD,OAAxD;AACA,OAAOC,SAAP,MAAsB,YAAtB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,YAAvB,C,CAEA;;AACA,OAAOC,IAAP,MAAiB,aAAjB,C,CAEA;;AACA,OAAOC,QAAP,MAAqB,gBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB,C,CAEA;;AACA,SACCC,cADD,EAECC,sBAFD,EAGCC,eAHD,QAIO,8BAJP;AAMA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,gBAAP,MAA6B,kBAA7B;AAEA,IAAMC,mBAAmB,GAAGJ,kBAAkB,CAACL,QAAD,CAA9C;AACA,IAAMU,gBAAgB,GAAGL,kBAAkB,CAACJ,KAAD,CAA3C;AAEA,IAAMU,SAAS,GAAG;AACjBC,EAAAA,aAAa,EAAEf,SAAS,CAACgB,KAAV,CAAgB;AAC9BC,IAAAA,aAAa,EAAEjB,SAAS,CAACkB,MADK;AAE9BC,IAAAA,UAAU,EAAEnB,SAAS,CAACkB,MAFQ;AAG9BE,IAAAA,qBAAqB,EAAEpB,SAAS,CAACkB,MAHH;AAI9BG,IAAAA,sBAAsB,EA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xE,cAA3B;AACAwC,YAAY,CAAC/B,SAAb,GAAyBA,SAAzB;AACA,eAAe+B,YAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// ### React\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### find\nimport find from 'lodash.find';\n\n// ## Children\nimport Checkbox from '../../checkbox';\nimport Radio from '../../radio';\n\n// ## Constants\nimport {\n\tDATA_TABLE_ROW,\n\tDATA_TABLE_ROW_ACTIONS,\n\tDATA_TABLE_CELL,\n} from '../../../utilities/constants';\n\nimport InteractiveElement from '../interactive-element';\nimport CellContext from '../private/cell-context';\nimport TableContext from '../private/table-context';\nimport useContextHelper from './context-helper';\n\nconst InteractiveCheckbox = InteractiveElement(Checkbox);\nconst InteractiveRadio = InteractiveElement(Radio);\n\nconst propTypes = {\n\tassistiveText: PropTypes.shape({\n\t\tactionsHeader: PropTypes.string,\n\t\tcolumnSort: PropTypes.string,\n\t\tcolumnSortedAscending: PropTypes.string,\n\t\tcolumnSortedDescending: PropTypes.string,\n\t\tselectAllRows: PropTypes.string,\n\t\tselectRow: PropTypes.string,\n\t}),\n\tcanSelectRows: PropTypes.oneOfType([\n\t\tPropTypes.bool,\n\t\tPropTypes.oneOf(['checkbox', 'radio']),\n\t]),\n\tclassName: PropTypes.string,\n\tcolumns: PropTypes.arrayOf(\n\t\tPropTypes.shape({\n\t\t\tCell: PropTypes.func,\n\t\t\tprops: PropTypes.object,\n\t\t})\n\t),\n\t/**\n\t * Use this if you are creating an advanced table (selectable, sortable, or resizable rows)\n\t */\n\tfixedLayout: PropTypes.bool,\n\tid: PropTypes.string.isRequired,\n\titem: PropTypes.object.isRequired,\n\tonToggle: PropTypes.func,\n\trowActions: PropTypes.element,\n\tselection: PropTypes.array,\n\ttableId: PropTypes.string,\n};\n\n/**\n * Used internally, provides row rendering to the DataTable.\n */\nconst DataTableRow = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst selectRowCellContext = useMemo(\n\t\t() => ({\n\t\t\trowIndex: props.rowIndex,\n\t\t\tcolumnIndex: 0,\n\t\t}),\n\t\t[props.rowIndex]\n\t);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tselectRowCellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst { item, onToggle } = props;\n\tconst handleToggle = useCallback(\n\t\t(e, { checked }) => onToggle(item, checked, e),\n\t\t[item, onToggle]\n\t);\n\n\tconst isSelected = !!find(props.selection, item);\n\tconst ariaProps = useMemo(() => {\n\t\tconst result = {};\n\n\t\tif (props.canSelectRows) {\n\t\t\tresult['aria-selected'] = isSelected ? 'true' : 'false';\n\t\t}\n\t\treturn result;\n\t}, [isSelected, props.canSelectRows]);\n\n\t// i18n\n\treturn (\n\t\t<tr\n\t\t\t{...ariaProps}\n\t\t\tclassName={classNames(props.className, {\n\t\t\t\t'slds-hint-parent': props.rowActions,\n\t\t\t\t'slds-is-selected': props.canSelectRows && isSelected,\n\t\t\t\t'slds-has-focus': hasFocus,\n\t\t\t})}\n\t\t>\n\t\t\t{useMemo(\n\t\t\t\t() => (\n\t\t\t\t\t<React.Fragment>\n\t\t\t\t\t\t{props.canSelectRows ? (\n\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\trole={props.fixedLayout ? 'gridcell' : null}\n\t\t\t\t\t\t\t\tclassName=\"slds-text-align_right\"\n\t\t\t\t\t\t\t\tdata-label={props.stacked ? 'Select Row' : undefined}\n\t\t\t\t\t\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\t\t\t\t\t\tonFocus={handleFocus}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CellContext.Provider value={selectRowCellContext}>\n\t\t\t\t\t\t\t\t\t{props.canSelectRows === 'radio' ? (\n\t\t\t\t\t\t\t\t\t\t<InteractiveRadio\n\t\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\t\tlabel: `${props.assistiveText.selectRow} ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"slds-m-right_x-small\"\n\t\t\t\t\t\t\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\t\t\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\t\t\t\t\t\t\tname={`${props.tableId}-SelectRow`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<InteractiveCheckbox\n\t\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\t\tlabel: `${props.assistiveText.selectRow} ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tNumber(props.index) + 1\n\t\t\t\t\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\taria-labelledby={`${props.id}-SelectRow-label ${props.tableId}-SLDSDataTableHead-column-group-header-row-select`}\n\t\t\t\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\t\t\t\tid={`${props.id}-SelectRow`}\n\t\t\t\t\t\t\t\t\t\t\tlabelId={`${props.id}-SelectRow-label`}\n\t\t\t\t\t\t\t\t\t\t\tname={`SelectRow${props.index + 1}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleToggle}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{props.columns.map((column, index) => {\n\t\t\t\t\t\t\tconst { Cell } = column;\n\t\t\t\t\t\t\tconst cellId = `${props.id}-${DATA_TABLE_CELL}-${column.props.property}`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\t\t\tkey={cellId}\n\t\t\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows ? index + 1 : index,\n\t\t\t\t\t\t\t\t\t\trowIndex: props.rowIndex,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t\t\t\t{...column.props}\n\t\t\t\t\t\t\t\t\t\tclassName={column.props.truncate ? 'slds-truncate' : null}\n\t\t\t\t\t\t\t\t\t\tfixedLayout={props.fixedLayout}\n\t\t\t\t\t\t\t\t\t\trowHeader={column.props.primaryColumn}\n\t\t\t\t\t\t\t\t\t\tid={cellId}\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\twidth={column.props.width}\n\t\t\t\t\t\t\t\t\t\theaderId={item.headerId}\n\t\t\t\t\t\t\t\t\t\tcolumns={props.columns}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{item[column.props.property]}\n\t\t\t\t\t\t\t\t\t</Cell>\n\t\t\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t<CellContext.Provider\n\t\t\t\t\t\t\tvalue={{\n\t\t\t\t\t\t\t\tcolumnIndex: props.canSelectRows\n\t\t\t\t\t\t\t\t\t? props.columns.length + 1\n\t\t\t\t\t\t\t\t\t: props.columns.length,\n\t\t\t\t\t\t\t\trowIndex: props.rowIndex,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{props.rowActions\n\t\t\t\t\t\t\t\t? React.cloneElement(props.rowActions, {\n\t\t\t\t\t\t\t\t\t\tid: `${props.id}-${DATA_TABLE_ROW_ACTIONS}`,\n\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\tfixedLayout: props.fixedLayout,\n\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t: null}\n\t\t\t\t\t\t</CellContext.Provider>\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t),\n\t\t\t\t[\n\t\t\t\t\thandleFocus,\n\t\t\t\t\thandleKeyDown,\n\t\t\t\t\thandleToggle,\n\t\t\t\t\thasFocus,\n\t\t\t\t\tisSelected,\n\t\t\t\t\titem,\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tprops.assistiveText.selectRow,\n\t\t\t\t\tprops.canSelectRows,\n\t\t\t\t\tprops.columns,\n\t\t\t\t\tprops.fixedLayout,\n\t\t\t\t\tprops.id,\n\t\t\t\t\tprops.index,\n\t\t\t\t\tprops.rowActions,\n\t\t\t\t\tprops.rowIndex,\n\t\t\t\t\tprops.stacked,\n\t\t\t\t\tprops.tableId,\n\t\t\t\t\tselectRowCellContext,\n\t\t\t\t]\n\t\t\t)}\n\t\t</tr>\n\t);\n};\n\nDataTableRow.displayName = DATA_TABLE_ROW;\nDataTableRow.propTypes = propTypes;\nexport default DataTableRow;\n"],"file":"row.js"}
|
|
@@ -22,7 +22,7 @@ import EventUtil from '../../utilities/event';
|
|
|
22
22
|
import InteractiveElement from './interactive-element';
|
|
23
23
|
import CellContext from './private/cell-context';
|
|
24
24
|
import TableContext from './private/table-context';
|
|
25
|
-
import
|
|
25
|
+
import useContextHelper from './private/context-helper'; // ## Constants
|
|
26
26
|
|
|
27
27
|
import { DATA_TABLE_ROW_ACTIONS } from '../../utilities/constants';
|
|
28
28
|
var InteractiveDropdown = InteractiveElement(Dropdown);
|
|
@@ -83,11 +83,11 @@ var DataTableRowActions = function DataTableRowActions(props) {
|
|
|
83
83
|
var tableContext = useContext(TableContext);
|
|
84
84
|
var cellContext = useContext(CellContext);
|
|
85
85
|
|
|
86
|
-
var
|
|
87
|
-
tabIndex =
|
|
88
|
-
hasFocus =
|
|
89
|
-
handleFocus =
|
|
90
|
-
handleKeyDown =
|
|
86
|
+
var _useContextHelper = useContextHelper(tableContext, cellContext, props.fixedLayout),
|
|
87
|
+
tabIndex = _useContextHelper.tabIndex,
|
|
88
|
+
hasFocus = _useContextHelper.hasFocus,
|
|
89
|
+
handleFocus = _useContextHelper.handleFocus,
|
|
90
|
+
handleKeyDown = _useContextHelper.handleKeyDown;
|
|
91
91
|
|
|
92
92
|
var handleClick = function handleClick(e) {
|
|
93
93
|
EventUtil.trap(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.tmp-es/components/data-table/row-actions.jsx"],"names":["React","useContext","PropTypes","classNames","isFunction","Dropdown","EventUtil","InteractiveElement","CellContext","TableContext","
|
|
1
|
+
{"version":3,"sources":["../../../.tmp-es/components/data-table/row-actions.jsx"],"names":["React","useContext","PropTypes","classNames","isFunction","Dropdown","EventUtil","InteractiveElement","CellContext","TableContext","useContextHelper","DATA_TABLE_ROW_ACTIONS","InteractiveDropdown","propTypes","assistiveText","object","className","string","id","item","noHint","bool","onAction","func","options","array","dropdown","node","defaultProps","icon","DataTableRowActions","props","tableContext","cellContext","fixedLayout","tabIndex","hasFocus","handleFocus","handleKeyDown","handleClick","e","trap","handleSelect","selection","onSelect","defaultDropdownProps","align","buttonClassName","buttonVariant","iconCategory","iconName","iconSize","iconVariant","hint","dropdownProps","width","ref","focus","displayName"],"mappings":";;;;;;AAAA;;AACA;;AAEA;AAEA;AACA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB,C,CAEA;;AACA,OAAOC,QAAP,MAAqB,kBAArB,C,CAEA;;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AAEA,OAAOC,kBAAP,MAA+B,uBAA/B;AACA,OAAOC,WAAP,MAAwB,wBAAxB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,gBAAP,MAA6B,0BAA7B,C,CAEA;;AACA,SAASC,sBAAT,QAAuC,2BAAvC;AAEA,IAAMC,mBAAmB,GAAGL,kBAAkB,CAACF,QAAD,CAA9C;AAEA,IAAMQ,SAAS,GAAG;AACjB;AACD;AACA;AACCC,EAAAA,aAAa,EAAEZ,SAAS,CAACa,MAJR;;AAKjB;AACD;AACA;AACCC,EAAAA,SAAS,EAAEd,SAAS,CAACe,MARJ;;AASjB;AACD;AACA;AACCC,EAAAA,EAAE,EAAEhB,SAAS,CAACe,MAZG;;AAajB;AACD;AACA;AACCE,EAAAA,IAAI,EAAEjB,SAAS,CAACa,MAhBC;;AAiBjB;AACD;AACA;AACCK,EAAAA,MAAM,EAAElB,SAAS,CAACmB,IApBD;;AAqBjB;AACD;AACA;AACCC,EAAAA,QAAQ,EAAEpB,SAAS,CAACqB,IAxBH;;AAyBjB;AACD;AACA;AACCC,EAAAA,OAAO,EAAEtB,SAAS,CAACuB,KA5BF;;AA6BjB;AACD;AACA;AACA;AACCC,EAAAA,QAAQ,EAAExB,SAAS,CAACyB;AAjCH,CAAlB;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;AACAiB,mBAAmB,CAACF,YAApB,GAAmCA,YAAnC;AACAE,mBAAmB,CAAC4B,WAApB,GAAkC/C,sBAAlC;AACA,eAAemB,mBAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\n// ### React\nimport React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\n\n// ## Children\nimport Dropdown from '../menu-dropdown';\n\n// ### Event Helpers\nimport EventUtil from '../../utilities/event';\n\nimport InteractiveElement from './interactive-element';\nimport CellContext from './private/cell-context';\nimport TableContext from './private/table-context';\nimport useContextHelper from './private/context-helper';\n\n// ## Constants\nimport { DATA_TABLE_ROW_ACTIONS } from '../../utilities/constants';\n\nconst InteractiveDropdown = InteractiveElement(Dropdown);\n\nconst propTypes = {\n\t/**\n\t * Description of the menu for screenreaders.\n\t */\n\tassistiveText: PropTypes.object,\n\t/**\n\t * Class names to be added to the actions menu.\n\t */\n\tclassName: PropTypes.string,\n\t/**\n\t * HTML ID to be added to the actions menu.\n\t */\n\tid: PropTypes.string,\n\t/**\n\t * `DataTable` row item\n\t */\n\titem: PropTypes.object,\n\t/**\n\t * Disable hint styling which changes the color of the dropdown svg on hover over.\n\t */\n\tnoHint: PropTypes.bool,\n\t/**\n\t * Triggered when an item is selected.\n\t */\n\tonAction: PropTypes.func,\n\t/**\n\t * `Dropdown` options. See `Dropdown`.\n\t */\n\toptions: PropTypes.array,\n\t/**\n\t * A [Dropdown](http://react.lightningdesignsystem.com/components/dropdown-menus/) component. The props from this drop will be merged and override any default props.\n\t * **Note:** onAction will not be overridden, both `DropDown`'s onSelect(dropDownActionOption) and onAction(rowItem, dropdownActionOption) will be called with appropriate parameters\n\t */\n\tdropdown: PropTypes.node,\n};\n\nconst defaultProps = {\n\tassistiveText: { icon: 'Actions' },\n\tnoHint: false,\n\toptions: [],\n};\n\n/**\n * RowActions provide a mechanism for defining a menu to display alongside each row in the DataTable.\n */\nconst DataTableRowActions = (props) => {\n\tconst tableContext = useContext(TableContext);\n\tconst cellContext = useContext(CellContext);\n\tconst { tabIndex, hasFocus, handleFocus, handleKeyDown } = useContextHelper(\n\t\ttableContext,\n\t\tcellContext,\n\t\tprops.fixedLayout\n\t);\n\n\tconst handleClick = (e) => {\n\t\tEventUtil.trap(e);\n\t};\n\n\tconst handleSelect = (selection) => {\n\t\tif (isFunction(props.onAction)) {\n\t\t\tprops.onAction(props.item, selection);\n\t\t}\n\t\tif (props.dropdown && isFunction(props.dropdown.props.onSelect)) {\n\t\t\tprops.dropdown.props.onSelect(selection);\n\t\t}\n\t};\n\n\t// i18n\n\tconst defaultDropdownProps = {\n\t\talign: 'right',\n\t\tbuttonClassName: 'slds-button_icon-x-small',\n\t\tbuttonVariant: 'icon',\n\t\ticonCategory: 'utility',\n\t\ticonName: 'down',\n\t\ticonSize: 'small',\n\t\ticonVariant: 'border-filled',\n\t\tassistiveText: props.assistiveText,\n\t\tclassName: props.className,\n\t\toptions: props.options,\n\t\thint: !props.noHint,\n\t\tid: props.id,\n\t};\n\n\tlet dropdownProps = props.dropdown ? props.dropdown.props : {};\n\tdropdownProps = {\n\t\t...defaultDropdownProps,\n\t\t...dropdownProps,\n\t\tonSelect: handleSelect,\n\t};\n\n\treturn (\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\t<td\n\t\t\tclassName={classNames({ 'slds-has-focus': hasFocus })}\n\t\t\tdata-label=\"Actions\"\n\t\t\tonClick={handleClick}\n\t\t\tstyle={{ width: '3.25rem' }}\n\t\t\tonFocus={handleFocus}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tref={(ref) => {\n\t\t\t\tif (ref && hasFocus) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t}}\n\t\t\trole={props.fixedLayout ? 'gridcell' : null}\n\t\t\ttabIndex={tabIndex}\n\t\t>\n\t\t\t{/* eslint-enable jsx-a11y/no-static-element-interactions */}\n\t\t\t<InteractiveDropdown {...dropdownProps} />\n\t\t</td>\n\t);\n};\n\nDataTableRowActions.propTypes = propTypes;\nDataTableRowActions.defaultProps = defaultProps;\nDataTableRowActions.displayName = DATA_TABLE_ROW_ACTIONS;\nexport default DataTableRowActions;\n"],"file":"row-actions.js"}
|
|
@@ -43,7 +43,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
|
|
|
43
43
|
>
|
|
44
44
|
<span
|
|
45
45
|
className="slds-pill__label"
|
|
46
|
-
title="
|
|
46
|
+
title="Full pill label verbiage mirrored here"
|
|
47
47
|
>
|
|
48
48
|
Pill Label 1
|
|
49
49
|
</span>
|
|
@@ -89,7 +89,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
|
|
|
89
89
|
>
|
|
90
90
|
<span
|
|
91
91
|
className="slds-pill__label"
|
|
92
|
-
title="
|
|
92
|
+
title="Full pill label verbiage mirrored here"
|
|
93
93
|
>
|
|
94
94
|
Pill Label 2
|
|
95
95
|
</span>
|
|
@@ -169,7 +169,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
|
|
|
169
169
|
>
|
|
170
170
|
<span
|
|
171
171
|
className="slds-pill__label"
|
|
172
|
-
title="
|
|
172
|
+
title="Full pill label verbiage mirrored here"
|
|
173
173
|
>
|
|
174
174
|
Pill Label 1
|
|
175
175
|
</span>
|
|
@@ -215,7 +215,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
|
|
|
215
215
|
>
|
|
216
216
|
<span
|
|
217
217
|
className="slds-pill__label"
|
|
218
|
-
title="
|
|
218
|
+
title="Full pill label verbiage mirrored here"
|
|
219
219
|
>
|
|
220
220
|
Pill Label 2
|
|
221
221
|
</span>
|
|
@@ -311,7 +311,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
|
|
|
311
311
|
</span>
|
|
312
312
|
<span
|
|
313
313
|
className="slds-pill__label"
|
|
314
|
-
title="
|
|
314
|
+
title="Full pill label verbiage mirrored here"
|
|
315
315
|
>
|
|
316
316
|
Pill Label 1
|
|
317
317
|
</span>
|
|
@@ -373,7 +373,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
|
|
|
373
373
|
</span>
|
|
374
374
|
<span
|
|
375
375
|
className="slds-pill__label"
|
|
376
|
-
title="
|
|
376
|
+
title="Full pill label verbiage mirrored here"
|
|
377
377
|
>
|
|
378
378
|
Pill Label 2
|
|
379
379
|
</span>
|
|
@@ -471,7 +471,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
471
471
|
</span>
|
|
472
472
|
<span
|
|
473
473
|
className="slds-pill__label"
|
|
474
|
-
title="
|
|
474
|
+
title="Full pill label verbiage mirrored here"
|
|
475
475
|
>
|
|
476
476
|
Pill Label 1
|
|
477
477
|
</span>
|
|
@@ -535,7 +535,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
535
535
|
</span>
|
|
536
536
|
<span
|
|
537
537
|
className="slds-pill__label"
|
|
538
|
-
title="
|
|
538
|
+
title="Full pill label verbiage mirrored here"
|
|
539
539
|
>
|
|
540
540
|
Pill Label 2
|
|
541
541
|
</span>
|
|
@@ -598,7 +598,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
598
598
|
</span>
|
|
599
599
|
<span
|
|
600
600
|
className="slds-pill__label"
|
|
601
|
-
title="
|
|
601
|
+
title="Full pill label verbiage mirrored here"
|
|
602
602
|
>
|
|
603
603
|
Pill Label 3
|
|
604
604
|
</span>
|
|
@@ -662,7 +662,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
662
662
|
</span>
|
|
663
663
|
<span
|
|
664
664
|
className="slds-pill__label"
|
|
665
|
-
title="
|
|
665
|
+
title="Full pill label verbiage mirrored here"
|
|
666
666
|
>
|
|
667
667
|
Pill Label 4
|
|
668
668
|
</span>
|
|
@@ -726,7 +726,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
726
726
|
</span>
|
|
727
727
|
<span
|
|
728
728
|
className="slds-pill__label"
|
|
729
|
-
title="
|
|
729
|
+
title="Full pill label verbiage mirrored here"
|
|
730
730
|
>
|
|
731
731
|
Pill Label 5
|
|
732
732
|
</span>
|
|
@@ -790,7 +790,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
790
790
|
</span>
|
|
791
791
|
<span
|
|
792
792
|
className="slds-pill__label"
|
|
793
|
-
title="
|
|
793
|
+
title="Full pill label verbiage mirrored here"
|
|
794
794
|
>
|
|
795
795
|
Pill Label 6
|
|
796
796
|
</span>
|
|
@@ -854,7 +854,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
854
854
|
</span>
|
|
855
855
|
<span
|
|
856
856
|
className="slds-pill__label"
|
|
857
|
-
title="
|
|
857
|
+
title="Full pill label verbiage mirrored here"
|
|
858
858
|
>
|
|
859
859
|
Pill Label 7
|
|
860
860
|
</span>
|
|
@@ -918,7 +918,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
918
918
|
</span>
|
|
919
919
|
<span
|
|
920
920
|
className="slds-pill__label"
|
|
921
|
-
title="
|
|
921
|
+
title="Full pill label verbiage mirrored here"
|
|
922
922
|
>
|
|
923
923
|
Pill Label 8
|
|
924
924
|
</span>
|
|
@@ -982,7 +982,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
982
982
|
</span>
|
|
983
983
|
<span
|
|
984
984
|
className="slds-pill__label"
|
|
985
|
-
title="
|
|
985
|
+
title="Full pill label verbiage mirrored here"
|
|
986
986
|
>
|
|
987
987
|
Pill Label 9
|
|
988
988
|
</span>
|
|
@@ -204,6 +204,8 @@ var SelectedListBox = function SelectedListBox(props) {
|
|
|
204
204
|
role: props.listboxRole,
|
|
205
205
|
"aria-orientation": props.listboxAriaOrientation
|
|
206
206
|
}, props.selection.map(function (option, renderIndex) {
|
|
207
|
+
var _option$title;
|
|
208
|
+
|
|
207
209
|
var hasTabIndex = renderIndex === props.activeOptionIndex;
|
|
208
210
|
var icon = getIcon(option);
|
|
209
211
|
var avatar = !icon ? getAvatar(option) : null;
|
|
@@ -247,6 +249,7 @@ var SelectedListBox = function SelectedListBox(props) {
|
|
|
247
249
|
icon: icon,
|
|
248
250
|
labels: {
|
|
249
251
|
label: option.label,
|
|
252
|
+
title: (_option$title = option.title) !== null && _option$title !== void 0 ? _option$title : option.label,
|
|
250
253
|
removeTitle: props.labels.removePillTitle
|
|
251
254
|
},
|
|
252
255
|
requestFocus: props.listboxHasFocus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/pill-container/private/selected-listbox.jsx"],"names":["React","PropTypes","classNames","Avatar","Icon","Pill","isReactComponent","propTypes","activeOption","object","activeOptionIndex","number","assistiveText","shape","label","string","removePill","selectedListboxLabel","className","oneOfType","array","events","onClickPill","func","onPillFocus","isRequired","onRequestFocus","onRequestFocusOnNextPill","onRequestFocusOnPreviousPill","onRequestRemove","id","isBare","bool","isInline","isPillContainer","listboxAriaOrientation","listboxRole","containerAriaOrientation","containerRole","labels","remove","title","renderAtSelectionLength","selectedListboxRef","selection","style","listboxHasFocus","variant","oneOf","defaultProps","getAvatar","option","avatarObject","avatar","HTMLElement","imgSrc","getIcon","iconObject","icon","category","name","SelectedListBox","props","length","undefined","ref","map","renderIndex","hasTabIndex","bare","error","onBlur","onBlurPill","onClick","event","data","index","onFocus","removeTitle","removePillTitle","displayName"],"mappings":";;;;;;AAAA;;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,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AAR,EAAiB;AACjCb,UAAAA,KAAK,CAACzC,MAAN,CAAaQ,eAAb,CAA6B6C,KAA7B,kCACIC,IADJ;AAECC,YAAAA,KAAK,EAAET;AAFR;AAIA,SA1BM;AA2BPzC,QAAAA,cAAc,EAAEoC,KAAK,CAACzC,MAAN,CAAaK;AA3BtB,OART;AAqCC,MAAA,SAAS,EAAE;AAAEyB,QAAAA,MAAM,EAANA;AAAF,OArCZ;AAsCC,MAAA,QAAQ,EAAEA,MAAM,CAACmB,KAtClB;AAuCC,MAAA,IAAI,EAAEZ,IAvCP;AAwCC,MAAA,MAAM,EAAE;AACP5C,QAAAA,KAAK,EAAEqC,MAAM,CAACrC,KADP;AAEPgE,QAAAA,WAAW,EAAEhB,KAAK,CAACvB,MAAN,CAAawC;AAFnB,OAxCT;AA4CC,MAAA,YAAY,EAAEjB,KAAK,CAAChB,eA5CrB;AA6CC,MAAA,QAAQ,EAAEsB,WAAW,GAAG,CAAH,GAAO,CAAC;AA7C9B,MALD,CADD;AAuDA,GA5DA,CAVF,CApBD,CADD,GA8FI,IA/FmB;AAAA,CAAxB;;AAiGAP,eAAe,CAACmB,WAAhB,GAA8B,iBAA9B;AACAnB,eAAe,CAACtD,SAAhB,GAA4BA,SAA5B;AACAsD,eAAe,CAACZ,YAAhB,GAA+BA,YAA/B;AAEA,eAAeY,eAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classNames from 'classnames';\n\nimport Avatar from '../../avatar';\nimport Icon from '../../icon';\nimport Pill from '../../utilities/pill';\n\nimport isReactComponent from '../../../utilities/is-react-component';\n\nconst propTypes = {\n\t/*\n\t * The option object within the selection prop that should have focus.\n\t */\n\tactiveOption: PropTypes.object,\n\t/*\n\t * The index of the option object within the selection prop that should have focus.\n\t */\n\tactiveOptionIndex: PropTypes.number,\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `label`: This is used as a visually hidden label if, no `labels.label` is provided.\n\t * * `removePill`: Aids in keyboard interaction with Pills.\n\t * * `selectedListboxLabel`: Used to identify the listbox\n\t */\n\tassistiveText: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t\tremovePill: PropTypes.string,\n\t\tselectedListboxLabel: PropTypes.string,\n\t}),\n\t/**\n\t * CSS classes to be added to the top-level `div` tag.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/*\n\t * Callbacks for various pill events such as click, focus, etc\n\t */\n\tevents: PropTypes.shape({\n\t\tonClickPill: PropTypes.func,\n\t\tonPillFocus: PropTypes.func.isRequired,\n\t\tonRequestFocus: PropTypes.func.isRequired,\n\t\tonRequestFocusOnNextPill: PropTypes.func.isRequired,\n\t\tonRequestFocusOnPreviousPill: PropTypes.func.isRequired,\n\t\tonRequestRemove: PropTypes.func.isRequired,\n\t}),\n\t/**\n\t * HTML id for component main container\n\t */\n\tid: PropTypes.string,\n\t/**\n\t * Determines whether component renders as a bare pill container with associated styling for child pills\n\t */\n\tisBare: PropTypes.bool,\n\t/**\n\t * Adds inline (inside of input) styling\n\t */\n\tisInline: PropTypes.bool,\n\t/**\n\t * Determines whether component renders as a pill container with associated styling and behavior\n\t */\n\tisPillContainer: PropTypes.bool,\n\t/**\n\t * The value of `aria-orientation` to use on the listbox element\n\t */\n\tlistboxAriaOrientation: PropTypes.string,\n\t/**\n\t * The value of `role` to use on the listbox element\n\t */\n\tlistboxRole: PropTypes.string,\n\t/**\n\t * The value of `aria-orientation` to use on the container element\n\t */\n\tcontainerAriaOrientation: PropTypes.string,\n\t/**\n\t * The value of `role` to use on the container element\n\t */\n\tcontainerRole: PropTypes.string,\n\t/*\n\t * Pill Label\n\t */\n\tlabels: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t\tremove: PropTypes.string,\n\t\ttitle: PropTypes.string,\n\t}),\n\t/**\n\t * Changes styles of the input. Currently `entity` is not supported.\n\t */\n\trenderAtSelectionLength: PropTypes.number,\n\t/**\n\t * This callback exposes the selected listbox reference / DOM node to parent components.\n\t */\n\tselectedListboxRef: PropTypes.func,\n\t/**\n\t * Accepts an array of item objects.\n\t */\n\tselection: PropTypes.array,\n\t/**\n\t * Custom styles to be passed to the top-level `div` tag\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Requests that the active option set focus on render\n\t */\n\tlistboxHasFocus: PropTypes.bool,\n\t/**\n\t * Changes styles of the input. Currently `entity` is not supported.\n\t */\n\tvariant: PropTypes.oneOf(['base', 'inline-listbox', 'readonly']),\n};\n\nconst defaultProps = {\n\tlistboxAriaOrientation: 'horizontal',\n\tlistboxRole: 'listbox',\n\trenderAtSelectionLength: 1,\n};\n\nconst getAvatar = (option) => {\n\tconst avatarObject = option.avatar;\n\tlet avatar = null;\n\n\tif (avatarObject) {\n\t\tif (isReactComponent(avatarObject) || avatarObject instanceof HTMLElement) {\n\t\t\tavatar = avatarObject;\n\t\t} else if (avatarObject.imgSrc) {\n\t\t\tavatar = (\n\t\t\t\t<Avatar\n\t\t\t\t\timgSrc={avatarObject.imgSrc}\n\t\t\t\t\ttitle={avatarObject.title || option.label}\n\t\t\t\t\tvariant={avatarObject.variant || 'user'}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn avatar;\n};\n\nconst getIcon = (option) => {\n\tconst iconObject = option.icon;\n\tlet icon = null;\n\n\tif (iconObject) {\n\t\tif (isReactComponent(iconObject) || iconObject instanceof HTMLElement) {\n\t\t\ticon = iconObject;\n\t\t} else if (iconObject.category && iconObject.name) {\n\t\t\ticon = (\n\t\t\t\t<Icon\n\t\t\t\t\tcategory={iconObject.category}\n\t\t\t\t\tname={iconObject.name}\n\t\t\t\t\ttitle={iconObject.title || option.label}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn icon;\n};\n\nconst SelectedListBox = (props) =>\n\tprops.selection.length >= props.renderAtSelectionLength ? (\n\t\t<div // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\tclassName={\n\t\t\t\tclassNames(\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-pill_container': props.isPillContainer,\n\t\t\t\t\t},\n\t\t\t\t\tprops.className\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tid={props.id}\n\t\t\tref={(ref) => {\n\t\t\t\tif (props.selectedListboxRef) {\n\t\t\t\t\tprops.selectedListboxRef(ref);\n\t\t\t\t}\n\t\t\t}}\n\t\t\tstyle={props.style}\n\t\t\t// Remove role and aria-orientation after slds-has-inline-listbox is deprecated in Combobox\n\t\t\trole={props.containerRole}\n\t\t\taria-orientation={props.containerAriaOrientation}\n\t\t>\n\t\t\t<ul\n\t\t\t\tclassName={classNames('slds-listbox', {\n\t\t\t\t\t'slds-listbox_inline': props.isInline,\n\t\t\t\t\t'slds-listbox_horizontal': !props.isInline,\n\t\t\t\t\t'slds-p-top_xxx-small': !props.isInline,\n\t\t\t\t})}\n\t\t\t\taria-label={props.assistiveText.selectedListboxLabel}\n\t\t\t\trole={props.listboxRole}\n\t\t\t\taria-orientation={props.listboxAriaOrientation}\n\t\t\t>\n\t\t\t\t{props.selection.map((option, renderIndex) => {\n\t\t\t\t\tconst hasTabIndex = renderIndex === props.activeOptionIndex;\n\t\t\t\t\tconst icon = getIcon(option);\n\t\t\t\t\tconst avatar = !icon ? getAvatar(option) : null;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t\t\t\tkey={`${props.id}-list-item-${option.id}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Pill\n\t\t\t\t\t\t\t\tactive={hasTabIndex && props.listboxHasFocus}\n\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\tremove: props.assistiveText.removePill,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tavatar={avatar}\n\t\t\t\t\t\t\t\tbare={option.bare || props.isBare}\n\t\t\t\t\t\t\t\terror={option.error}\n\t\t\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\t\t\tonBlur: props.events.onBlurPill,\n\t\t\t\t\t\t\t\t\tonClick:\n\t\t\t\t\t\t\t\t\t\ttypeof props.events.onClickPill === 'function'\n\t\t\t\t\t\t\t\t\t\t\t? (event, data) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tprops.events.onClickPill(event, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t\t\tonFocus: (event, data) => {\n\t\t\t\t\t\t\t\t\t\tprops.events.onPillFocus(event, {\n\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonRequestFocusOnNextPill:\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestFocusOnNextPill,\n\t\t\t\t\t\t\t\t\tonRequestFocusOnPreviousPill:\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestFocusOnPreviousPill,\n\t\t\t\t\t\t\t\t\tonRequestRemove: (event, data) => {\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestRemove(event, {\n\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonRequestFocus: props.events.onRequestFocus,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\teventData={{ option }}\n\t\t\t\t\t\t\t\thasError={option.error}\n\t\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\t\tlabels={{\n\t\t\t\t\t\t\t\t\tlabel: option.label,\n\t\t\t\t\t\t\t\t\tremoveTitle: props.labels.removePillTitle,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\trequestFocus={props.listboxHasFocus}\n\t\t\t\t\t\t\t\ttabIndex={hasTabIndex ? 0 : -1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ul>\n\t\t</div>\n\t) : null;\n\nSelectedListBox.displayName = 'SelectedListBox';\nSelectedListBox.propTypes = propTypes;\nSelectedListBox.defaultProps = defaultProps;\n\nexport default SelectedListBox;\n"],"file":"selected-listbox.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/pill-container/private/selected-listbox.jsx"],"names":["React","PropTypes","classNames","Avatar","Icon","Pill","isReactComponent","propTypes","activeOption","object","activeOptionIndex","number","assistiveText","shape","label","string","removePill","selectedListboxLabel","className","oneOfType","array","events","onClickPill","func","onPillFocus","isRequired","onRequestFocus","onRequestFocusOnNextPill","onRequestFocusOnPreviousPill","onRequestRemove","id","isBare","bool","isInline","isPillContainer","listboxAriaOrientation","listboxRole","containerAriaOrientation","containerRole","labels","remove","title","renderAtSelectionLength","selectedListboxRef","selection","style","listboxHasFocus","variant","oneOf","defaultProps","getAvatar","option","avatarObject","avatar","HTMLElement","imgSrc","getIcon","iconObject","icon","category","name","SelectedListBox","props","length","undefined","ref","map","renderIndex","hasTabIndex","bare","error","onBlur","onBlurPill","onClick","event","data","index","onFocus","removeTitle","removePillTitle","displayName"],"mappings":";;;;;;AAAA;;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAA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b,UAAAA,KAAK,CAACzC,MAAN,CAAaQ,eAAb,CAA6B6C,KAA7B,kCACIC,IADJ;AAECC,YAAAA,KAAK,EAAET;AAFR;AAIA,SA1BM;AA2BPzC,QAAAA,cAAc,EAAEoC,KAAK,CAACzC,MAAN,CAAaK;AA3BtB,OART;AAqCC,MAAA,SAAS,EAAE;AAAEyB,QAAAA,MAAM,EAANA;AAAF,OArCZ;AAsCC,MAAA,QAAQ,EAAEA,MAAM,CAACmB,KAtClB;AAuCC,MAAA,IAAI,EAAEZ,IAvCP;AAwCC,MAAA,MAAM,EAAE;AACP5C,QAAAA,KAAK,EAAEqC,MAAM,CAACrC,KADP;AAEP2B,QAAAA,KAAK,mBAAEU,MAAM,CAACV,KAAT,yDAAkBU,MAAM,CAACrC,KAFvB;AAGPgE,QAAAA,WAAW,EAAEhB,KAAK,CAACvB,MAAN,CAAawC;AAHnB,OAxCT;AA6CC,MAAA,YAAY,EAAEjB,KAAK,CAAChB,eA7CrB;AA8CC,MAAA,QAAQ,EAAEsB,WAAW,GAAG,CAAH,GAAO,CAAC;AA9C9B,MALD,CADD;AAwDA,GA7DA,CAVF,CApBD,CADD,GA+FI,IAhGmB;AAAA,CAAxB;;AAkGAP,eAAe,CAACmB,WAAhB,GAA8B,iBAA9B;AACAnB,eAAe,CAACtD,SAAhB,GAA4BA,SAA5B;AACAsD,eAAe,CAACZ,YAAhB,GAA+BA,YAA/B;AAEA,eAAeY,eAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classNames from 'classnames';\n\nimport Avatar from '../../avatar';\nimport Icon from '../../icon';\nimport Pill from '../../utilities/pill';\n\nimport isReactComponent from '../../../utilities/is-react-component';\n\nconst propTypes = {\n\t/*\n\t * The option object within the selection prop that should have focus.\n\t */\n\tactiveOption: PropTypes.object,\n\t/*\n\t * The index of the option object within the selection prop that should have focus.\n\t */\n\tactiveOptionIndex: PropTypes.number,\n\t/**\n\t * **Assistive text for accessibility**\n\t * This object is merged with the default props object on every render.\n\t * * `label`: This is used as a visually hidden label if, no `labels.label` is provided.\n\t * * `removePill`: Aids in keyboard interaction with Pills.\n\t * * `selectedListboxLabel`: Used to identify the listbox\n\t */\n\tassistiveText: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t\tremovePill: PropTypes.string,\n\t\tselectedListboxLabel: PropTypes.string,\n\t}),\n\t/**\n\t * CSS classes to be added to the top-level `div` tag.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/*\n\t * Callbacks for various pill events such as click, focus, etc\n\t */\n\tevents: PropTypes.shape({\n\t\tonClickPill: PropTypes.func,\n\t\tonPillFocus: PropTypes.func.isRequired,\n\t\tonRequestFocus: PropTypes.func.isRequired,\n\t\tonRequestFocusOnNextPill: PropTypes.func.isRequired,\n\t\tonRequestFocusOnPreviousPill: PropTypes.func.isRequired,\n\t\tonRequestRemove: PropTypes.func.isRequired,\n\t}),\n\t/**\n\t * HTML id for component main container\n\t */\n\tid: PropTypes.string,\n\t/**\n\t * Determines whether component renders as a bare pill container with associated styling for child pills\n\t */\n\tisBare: PropTypes.bool,\n\t/**\n\t * Adds inline (inside of input) styling\n\t */\n\tisInline: PropTypes.bool,\n\t/**\n\t * Determines whether component renders as a pill container with associated styling and behavior\n\t */\n\tisPillContainer: PropTypes.bool,\n\t/**\n\t * The value of `aria-orientation` to use on the listbox element\n\t */\n\tlistboxAriaOrientation: PropTypes.string,\n\t/**\n\t * The value of `role` to use on the listbox element\n\t */\n\tlistboxRole: PropTypes.string,\n\t/**\n\t * The value of `aria-orientation` to use on the container element\n\t */\n\tcontainerAriaOrientation: PropTypes.string,\n\t/**\n\t * The value of `role` to use on the container element\n\t */\n\tcontainerRole: PropTypes.string,\n\t/*\n\t * Pill Label\n\t */\n\tlabels: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t\tremove: PropTypes.string,\n\t\ttitle: PropTypes.string,\n\t}),\n\t/**\n\t * Changes styles of the input. Currently `entity` is not supported.\n\t */\n\trenderAtSelectionLength: PropTypes.number,\n\t/**\n\t * This callback exposes the selected listbox reference / DOM node to parent components.\n\t */\n\tselectedListboxRef: PropTypes.func,\n\t/**\n\t * Accepts an array of item objects.\n\t */\n\tselection: PropTypes.array,\n\t/**\n\t * Custom styles to be passed to the top-level `div` tag\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Requests that the active option set focus on render\n\t */\n\tlistboxHasFocus: PropTypes.bool,\n\t/**\n\t * Changes styles of the input. Currently `entity` is not supported.\n\t */\n\tvariant: PropTypes.oneOf(['base', 'inline-listbox', 'readonly']),\n};\n\nconst defaultProps = {\n\tlistboxAriaOrientation: 'horizontal',\n\tlistboxRole: 'listbox',\n\trenderAtSelectionLength: 1,\n};\n\nconst getAvatar = (option) => {\n\tconst avatarObject = option.avatar;\n\tlet avatar = null;\n\n\tif (avatarObject) {\n\t\tif (isReactComponent(avatarObject) || avatarObject instanceof HTMLElement) {\n\t\t\tavatar = avatarObject;\n\t\t} else if (avatarObject.imgSrc) {\n\t\t\tavatar = (\n\t\t\t\t<Avatar\n\t\t\t\t\timgSrc={avatarObject.imgSrc}\n\t\t\t\t\ttitle={avatarObject.title || option.label}\n\t\t\t\t\tvariant={avatarObject.variant || 'user'}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn avatar;\n};\n\nconst getIcon = (option) => {\n\tconst iconObject = option.icon;\n\tlet icon = null;\n\n\tif (iconObject) {\n\t\tif (isReactComponent(iconObject) || iconObject instanceof HTMLElement) {\n\t\t\ticon = iconObject;\n\t\t} else if (iconObject.category && iconObject.name) {\n\t\t\ticon = (\n\t\t\t\t<Icon\n\t\t\t\t\tcategory={iconObject.category}\n\t\t\t\t\tname={iconObject.name}\n\t\t\t\t\ttitle={iconObject.title || option.label}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn icon;\n};\n\nconst SelectedListBox = (props) =>\n\tprops.selection.length >= props.renderAtSelectionLength ? (\n\t\t<div // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\tclassName={\n\t\t\t\tclassNames(\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-pill_container': props.isPillContainer,\n\t\t\t\t\t},\n\t\t\t\t\tprops.className\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tid={props.id}\n\t\t\tref={(ref) => {\n\t\t\t\tif (props.selectedListboxRef) {\n\t\t\t\t\tprops.selectedListboxRef(ref);\n\t\t\t\t}\n\t\t\t}}\n\t\t\tstyle={props.style}\n\t\t\t// Remove role and aria-orientation after slds-has-inline-listbox is deprecated in Combobox\n\t\t\trole={props.containerRole}\n\t\t\taria-orientation={props.containerAriaOrientation}\n\t\t>\n\t\t\t<ul\n\t\t\t\tclassName={classNames('slds-listbox', {\n\t\t\t\t\t'slds-listbox_inline': props.isInline,\n\t\t\t\t\t'slds-listbox_horizontal': !props.isInline,\n\t\t\t\t\t'slds-p-top_xxx-small': !props.isInline,\n\t\t\t\t})}\n\t\t\t\taria-label={props.assistiveText.selectedListboxLabel}\n\t\t\t\trole={props.listboxRole}\n\t\t\t\taria-orientation={props.listboxAriaOrientation}\n\t\t\t>\n\t\t\t\t{props.selection.map((option, renderIndex) => {\n\t\t\t\t\tconst hasTabIndex = renderIndex === props.activeOptionIndex;\n\t\t\t\t\tconst icon = getIcon(option);\n\t\t\t\t\tconst avatar = !icon ? getAvatar(option) : null;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t\t\t\tkey={`${props.id}-list-item-${option.id}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Pill\n\t\t\t\t\t\t\t\tactive={hasTabIndex && props.listboxHasFocus}\n\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\tremove: props.assistiveText.removePill,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tavatar={avatar}\n\t\t\t\t\t\t\t\tbare={option.bare || props.isBare}\n\t\t\t\t\t\t\t\terror={option.error}\n\t\t\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\t\t\tonBlur: props.events.onBlurPill,\n\t\t\t\t\t\t\t\t\tonClick:\n\t\t\t\t\t\t\t\t\t\ttypeof props.events.onClickPill === 'function'\n\t\t\t\t\t\t\t\t\t\t\t? (event, data) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tprops.events.onClickPill(event, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t\t\tonFocus: (event, data) => {\n\t\t\t\t\t\t\t\t\t\tprops.events.onPillFocus(event, {\n\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonRequestFocusOnNextPill:\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestFocusOnNextPill,\n\t\t\t\t\t\t\t\t\tonRequestFocusOnPreviousPill:\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestFocusOnPreviousPill,\n\t\t\t\t\t\t\t\t\tonRequestRemove: (event, data) => {\n\t\t\t\t\t\t\t\t\t\tprops.events.onRequestRemove(event, {\n\t\t\t\t\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t\t\t\t\tindex: renderIndex,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonRequestFocus: props.events.onRequestFocus,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\teventData={{ option }}\n\t\t\t\t\t\t\t\thasError={option.error}\n\t\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\t\tlabels={{\n\t\t\t\t\t\t\t\t\tlabel: option.label,\n\t\t\t\t\t\t\t\t\ttitle: option.title ?? option.label,\n\t\t\t\t\t\t\t\t\tremoveTitle: props.labels.removePillTitle,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\trequestFocus={props.listboxHasFocus}\n\t\t\t\t\t\t\t\ttabIndex={hasTabIndex ? 0 : -1}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ul>\n\t\t</div>\n\t) : null;\n\nSelectedListBox.displayName = 'SelectedListBox';\nSelectedListBox.propTypes = propTypes;\nSelectedListBox.defaultProps = defaultProps;\n\nexport default SelectedListBox;\n"],"file":"selected-listbox.js"}
|
|
@@ -60,9 +60,6 @@ var documentationSiteLiveExamples = {
|
|
|
60
60
|
path: require('raw-loader!@salesforce/design-system-react/components/badge/__examples__/with-icon.jsx')
|
|
61
61
|
}],
|
|
62
62
|
'brand-band': [{
|
|
63
|
-
heading: 'Lightning Blue',
|
|
64
|
-
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/lightning-blue-theme.jsx')
|
|
65
|
-
}, {
|
|
66
63
|
heading: 'Default',
|
|
67
64
|
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/default.jsx')
|
|
68
65
|
}, {
|
|
@@ -74,6 +71,12 @@ var documentationSiteLiveExamples = {
|
|
|
74
71
|
}, {
|
|
75
72
|
heading: 'No Image',
|
|
76
73
|
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/no-image.jsx')
|
|
74
|
+
}, {
|
|
75
|
+
heading: 'User Image',
|
|
76
|
+
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/user-image.jsx')
|
|
77
|
+
}, {
|
|
78
|
+
heading: 'Group Image',
|
|
79
|
+
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/group-image.jsx')
|
|
77
80
|
}],
|
|
78
81
|
breadcrumb: [{
|
|
79
82
|
heading: 'Base',
|