@dooherceg/material-react-table 3.2.14 → 3.2.16

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/dist/index.esm.js CHANGED
@@ -545,7 +545,7 @@ const prepareColumns = ({ columnDefs, tableOptions, }) => {
545
545
  }
546
546
  }
547
547
  else if (columnDef.columnDefType === 'display') {
548
- columnDef = Object.assign(Object.assign(Object.assign({}, defaultDisplayColumn), columnDef), { onClickIconTypeColumn: undefined, iconsList: undefined });
548
+ columnDef = Object.assign(Object.assign(Object.assign({}, defaultDisplayColumn), columnDef), { onClickIconTypeColumn: undefined });
549
549
  }
550
550
  return columnDef;
551
551
  });
@@ -4429,21 +4429,37 @@ const EnumColumnResolver = {
4429
4429
  activeFilterRenderer: EnumActiveFilterItem,
4430
4430
  };
4431
4431
 
4432
+ // Resolves a status color to a theme palette color when one matches (e.g. 'warning',
4433
+ // 'error', 'success'), otherwise falls back to the raw value as a CSS color (e.g. '#d63031').
4434
+ const resolveStatusColor = (theme, color) => {
4435
+ var _a, _b;
4436
+ return (_b = (_a = theme.palette[color]) === null || _a === void 0 ? void 0 : _a.main) !== null && _b !== void 0 ? _b : color;
4437
+ };
4438
+ // Small colored dot used to represent an icon column's status — meta.availableIcons
4439
+ // only ever carries a color token/hex value, never an icon glyph name.
4440
+ // Forwards its ref so it can be used directly as a MUI Tooltip child.
4441
+ const MRT_IconStatusDot = forwardRef(({ color, size = 12 }, ref) => (jsx(Box, { ref: ref, sx: {
4442
+ bgcolor: (theme) => resolveStatusColor(theme, color),
4443
+ borderRadius: '50%',
4444
+ flexShrink: 0,
4445
+ height: size,
4446
+ width: size,
4447
+ } })));
4448
+ MRT_IconStatusDot.displayName = 'MRT_IconStatusDot';
4449
+
4432
4450
  const Iconify = forwardRef((_a, ref) => {
4433
4451
  var { icon, width = 20, sx } = _a, other = __rest(_a, ["icon", "width", "sx"]);
4434
4452
  return (jsx(Box, Object.assign({ ref: ref, component: Icon, className: "component-iconify", icon: icon, sx: Object.assign({ width, height: width }, sx) }, other)));
4435
4453
  });
4436
4454
 
4437
4455
  const DEFAULT_FIELD_SIZE$3 = 'small';
