@react-stately/table 3.11.8-nightly.4624 → 3.11.9-nightly.4629

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.
@@ -13,9 +13,9 @@ import {GridCollection as $iLnZt$GridCollection} from "@react-stately/grid";
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- const $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY = "row-header-column-" + Math.random().toString(36).slice(2);
17
- let $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = "row-header-column-" + Math.random().toString(36).slice(2);
18
- while($788781baa30117fa$var$ROW_HEADER_COLUMN_KEY === $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG)$788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = "row-header-column-" + Math.random().toString(36).slice(2);
16
+ const $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY = 'row-header-column-' + Math.random().toString(36).slice(2);
17
+ let $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);
18
+ while($788781baa30117fa$var$ROW_HEADER_COLUMN_KEY === $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG)$788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);
19
19
  function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
20
20
  if (columnNodes.length === 0) return [];
21
21
  let columns = [];
@@ -66,8 +66,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
66
66
  let rowLength = row.reduce((p, c)=>p + c.colspan, 0);
67
67
  if (rowLength < colIndex) {
68
68
  let placeholder = {
69
- type: "placeholder",
70
- key: "placeholder-" + item.key,
69
+ type: 'placeholder',
70
+ key: 'placeholder-' + item.key,
71
71
  colspan: colIndex - rowLength,
72
72
  index: rowLength,
73
73
  value: null,
@@ -102,8 +102,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
102
102
  let rowLength = row.reduce((p, c)=>p + c.colspan, 0);
103
103
  if (rowLength < columnNodes.length) {
104
104
  let placeholder = {
105
- type: "placeholder",
106
- key: "placeholder-" + row[row.length - 1].key,
105
+ type: 'placeholder',
106
+ key: 'placeholder-' + row[row.length - 1].key,
107
107
  colspan: columnNodes.length - rowLength,
108
108
  index: rowLength,
109
109
  value: null,
@@ -120,8 +120,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
120
120
  }
121
121
  return headerRows.map((childNodes, index)=>{
122
122
  let row = {
123
- type: "headerrow",
124
- key: "headerrow-" + index,
123
+ type: 'headerrow',
124
+ key: 'headerrow-' + index,
125
125
  index: index,
126
126
  value: null,
127
127
  rendered: null,
@@ -170,7 +170,7 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
170
170
  }
171
171
  getTextValue(key) {
172
172
  let row = this.getItem(key);
173
- if (!row) return "";
173
+ if (!row) return '';
174
174
  // If the row has a textValue, use that.
175
175
  if (row.textValue) return row.textValue;
176
176
  // Otherwise combine the text of each of the row header columns.
@@ -182,9 +182,9 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
182
182
  if (rowHeaderColumnKeys.has(column.key) && cell.textValue) text.push(cell.textValue);
183
183
  if (text.length === rowHeaderColumnKeys.size) break;
184
184
  }
185
- return text.join(" ");
185
+ return text.join(' ');
186
186
  }
187
- return "";
187
+ return '';
188
188
  }
189
189
  constructor(nodes, prev, opts){
190
190
  let rowHeaderColumnKeys = new Set();
@@ -193,10 +193,10 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
193
193
  // Add cell for selection checkboxes if needed.
194
194
  if (opts === null || opts === void 0 ? void 0 : opts.showSelectionCheckboxes) {
195
195
  let rowHeaderColumn = {
196
- type: "column",
196
+ type: 'column',
197
197
  key: $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY,
198
198
  value: null,
199
- textValue: "",
199
+ textValue: '',
200
200
  level: 0,
201
201
  index: (opts === null || opts === void 0 ? void 0 : opts.showDragButtons) ? 1 : 0,
202
202
  hasChildNodes: false,
@@ -211,10 +211,10 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
211
211
  // Add cell for drag buttons if needed.
212
212
  if (opts === null || opts === void 0 ? void 0 : opts.showDragButtons) {
213
213
  let rowHeaderColumn = {
214
- type: "column",
214
+ type: 'column',
215
215
  key: $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG,
216
216
  value: null,
217
- textValue: "",
217
+ textValue: '',
218
218
  level: 0,
219
219
  index: 0,
220
220
  hasChildNodes: false,
@@ -230,17 +230,17 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
230
230
  let columnKeyMap = new Map();
231
231
  let visit = (node)=>{
232
232
  switch(node.type){
233
- case "body":
233
+ case 'body':
234
234
  body = node;
235
235
  break;
236
- case "column":
236
+ case 'column':
237
237
  columnKeyMap.set(node.key, node);
238
238
  if (!node.hasChildNodes) {
239
239
  columns.push(node);
240
240
  if (node.props.isRowHeader) rowHeaderColumnKeys.add(node.key);
241
241
  }
242
242
  break;
243
- case "item":
243
+ case 'item':
244
244
  rows.push(node);
245
245
  return; // do not go into childNodes
246
246
  }
@@ -13,9 +13,9 @@ import {GridCollection as $iLnZt$GridCollection} from "@react-stately/grid";
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- const $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY = "row-header-column-" + Math.random().toString(36).slice(2);
17
- let $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = "row-header-column-" + Math.random().toString(36).slice(2);
18
- while($788781baa30117fa$var$ROW_HEADER_COLUMN_KEY === $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG)$788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = "row-header-column-" + Math.random().toString(36).slice(2);
16
+ const $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY = 'row-header-column-' + Math.random().toString(36).slice(2);
17
+ let $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);
18
+ while($788781baa30117fa$var$ROW_HEADER_COLUMN_KEY === $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG)$788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);
19
19
  function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
20
20
  if (columnNodes.length === 0) return [];
21
21
  let columns = [];
@@ -66,8 +66,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
66
66
  let rowLength = row.reduce((p, c)=>p + c.colspan, 0);
67
67
  if (rowLength < colIndex) {
68
68
  let placeholder = {
69
- type: "placeholder",
70
- key: "placeholder-" + item.key,
69
+ type: 'placeholder',
70
+ key: 'placeholder-' + item.key,
71
71
  colspan: colIndex - rowLength,
72
72
  index: rowLength,
73
73
  value: null,
@@ -102,8 +102,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
102
102
  let rowLength = row.reduce((p, c)=>p + c.colspan, 0);
103
103
  if (rowLength < columnNodes.length) {
104
104
  let placeholder = {
105
- type: "placeholder",
106
- key: "placeholder-" + row[row.length - 1].key,
105
+ type: 'placeholder',
106
+ key: 'placeholder-' + row[row.length - 1].key,
107
107
  colspan: columnNodes.length - rowLength,
108
108
  index: rowLength,
109
109
  value: null,
@@ -120,8 +120,8 @@ function $788781baa30117fa$export$7c127db850d4e81e(keyMap, columnNodes) {
120
120
  }
121
121
  return headerRows.map((childNodes, index)=>{
122
122
  let row = {
123
- type: "headerrow",
124
- key: "headerrow-" + index,
123
+ type: 'headerrow',
124
+ key: 'headerrow-' + index,
125
125
  index: index,
126
126
  value: null,
127
127
  rendered: null,
@@ -170,7 +170,7 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
170
170
  }
171
171
  getTextValue(key) {
172
172
  let row = this.getItem(key);
173
- if (!row) return "";
173
+ if (!row) return '';
174
174
  // If the row has a textValue, use that.
175
175
  if (row.textValue) return row.textValue;
176
176
  // Otherwise combine the text of each of the row header columns.
@@ -182,9 +182,9 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
182
182
  if (rowHeaderColumnKeys.has(column.key) && cell.textValue) text.push(cell.textValue);
183
183
  if (text.length === rowHeaderColumnKeys.size) break;
184
184
  }
185
- return text.join(" ");
185
+ return text.join(' ');
186
186
  }
187
- return "";
187
+ return '';
188
188
  }
189
189
  constructor(nodes, prev, opts){
190
190
  let rowHeaderColumnKeys = new Set();
@@ -193,10 +193,10 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
193
193
  // Add cell for selection checkboxes if needed.
194
194
  if (opts === null || opts === void 0 ? void 0 : opts.showSelectionCheckboxes) {
195
195
  let rowHeaderColumn = {
196
- type: "column",
196
+ type: 'column',
197
197
  key: $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY,
198
198
  value: null,
199
- textValue: "",
199
+ textValue: '',
200
200
  level: 0,
201
201
  index: (opts === null || opts === void 0 ? void 0 : opts.showDragButtons) ? 1 : 0,
202
202
  hasChildNodes: false,
@@ -211,10 +211,10 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
211
211
  // Add cell for drag buttons if needed.
212
212
  if (opts === null || opts === void 0 ? void 0 : opts.showDragButtons) {
213
213
  let rowHeaderColumn = {
214
- type: "column",
214
+ type: 'column',
215
215
  key: $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY_DRAG,
216
216
  value: null,
217
- textValue: "",
217
+ textValue: '',
218
218
  level: 0,
219
219
  index: 0,
220
220
  hasChildNodes: false,
@@ -230,17 +230,17 @@ class $788781baa30117fa$export$596e1b2e2cf93690 extends (0, $iLnZt$GridCollectio
230
230
  let columnKeyMap = new Map();
231
231
  let visit = (node)=>{
232
232
  switch(node.type){
233
- case "body":
233
+ case 'body':
234
234
  body = node;
235
235
  break;
236
- case "column":
236
+ case 'column':
237
237
  columnKeyMap.set(node.key, node);
238
238
  if (!node.hasChildNodes) {
239
239
  columns.push(node);
240
240
  if (node.props.isRowHeader) rowHeaderColumnKeys.add(node.key);
241
241
  }
242
242
  break;
243
- case "item":
243
+ case 'item':
244
244
  rows.push(node);
245
245
  return; // do not go into childNodes
246
246
  }
@@ -46,7 +46,7 @@ class $2240a72410c17d51$export$7ff77a162970b30e {
46
46
  var _col_props_defaultWidth, _ref;
47
47
  return [
48
48
  key,
49
- (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : "1fr"
49
+ (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : '1fr'
50
50
  ];
51
51
  }));
52
52
  }
@@ -87,7 +87,7 @@ class $2240a72410c17d51$export$7ff77a162970b30e {
87
87
  // controlledWidths will be the same in the collection
88
88
  frKey = column.key;
89
89
  frValue = (0, $9e5f6a0caf75716e$exports.parseFractionalUnit)(column.props.width);
90
- } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, "%"))) percentKeys.set(column.key, column.props.width);
90
+ } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, '%'))) percentKeys.set(column.key, column.props.width);
91
91
  // don't freeze columns to the right of the resizing one
92
92
  if (resizeIndex < i) {
93
93
  if (frKey) frKeysToTheRight.set(frKey, frValue);
@@ -152,7 +152,7 @@ class $2240a72410c17d51$export$7ff77a162970b30e {
152
152
  this.columnMinWidths = new Map();
153
153
  this.columnMaxWidths = new Map();
154
154
  var _options_getDefaultWidth;
155
- this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>"1fr";
155
+ this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>'1fr';
156
156
  var _options_getDefaultMinWidth;
157
157
  this.getDefaultMinWidth = (_options_getDefaultMinWidth = options === null || options === void 0 ? void 0 : options.getDefaultMinWidth) !== null && _options_getDefaultMinWidth !== void 0 ? _options_getDefaultMinWidth : ()=>75;
158
158
  }
@@ -40,7 +40,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
40
40
  var _col_props_defaultWidth, _ref;
41
41
  return [
42
42
  key,
43
- (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : "1fr"
43
+ (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : '1fr'
44
44
  ];
45
45
  }));
46
46
  }
@@ -81,7 +81,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
81
81
  // controlledWidths will be the same in the collection
82
82
  frKey = column.key;
83
83
  frValue = (0, $6818b1c4fc67028d$export$9078bad4c3934604)(column.props.width);
84
- } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, "%"))) percentKeys.set(column.key, column.props.width);
84
+ } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, '%'))) percentKeys.set(column.key, column.props.width);
85
85
  // don't freeze columns to the right of the resizing one
86
86
  if (resizeIndex < i) {
87
87
  if (frKey) frKeysToTheRight.set(frKey, frValue);
@@ -146,7 +146,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
146
146
  this.columnMinWidths = new Map();
147
147
  this.columnMaxWidths = new Map();
148
148
  var _options_getDefaultWidth;
149
- this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>"1fr";
149
+ this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>'1fr';
150
150
  var _options_getDefaultMinWidth;
151
151
  this.getDefaultMinWidth = (_options_getDefaultMinWidth = options === null || options === void 0 ? void 0 : options.getDefaultMinWidth) !== null && _options_getDefaultMinWidth !== void 0 ? _options_getDefaultMinWidth : ()=>75;
152
152
  }
@@ -40,7 +40,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
40
40
  var _col_props_defaultWidth, _ref;
41
41
  return [
42
42
  key,
43
- (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : "1fr"
43
+ (_ref = (_col_props_defaultWidth = col.props.defaultWidth) !== null && _col_props_defaultWidth !== void 0 ? _col_props_defaultWidth : (_this_getDefaultWidth = (_this = this).getDefaultWidth) === null || _this_getDefaultWidth === void 0 ? void 0 : _this_getDefaultWidth.call(_this, col)) !== null && _ref !== void 0 ? _ref : '1fr'
44
44
  ];
45
45
  }));