4438
- const MRT_FormIconInput = ({ name, columnDef, fieldConfig, }) => {
4439
- var _a, _b, _c, _d;
4456
+ const MRT_FormIconInput = ({ name, columnDef, fieldConfig, iconsList, }) => {
4457
+ var _a, _b, _c;
4440
4458
  const { control } = useFormContext();
4441
4459
  // Available options provided via column metadata — list of selectable icons
4442
4460
  const availableIcons = (_b = (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.availableIcons) !== null && _b !== void 0 ? _b : [];
4443
- // iconsList maps iconCode → Iconify icon name + default colour for rendering
4444
- const iconsList = (_c = columnDef.iconsList) !== null && _c !== void 0 ? _c : {};
4445
4461
  // Prefer string headers for the Select label; fall back to accessorKey if header is a render function
4446
- const label = (_d = fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.label) !== null && _d !== void 0 ? _d : (typeof columnDef.header === 'string' ? columnDef.header : name);
4462
+ const label = (_c = fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.label) !== null && _c !== void 0 ? _c : (typeof columnDef.header === 'string' ? columnDef.header : name);
4447
4463
  return (jsx(Controller, { control: control, name: name, rules: fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.rules, render: ({ field, fieldState }) => {
4448
4464
  var _a, _b, _c, _d;
4449
4465
  // The form stores the iconCode string — consistent with the filter editor value shape
@@ -4456,16 +4472,20 @@ const MRT_FormIconInput = ({ name, columnDef, fieldConfig, }) => {
4456
4472
  };
4457
4473
  // Renders the selected icon + tooltip inside the collapsed Select trigger
4458
4474
  const renderSelectedValue = (value) => {
4475
+ var _a;
4459
4476
  const option = availableIcons.find((icon) => String(icon.iconType.iconCode) === value);
4460
4477
  if (!option)
4461
4478
  return null;
4462
4479
  const iconDef = iconsList[value];
4463
- return (jsxs(Stack, { alignItems: "center", direction: "row", gap: 1, children: [iconDef && (jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 })), jsx(Typography, { variant: "body2", children: option.tooltip })] }));
4480
+ return (jsxs(Stack, { alignItems: "center", direction: "row", gap: 1, children: [iconDef ? (jsx(Iconify, { icon: iconDef.component, sx: { color: (_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : option.iconType.color }, width: 20 })) : (jsx(MRT_IconStatusDot, { color: option.iconType.color })), jsx(Typography, { variant: "body2", children: option.tooltip })] }));
4464
4481
  };
4465
4482
  return (jsxs(FormControl, { disabled: fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.disabled, error: !!fieldState.error, fullWidth: true, size: (_a = fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.size) !== null && _a !== void 0 ? _a : DEFAULT_FIELD_SIZE$3, children: [jsx(InputLabel, { sx: { '&.Mui-focused': { color: 'text.primary' } }, children: label }), jsx(Select, { label: label, MenuProps: { sx: { zIndex: 1400 } }, onBlur: field.onBlur, onChange: (e) => handleChange(e.target.value), renderValue: renderSelectedValue, value: currentValue, children: availableIcons.map((icon) => {
4483
+ var _a;
4466
4484
  const iconCode = String(icon.iconType.iconCode);
4467
4485
  const iconDef = iconsList[iconCode];
4468
- return (jsxs(MenuItem, { sx: { alignItems: 'center', display: 'flex', gap: 1 }, value: iconCode, children: [iconDef && (jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 })), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, iconCode));
4486
+ return (jsxs(MenuItem, { sx: { alignItems: 'center', display: 'flex', gap: 1 }, value: iconCode, children: [iconDef ? (jsx(Iconify, { icon: iconDef.component, sx: {
4487
+ color: (_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : icon.iconType.color,
4488
+ }, width: 20 })) : (jsx(MRT_IconStatusDot, { color: icon.iconType.color })), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, iconCode));
4469
4489
  }) }), (((_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message) || (fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.helperText)) && (jsx(FormHelperText, { children: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.helperText }))] }));
4470
4490
  } }));
4471
4491
  };
@@ -4478,14 +4498,16 @@ const IconActiveFilterItem = (table, rule) => {
4478
4498
  const column = getFilterColumn(table, rule.columnId);
4479
4499
  const iconColumnDef = column === null || column === void 0 ? void 0 : column.columnDef;
4480
4500
  const availableIcons = (_b = (_a = iconColumnDef === null || iconColumnDef === void 0 ? void 0 : iconColumnDef.meta) === null || _a === void 0 ? void 0 : _a.availableIcons) !== null && _b !== void 0 ? _b : [];
4481
- const iconsList = (_c = iconColumnDef === null || iconColumnDef === void 0 ? void 0 : iconColumnDef.iconsList) !== null && _c !== void 0 ? _c : {};
4501
+ // Table-wide iconCode -> Iconify glyph map (table.options.iconsList)
4502
+ const iconsList = (_c = table.options.iconsList) !== null && _c !== void 0 ? _c : {};
4482
4503
  const renderIconByCode = (iconCode, index) => {
4504
+ var _a;
4483
4505
  const iconOption = getIconOptionByCode(iconCode, availableIcons);
4484
- const iconDefinition = iconsList[String(iconCode)];
4485
- if (!iconOption || !iconDefinition) {
4506
+ if (!iconOption) {
4486
4507
  return (jsx(Typography, { variant: "body2", children: String(iconCode) }, index !== null && index !== void 0 ? index : iconCode));
4487
4508
  }
4488
- return (jsx(Tooltip, { title: iconOption.tooltip || iconOption.iconType.description, children: jsx("span", { style: { display: 'inline-flex', alignItems: 'center' }, children: jsx(Iconify, { icon: iconDefinition.icon, sx: { color: iconDefinition.defaultColor }, width: 20 }) }) }, index !== null && index !== void 0 ? index : iconCode));
4509
+ const iconDef = iconsList[String(iconCode)];
4510
+ return (jsx(Tooltip, { title: iconOption.tooltip || iconOption.iconType.description, children: iconDef ? (jsx(Iconify, { icon: iconDef.component, sx: { color: (_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : iconOption.iconType.color }, width: 20 })) : (jsx(MRT_IconStatusDot, { color: iconOption.iconType.color })) }, index !== null && index !== void 0 ? index : iconCode));
4489
4511
  };
4490
4512
  if (rule.operator === 'isAnyOf' && Array.isArray(rule.value)) {
4491
4513
  return (jsx(MRT_ActiveFilterItemContainer, { table: table, rule: rule, children: jsx(Stack, { direction: "row", gap: 0.5, flexWrap: "wrap", alignItems: "center", children: rule.value.map((iconCode, index) => renderIconByCode(String(iconCode), index)) }) }));
@@ -4493,6 +4515,13 @@ const IconActiveFilterItem = (table, rule) => {
4493
4515
  return (jsx(MRT_ActiveFilterItemContainer, { table: table, rule: rule, children: renderIconByCode(String(rule.value)) }));
4494
4516
  };
4495
4517
 
4518
+ // Renders the real Iconify glyph when the consumer supplied one for this
4519
+ // iconCode, otherwise falls back to a colored dot using the option's color.
4520
+ const renderIconOption$1 = (option, iconsList) => {
4521
+ var _a;
4522
+ const iconDef = iconsList[String(option.iconType.iconCode)];
4523
+ return iconDef ? (jsx(Iconify, { icon: iconDef.component, sx: { color: (_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : option.iconType.color }, width: 20 })) : (jsx(MRT_IconStatusDot, { color: option.iconType.color }));
4524
+ };
4496
4525
  // Multi-select filter editor for icon column type.
4497
4526
  // Used by the 'inArray' (Je bilo koje od) operator.
4498
4527
  // Stores the selected iconCodes as string[] in the filter rule value.
@@ -4509,15 +4538,16 @@ const MRT_IconMultiValueEditor = ({ availableIcons, column, iconsList, onChange,
4509
4538
  const columnLabel = typeof column.columnDef.header === 'string'
4510
4539
  ? column.columnDef.header
4511
4540
  : column.id;
4541
+ // Unique per rule so multiple filter rows never collide, and the label is
4542
+ // properly associated with its field (fixes "no label associated"/"missing id" a11y errors).
4543
+ const inputId = `mrt-icon-filter-${rule.id}`;
4544
+ const labelId = `${inputId}-label`;
4512
4545
  // Renders the row of selected icons inside the collapsed multi-select trigger
4513
4546
  const renderSelectedValues = (values) => (jsx(Stack, { direction: "row", gap: 0.5, flexWrap: "wrap", alignItems: "center", children: values.map((iconCode) => {
4514
4547
  const option = availableIcons.find((icon) => String(icon.iconType.iconCode) === iconCode);
4515
4548
  if (!option)
4516
4549
  return null;
4517
- const iconDef = iconsList[iconCode];
4518
- if (!iconDef)
4519
- return null;
4520
- return (jsx(Tooltip, { title: option.tooltip, children: jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 }, iconCode) }, iconCode));
4550
+ return (jsx(Tooltip, { title: option.tooltip, children: renderIconOption$1(option, iconsList) }, iconCode));
4521
4551
  }) }));
4522
4552
  const handleChange = (event) => {
4523
4553
  const { value } = event.target;
@@ -4525,23 +4555,21 @@ const MRT_IconMultiValueEditor = ({ availableIcons, column, iconsList, onChange,
4525
4555
  const normalizedValues = typeof value === 'string' ? value.split(',') : value;
4526
4556
  onChange(normalizedValues);
4527
4557
  };
4528
- // Controls both the floating label and the notch in the outlined border.
4529
- // MUI treats value=[] as "filled" ([] !== ''), which would cut the notch
4530
- // even when nothing is selected — so we override both states explicitly.
4531
- const hasValue = selectedValues.length > 0;
4532
- return (jsxs(FormControl, { fullWidth: true, size: "small", children: [jsx(InputLabel, { shrink: hasValue, sx: { '&.Mui-focused': { color: 'text.primary' } }, children: columnLabel }), jsx(Select, { label: hasValue ? columnLabel : undefined, MenuProps: { sx: { zIndex: 9999 } }, multiple: true, onChange: handleChange, renderValue: renderSelectedValues, size: "small", sx: { '& .MuiSelect-Select': { height: 'initial' } }, SelectDisplayProps: {
4533
- style: { display: 'flex', alignItems: 'center' },
4534
- }, value: selectedValues, children: availableIcons.map((icon) => {
4535
- const iconDef = iconsList[String(icon.iconType.iconCode)];
4536
- return (jsxs(MenuItem, { sx: {
4537
- alignItems: 'center',
4538
- display: 'flex',
4539
- flexDirection: 'row',
4540
- gap: 1,
4541
- }, value: String(icon.iconType.iconCode), children: [iconDef && (jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 })), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, String(icon.iconType.iconCode)));
4542
- }) })] }));
4558
+ return (jsxs(FormControl, { fullWidth: true, size: "small", children: [jsx(InputLabel, { htmlFor: inputId, id: labelId, children: columnLabel }), jsx(Select, { id: inputId, label: columnLabel, labelId: labelId, MenuProps: { sx: { zIndex: 9999 } }, multiple: true, name: inputId, onChange: handleChange, renderValue: renderSelectedValues, size: "small", value: selectedValues, children: availableIcons.map((icon) => (jsxs(MenuItem, { sx: {
4559
+ alignItems: 'center',
4560
+ display: 'flex',
4561
+ flexDirection: 'row',
4562
+ gap: 1,
4563
+ }, value: String(icon.iconType.iconCode), children: [renderIconOption$1(icon, iconsList), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, String(icon.iconType.iconCode)))) })] }));
4543
4564
  };
4544
4565
 
4566
+ // Renders the real Iconify glyph when the consumer supplied one for this
4567
+ // iconCode, otherwise falls back to a colored dot using the option's color.
4568
+ const renderIconOption = (option, iconsList) => {
4569
+ var _a;
4570
+ const iconDef = iconsList[String(option.iconType.iconCode)];
4571
+ return iconDef ? (jsx(Iconify, { icon: iconDef.component, sx: { color: (_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : option.iconType.color }, width: 20 })) : (jsx(MRT_IconStatusDot, { color: option.iconType.color }));
4572
+ };
4545
4573
  // Single-select filter editor for icon column type.
4546
4574
  // Used by the 'is' (Je) and 'not' (Nije) operators.
4547
4575
  // Stores the selected iconCode as a string in the filter rule value.
@@ -4556,35 +4584,57 @@ const MRT_IconSingleValueEditor = ({ availableIcons, column, iconsList, onChange
4556
4584
  const columnLabel = typeof column.columnDef.header === 'string'
4557
4585
  ? column.columnDef.header
4558
4586
  : column.id;
4587
+ // Unique per rule so multiple filter rows never collide, and the label is
4588
+ // properly associated with its field (fixes "no label associated"/"missing id" a11y errors).
4589
+ const inputId = `mrt-icon-filter-${rule.id}`;
4590
+ const labelId = `${inputId}-label`;
4559
4591
  // Renders the selected icon + tooltip inside the collapsed Select trigger
4560
4592
  const renderSelectedValue = (value) => {
4561
4593
  const option = availableIcons.find((icon) => String(icon.iconType.iconCode) === value);
4562
4594
  if (!option)
4563
4595
  return null;
4564
- const iconDef = iconsList[String(option.iconType.iconCode)];
4565
- return (jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [iconDef && (jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 })), jsx(Typography, { variant: "body2", children: option.tooltip })] }));
4596
+ return (jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [renderIconOption(option, iconsList), jsx(Typography, { variant: "body2", children: option.tooltip })] }));
4566
4597
  };
4567
- return (jsxs(FormControl, { fullWidth: true, size: "small", children: [jsx(InputLabel, { shrink: !!currentValue, sx: { '&.Mui-focused': { color: 'text.primary' } }, children: columnLabel }), jsx(Select, { displayEmpty: true, label: currentValue ? columnLabel : undefined, MenuProps: { sx: { zIndex: 9999 } }, onChange: (event) => onChange(event.target.value), renderValue: renderSelectedValue, size: "small", sx: { '& .MuiSelect-Select': { height: 'initial' } }, SelectDisplayProps: {
4598
+ return (jsxs(FormControl, { fullWidth: true, size: "small", children: [jsx(InputLabel, { htmlFor: inputId, id: labelId, children: columnLabel }), jsx(Select, { id: inputId, label: columnLabel, labelId: labelId, MenuProps: { sx: { zIndex: 9999 } }, name: inputId, onChange: (event) => onChange(event.target.value), renderValue: renderSelectedValue, size: "small", sx: { '& .MuiSelect-Select': { height: 'initial' } }, SelectDisplayProps: {
4568
4599
  style: { display: 'flex', alignItems: 'center' },
4569
- }, value: currentValue, children: availableIcons.map((icon) => {
4570
- const iconDef = iconsList[String(icon.iconType.iconCode)];
4571
- return (jsxs(MenuItem, { sx: {
4572
- alignItems: 'center',
4573
- display: 'flex',
4574
- flexDirection: 'row',
4575
- gap: 1,
4576
- }, value: String(icon.iconType.iconCode), children: [iconDef && (jsx(Iconify, { icon: iconDef.icon, sx: { color: iconDef.defaultColor }, width: 20 })), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, String(icon.iconType.iconCode)));
4577
- }) })] }));
4600
+ }, value: currentValue, children: availableIcons.map((icon) => (jsxs(MenuItem, { sx: {
4601
+ alignItems: 'center',
4602
+ display: 'flex',
4603
+ flexDirection: 'row',
4604
+ gap: 1,
4605
+ }, value: String(icon.iconType.iconCode), children: [renderIconOption(icon, iconsList), jsx(Typography, { variant: "body2", children: icon.tooltip })] }, String(icon.iconType.iconCode)))) })] }));
4578
4606
  };
4579
4607
 
4580
4608
  const IconColumnResolver = {
4581
4609
  createColumnDef: (column) => (Object.assign(Object.assign({}, column), { type: 'icon', Cell: ({ row, table, cell }) => {
4610
+ var _a, _b, _c;
4582
4611
  const value = cell.getValue();
4583
- const iconsList = column.iconsList || {};
4584
- if (!iconsList[value.iconCode])
4612
+ if (!value)
4585
4613
  return null;
4586
- const icon = iconsList[value.iconCode];
4587
- const { additional } = value;
4614
+ // Without any configured icon options this column isn't set up for icons at
4615
+ // all — render nothing rather than a dot backed by no real definition.
4616
+ const availableIcons = (_b = (_a = column.meta) === null || _a === void 0 ? void 0 : _a.availableIcons) !== null && _b !== void 0 ? _b : [];
4617
+ if (!availableIcons.length)
4618
+ return null;
4619
+ // meta.availableIcons carries the tooltip text per iconCode; the cell
4620
+ // value's own `description` is used as a fallback when no match is found.
4621
+ const resolveTooltip = (iconCode, fallbackDescription) => {
4622
+ var _a;
4623
+ return ((_a = availableIcons.find((option) => option.iconType.iconCode === iconCode)) === null || _a === void 0 ? void 0 : _a.tooltip) || fallbackDescription;
4624
+ };
4625
+ // Table-wide iconCode -> Iconify glyph map (table.options.iconsList).
4626
+ // When a code isn't in it (or no map was supplied at all), fall back to
4627
+ // a colored dot instead of failing to render — meta.availableIcons
4628
+ // always has a color at least.
4629
+ const iconsList = (_c = table.options.iconsList) !== null && _c !== void 0 ? _c : {};
4630
+ const renderStatus = (iconCode, color, forceWhite) => {
4631
+ var _a;
4632
+ const iconDef = iconsList[String(iconCode)];
4633
+ if (iconDef) {
4634
+ return (jsx(Iconify, { icon: iconDef.component, width: 20, color: forceWhite ? 'white' : ((_a = iconDef.defaultColor) !== null && _a !== void 0 ? _a : color) }));
4635
+ }
4636
+ return jsx(MRT_IconStatusDot, { color: forceWhite ? 'white' : color });
4637
+ };
4588
4638
  const handleClick = (event) => {
4589
4639
  if (column.onClickIconTypeColumn) {
4590
4640
  column.onClickIconTypeColumn({
@@ -4595,40 +4645,43 @@ const IconColumnResolver = {
4595
4645
  });
4596
4646
  }
4597
4647
  };
4648
+ const cursor = column.onClickIconTypeColumn ? 'pointer' : 'default';
4649
+ const { additional } = value;
4650
+ // Compound status — pill container (background/rounded/padded) colored by
4651
+ // the primary status, holding one glyph (or dot fallback) per status.
4598
4652
  if (additional) {
4599
4653
  return (jsxs(Box, { sx: {
4600
4654
  display: 'flex',
4601
4655
  gap: 0.5,
4602
4656
  alignItems: 'center',
4603
- backgroundColor: icon.defaultColor,
4657
+ backgroundColor: (theme) => resolveStatusColor(theme, value.color),
4604
4658
  borderRadius: 16,
4605
4659
  p: 0.5,
4606
- cursor: 'pointer',
4607
- }, onClick: handleClick, children: [jsx(Tooltip, { title: value.description, disableInteractive: true, children: jsx(Iconify, { icon: icon.icon, color: "white", width: 20, height: 20 }) }), Object.values(additional).map((add, index) => {
4608
- const additionalIcon = iconsList[add.iconCode];
4609
- if (!additionalIcon)
4610
- return null;
4611
- return (jsx(Tooltip, { title: add.description, disableInteractive: true, children: jsx(Iconify, { icon: additionalIcon.icon, color: "white" }) }, index));
4612
- })] }));
4660
+ cursor,
4661
+ }, onClick: handleClick, children: [jsx(Tooltip, { title: resolveTooltip(value.iconCode, value.description), disableInteractive: true, children: renderStatus(value.iconCode, value.color, true) }), Object.values(additional).map((add, index) => (jsx(Tooltip, { title: resolveTooltip(add.iconCode, add.description), disableInteractive: true, children: renderStatus(add.iconCode, add.color, true) }, index)))] }));
4613
4662
  }
4614
- return (jsx(Tooltip, { title: value.description, disableInteractive: true, children: jsx(IconButton, { size: "small", disableRipple: true, sx: { p: 0 }, children: jsx(Iconify, { icon: icon.icon, color: icon.defaultColor }) }) }));
4663
+ return (jsx(Tooltip, { title: resolveTooltip(value.iconCode, value.description), disableInteractive: true, children: jsx(IconButton, { disableRipple: true, onClick: handleClick, sx: { p: 0, cursor }, children: renderStatus(value.iconCode, value.color) }) }));
4615
4664
  } })),
4616
4665
  getFilterOperators: (column) => {
4617
- var _a, _b, _c;
4666
+ var _a, _b;
4618
4667
  // Available selectable icon options come from backend-provided column metadata
4619
4668
  const availableIcons = (_b = (_a = column.meta) === null || _a === void 0 ? void 0 : _a.availableIcons) !== null && _b !== void 0 ? _b : [];
4620
- // Safe cast for iconsList — this resolver is only registered for icon columns in registy.ts
4621
- const iconsList = (_c = column.iconsList) !== null && _c !== void 0 ? _c : {};
4622
4669
  // Without available options no meaningful filter can be built
4623
4670
  if (!availableIcons.length) {
4624
4671
  return [];
4625
4672
  }
4626
4673
  // Single-select editor factory — used by 'is' and 'not'
4627
- const createSingleSelectEditor = (props) => MRT_IconSingleValueEditor(Object.assign(Object.assign({}, props), { availableIcons,
4628
- iconsList }));
4674
+ const createSingleSelectEditor = (props) => {
4675
+ var _a;
4676
+ return MRT_IconSingleValueEditor(Object.assign(Object.assign({}, props), { availableIcons,
4677
+ // Table-wide iconCode -> Iconify glyph map (table.options.iconsList)
4678
+ iconsList: (_a = props.table.options.iconsList) !== null && _a !== void 0 ? _a : {} }));
4679
+ };
4629
4680
  // Multi-select editor factory — used by 'inArray'
4630
- const createMultiSelectEditor = (props) => MRT_IconMultiValueEditor(Object.assign(Object.assign({}, props), { availableIcons,
4631
- iconsList }));
4681
+ const createMultiSelectEditor = (props) => {
4682
+ var _a;
4683
+ return MRT_IconMultiValueEditor(Object.assign(Object.assign({}, props), { availableIcons, iconsList: (_a = props.table.options.iconsList) !== null && _a !== void 0 ? _a : {} }));
4684
+ };
4632
4685
  return [
4633
4686
  {
4634
4687
  // 'Je' — selected iconCode must match the cell value exactly
@@ -4661,11 +4714,13 @@ const IconColumnResolver = {
4661
4714
  ];
4662
4715
  },
4663
4716
  activeFilterRenderer: IconActiveFilterItem,
4664
- getFormFieldRenderer: (column) => {
4665
- var _a;
4717
+ getFormFieldRenderer: (column, table) => {
4718
+ var _a, _b;
4666
4719
  // Cast TValue to string | null — icon fields store the selected iconCode string
4667
4720
  const fieldConfig = (_a = column.formField) !== null && _a !== void 0 ? _a : null;
4668
- return ({ name, columnDef }) => (jsx(MRT_FormIconInput, { columnDef: columnDef, fieldConfig: fieldConfig, name: name }));
4721
+ // Table-wide iconCode -> Iconify glyph map (table.options.iconsList)
4722
+ const iconsList = (_b = table.options.iconsList) !== null && _b !== void 0 ? _b : {};
4723
+ return ({ name, columnDef }) => (jsx(MRT_FormIconInput, { columnDef: columnDef, fieldConfig: fieldConfig, iconsList: iconsList, name: name }));
4669
4724
  },
4670
4725
  };
4671
4726
 
@@ -5624,7 +5679,12 @@ const Inner = ({ children }) => {
5624
5679
  const hasProvider = useHasSnackbarProvider();
5625
5680
  if (hasProvider)
5626
5681
  return jsx(Fragment, { children: children });
5627
- return (jsx(SnackbarProvider, { maxSnack: 5, anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, children: children }));
5682
+ return (jsx(SnackbarProvider, { maxSnack: 5, anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, children:
5683
+ // Cast needed because notistack's bundled types predate a @types/react
5684
+ // 19.2 change to ReactPortal's shape, which they haven't caught up to
5685
+ // yet — this is a types-only mismatch, not an actual runtime issue.
5686
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5687
+ children }));
5628
5688
  };
5629
5689
  // Wraps children with SnackbarProvider only when no provider exists in the tree.
5630
5690
  // When the user's app already has a SnackbarProvider, notifications from MRT