46
46
  }
@@ -81,7 +81,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
81
81
  // controlledWidths will be the same in the collection
82
82
  frKey = column.key;
83
83
  frValue = (0, $6818b1c4fc67028d$export$9078bad4c3934604)(column.props.width);
84
- } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, "%"))) percentKeys.set(column.key, column.props.width);
84
+ } else if (col !== column.key && ((_column_props_width = column.props.width) === null || _column_props_width === void 0 ? void 0 : (_column_props_width_endsWith = _column_props_width.endsWith) === null || _column_props_width_endsWith === void 0 ? void 0 : _column_props_width_endsWith.call(_column_props_width, '%'))) percentKeys.set(column.key, column.props.width);
85
85
  // don't freeze columns to the right of the resizing one
86
86
  if (resizeIndex < i) {
87
87
  if (frKey) frKeysToTheRight.set(frKey, frValue);
@@ -146,7 +146,7 @@ class $a9e7ae544a4e41dd$export$7ff77a162970b30e {
146
146
  this.columnMinWidths = new Map();
147
147
  this.columnMaxWidths = new Map();
148
148
  var _options_getDefaultWidth;
149
- this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>"1fr";
149
+ this.getDefaultWidth = (_options_getDefaultWidth = options === null || options === void 0 ? void 0 : options.getDefaultWidth) !== null && _options_getDefaultWidth !== void 0 ? _options_getDefaultWidth : ()=>'1fr';
150
150
  var _options_getDefaultMinWidth;
151
151
  this.getDefaultMinWidth = (_options_getDefaultMinWidth = options === null || options === void 0 ? void 0 : options.getDefaultMinWidth) !== null && _options_getDefaultMinWidth !== void 0 ? _options_getDefaultMinWidth : ()=>75;
152
152
  }
@@ -28,10 +28,10 @@ $f45775f5d6f744fa$var$TableHeader.getCollectionNode = function* getCollectionNod
28
28
  let { children: children, columns: columns } = props;
29
29
  // Clear columns so they aren't double added in strict mode.
30
30
  context.columns = [];
31
- if (typeof children === "function") {
32
- if (!columns) throw new Error("props.children was a function but props.columns is missing");
31
+ if (typeof children === 'function') {
32
+ if (!columns) throw new Error('props.children was a function but props.columns is missing');
33
33
  for (let column of columns)yield {
34
- type: "column",
34
+ type: 'column',
35
35
  value: column,
36
36
  renderer: children
37
37
  };
@@ -39,7 +39,7 @@ $f45775f5d6f744fa$var$TableHeader.getCollectionNode = function* getCollectionNod
39
39
  let columns = [];
40
40
  (0, ($parcel$interopDefault($kcTb5$react))).Children.forEach(children, (column)=>{
41
41
  columns.push({
42
- type: "column",
42
+ type: 'column',
43
43
  element: column
44
44
  });
45
45
  });
@@ -18,10 +18,10 @@ $312ae3b56a94a86e$var$TableHeader.getCollectionNode = function* getCollectionNod
18
18
  let { children: children, columns: columns } = props;
19
19
  // Clear columns so they aren't double added in strict mode.
20
20
  context.columns = [];
21
- if (typeof children === "function") {
22
- if (!columns) throw new Error("props.children was a function but props.columns is missing");
21
+ if (typeof children === 'function') {
22
+ if (!columns) throw new Error('props.children was a function but props.columns is missing');
23
23
  for (let column of columns)yield {
24
- type: "column",
24
+ type: 'column',
25
25
  value: column,
26
26
  renderer: children
27
27
  };
@@ -29,7 +29,7 @@ $312ae3b56a94a86e$var$TableHeader.getCollectionNode = function* getCollectionNod
29
29
  let columns = [];
30
30
  (0, $20k3Y$react).Children.forEach(children, (column)=>{
31
31
  columns.push({
32
- type: "column",
32
+ type: 'column',
33
33
  element: column
34
34
  });
35
35
  });
@@ -18,10 +18,10 @@ $312ae3b56a94a86e$var$TableHeader.getCollectionNode = function* getCollectionNod
18
18
  let { children: children, columns: columns } = props;
19
19
  // Clear columns so they aren't double added in strict mode.
20
20
  context.columns = [];
21
- if (typeof children === "function") {
22
- if (!columns) throw new Error("props.children was a function but props.columns is missing");
21
+ if (typeof children === 'function') {
22
+ if (!columns) throw new Error('props.children was a function but props.columns is missing');
23
23
  for (let column of columns)yield {
24
- type: "column",
24
+ type: 'column',
25
25
  value: column,
26
26
  renderer: children
27
27
  };
@@ -29,7 +29,7 @@ $312ae3b56a94a86e$var$TableHeader.getCollectionNode = function* getCollectionNod
29
29
  let columns = [];
30
30
  (0, $20k3Y$react).Children.forEach(children, (column)=>{
31
31
  columns.push({
32
- type: "column",
32
+ type: 'column',
33
33
  element: column
34
34
  });
35
35
  });
@@ -26,15 +26,15 @@ function $9e5f6a0caf75716e$export$9078bad4c3934604(width) {
26
26
  let match = width.match(/^(.+)(?=fr$)/);
27
27
  // if width is the incorrect format, just default it to a 1fr
28
28
  if (!match) {
29
- console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, "defaulting to '1fr'");
29
+ console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, 'defaulting to \'1fr\'');
30
30
  return 1;
31
31
  }
32
32
  return parseFloat(match[0]);
33
33
  }
34
34
  function $9e5f6a0caf75716e$export$7bbad27896f7ae9f(width, tableWidth) {
35
- if (typeof width === "string") {
35
+ if (typeof width === 'string') {
36
36
  let match = width.match(/^(\d+)(?=%$)/);
37
- if (!match) throw new Error("Only percentages or numbers are supported for static column widths");
37
+ if (!match) throw new Error('Only percentages or numbers are supported for static column widths');
38
38
  return tableWidth * (parseFloat(match[0]) / 100);
39
39
  }
40
40
  return width;
@@ -49,7 +49,7 @@ function $9e5f6a0caf75716e$export$55d50dc687385491(availableWidth, columns, chan
49
49
  let hasNonFrozenItems = false;
50
50
  let flexItems = columns.map((column, index)=>{
51
51
  var _column_width, _ref, _ref1;
52
- let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : "1fr";
52
+ let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : '1fr';
53
53
  let frozen = false;
54
54
  let baseSize = 0;
55
55
  let flex = 0;
@@ -16,15 +16,15 @@ function $6818b1c4fc67028d$export$9078bad4c3934604(width) {
16
16
  let match = width.match(/^(.+)(?=fr$)/);
17
17
  // if width is the incorrect format, just default it to a 1fr
18
18
  if (!match) {
19
- console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, "defaulting to '1fr'");
19
+ console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, 'defaulting to \'1fr\'');
20
20
  return 1;
21
21
  }
22
22
  return parseFloat(match[0]);
23
23
  }
24
24
  function $6818b1c4fc67028d$export$7bbad27896f7ae9f(width, tableWidth) {
25
- if (typeof width === "string") {
25
+ if (typeof width === 'string') {
26
26
  let match = width.match(/^(\d+)(?=%$)/);
27
- if (!match) throw new Error("Only percentages or numbers are supported for static column widths");
27
+ if (!match) throw new Error('Only percentages or numbers are supported for static column widths');
28
28
  return tableWidth * (parseFloat(match[0]) / 100);
29
29
  }
30
30
  return width;
@@ -39,7 +39,7 @@ function $6818b1c4fc67028d$export$55d50dc687385491(availableWidth, columns, chan
39
39
  let hasNonFrozenItems = false;
40
40
  let flexItems = columns.map((column, index)=>{
41
41
  var _column_width, _ref, _ref1;
42
- let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : "1fr";
42
+ let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : '1fr';
43
43
  let frozen = false;
44
44
  let baseSize = 0;
45
45
  let flex = 0;
@@ -16,15 +16,15 @@ function $6818b1c4fc67028d$export$9078bad4c3934604(width) {
16
16
  let match = width.match(/^(.+)(?=fr$)/);
17
17
  // if width is the incorrect format, just default it to a 1fr
18
18
  if (!match) {
19
- console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, "defaulting to '1fr'");
19
+ console.warn(`width: ${width} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, 'defaulting to \'1fr\'');
20
20
  return 1;
21
21
  }
22
22
  return parseFloat(match[0]);
23
23
  }
24
24
  function $6818b1c4fc67028d$export$7bbad27896f7ae9f(width, tableWidth) {
25
- if (typeof width === "string") {
25
+ if (typeof width === 'string') {
26
26
  let match = width.match(/^(\d+)(?=%$)/);
27
- if (!match) throw new Error("Only percentages or numbers are supported for static column widths");
27
+ if (!match) throw new Error('Only percentages or numbers are supported for static column widths');
28
28
  return tableWidth * (parseFloat(match[0]) / 100);
29
29
  }
30
30
  return width;
@@ -39,7 +39,7 @@ function $6818b1c4fc67028d$export$55d50dc687385491(availableWidth, columns, chan
39
39
  let hasNonFrozenItems = false;
40
40
  let flexItems = columns.map((column, index)=>{
41
41
  var _column_width, _ref, _ref1;
42
- let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : "1fr";
42
+ let width = changedColumns.get(column.key) != null ? changedColumns.get(column.key) : (_ref1 = (_ref = (_column_width = column.width) !== null && _column_width !== void 0 ? _column_width : column.defaultWidth) !== null && _ref !== void 0 ? _ref : getDefaultWidth === null || getDefaultWidth === void 0 ? void 0 : getDefaultWidth(index)) !== null && _ref1 !== void 0 ? _ref1 : '1fr';
43
43
  let frozen = false;
44
44
  let baseSize = 0;
45
45
  let flex = 0;
@@ -24,14 +24,14 @@ $parcel$export(module.exports, "useTableState", () => $e3f7784147dde23d$export$9
24
24
 
25
25
 
26
26
  const $e3f7784147dde23d$var$OPPOSITE_SORT_DIRECTION = {
27
- ascending: "descending",
28
- descending: "ascending"
27
+ ascending: 'descending',
28
+ descending: 'ascending'
29
29
  };
30
30
  function $e3f7784147dde23d$export$907bcc6c48325fd6(props) {
31
31
  let [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = (0, $hkaUn$react.useState)(false);
32
- let { selectionMode: selectionMode = "none", showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
32
+ let { selectionMode: selectionMode = 'none', showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
33
33
  let context = (0, $hkaUn$react.useMemo)(()=>({
34
- showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== "none",
34
+ showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== 'none',
35
35
  showDragButtons: showDragButtons,
36
36
  selectionMode: selectionMode,
37
37
  columns: []
@@ -47,7 +47,7 @@ function $e3f7784147dde23d$export$907bcc6c48325fd6(props) {
47
47
  let { disabledKeys: disabledKeys, selectionManager: selectionManager } = (0, $hkaUn$reactstatelygrid.useGridState)({
48
48
  ...props,
49
49
  collection: collection,
50
- disabledBehavior: props.disabledBehavior || "selection"
50
+ disabledBehavior: props.disabledBehavior || 'selection'
51
51
  });
52
52
  return {
53
53
  collection: collection,
@@ -61,7 +61,7 @@ function $e3f7784147dde23d$export$907bcc6c48325fd6(props) {
61
61
  var _props_sortDescriptor;
62
62
  props.onSortChange({
63
63
  column: columnKey,
64
- direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $e3f7784147dde23d$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : "ascending"
64
+ direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $e3f7784147dde23d$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : 'ascending'
65
65
  });
66
66
  }
67
67
  };
@@ -18,14 +18,14 @@ import {useCollection as $1YSEb$useCollection} from "@react-stately/collections"
18
18
 
19
19
 
20
20
  const $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION = {
21
- ascending: "descending",
22
- descending: "ascending"
21
+ ascending: 'descending',
22
+ descending: 'ascending'
23
23
  };
24
24
  function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
25
25
  let [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = (0, $1YSEb$useState)(false);
26
- let { selectionMode: selectionMode = "none", showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
26
+ let { selectionMode: selectionMode = 'none', showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
27
27
  let context = (0, $1YSEb$useMemo)(()=>({
28
- showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== "none",
28
+ showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== 'none',
29
29
  showDragButtons: showDragButtons,
30
30
  selectionMode: selectionMode,
31
31
  columns: []
@@ -41,7 +41,7 @@ function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
41
41
  let { disabledKeys: disabledKeys, selectionManager: selectionManager } = (0, $1YSEb$useGridState)({
42
42
  ...props,
43
43
  collection: collection,
44
- disabledBehavior: props.disabledBehavior || "selection"
44
+ disabledBehavior: props.disabledBehavior || 'selection'
45
45
  });
46
46
  return {
47
47
  collection: collection,
@@ -55,7 +55,7 @@ function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
55
55
  var _props_sortDescriptor;
56
56
  props.onSortChange({
57
57
  column: columnKey,
58
- direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : "ascending"
58
+ direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : 'ascending'
59
59
  });
60
60
  }
61
61
  };
@@ -18,14 +18,14 @@ import {useCollection as $1YSEb$useCollection} from "@react-stately/collections"
18
18
 
19
19
 
20
20
  const $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION = {
21
- ascending: "descending",
22
- descending: "ascending"
21
+ ascending: 'descending',
22
+ descending: 'ascending'
23
23
  };
24
24
  function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
25
25
  let [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = (0, $1YSEb$useState)(false);
26
- let { selectionMode: selectionMode = "none", showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
26
+ let { selectionMode: selectionMode = 'none', showSelectionCheckboxes: showSelectionCheckboxes, showDragButtons: showDragButtons } = props;
27
27
  let context = (0, $1YSEb$useMemo)(()=>({
28
- showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== "none",
28
+ showSelectionCheckboxes: showSelectionCheckboxes && selectionMode !== 'none',
29
29
  showDragButtons: showDragButtons,
30
30
  selectionMode: selectionMode,
31
31
  columns: []
@@ -41,7 +41,7 @@ function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
41
41
  let { disabledKeys: disabledKeys, selectionManager: selectionManager } = (0, $1YSEb$useGridState)({
42
42
  ...props,
43
43
  collection: collection,
44
- disabledBehavior: props.disabledBehavior || "selection"
44
+ disabledBehavior: props.disabledBehavior || 'selection'
45
45
  });
46
46
  return {
47
47
  collection: collection,
@@ -55,7 +55,7 @@ function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
55
55
  var _props_sortDescriptor;
56
56
  props.onSortChange({
57
57
  column: columnKey,
58
- direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : "ascending"
58
+ direction: direction !== null && direction !== void 0 ? direction : ((_props_sortDescriptor = props.sortDescriptor) === null || _props_sortDescriptor === void 0 ? void 0 : _props_sortDescriptor.column) === columnKey ? $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : 'ascending'
59
59
  });
60
60
  }
61
61
  };