@xcelsior/ui-spreadsheets 1.1.14 → 1.1.15

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.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ ActiveFiltersDisplay: () => ActiveFiltersDisplay,
33
34
  RowContextMenu: () => RowContextMenu,
34
35
  Spreadsheet: () => Spreadsheet,
35
36
  SpreadsheetCell: () => MemoizedSpreadsheetCell,
@@ -193,7 +194,7 @@ var import_react4 = require("react");
193
194
  var import_react3 = require("react");
194
195
  var ROW_INDEX_COLUMN_ID = "__row_index__";
195
196
  var ROW_INDEX_COLUMN_WIDTH = 80;
196
- var MIN_PINNED_COLUMN_WIDTH = 100;
197
+ var MIN_PINNED_COLUMN_WIDTH = 150;
197
198
  function useSpreadsheetPinning({
198
199
  columns,
199
200
  columnGroups,
@@ -561,8 +562,14 @@ var SpreadsheetCell = ({
561
562
  // Pinned columns must have a fixed width so sticky offsets stay correct.
562
563
  // Enforce MIN_PINNED_COLUMN_WIDTH so header actions always fit.
563
564
  ...isPinned && {
564
- width: Math.max(column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH),
565
- maxWidth: Math.max(column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH)
565
+ width: Math.max(
566
+ column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH,
567
+ MIN_PINNED_COLUMN_WIDTH
568
+ ),
569
+ maxWidth: Math.max(
570
+ column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH,
571
+ MIN_PINNED_COLUMN_WIDTH
572
+ )
566
573
  },
567
574
  ...positionStyles,
568
575
  ...selectionBorderStyles
@@ -970,7 +977,198 @@ SpreadsheetFilterDropdown.displayName = "SpreadsheetFilterDropdown";
970
977
 
971
978
  // src/components/SpreadsheetToolbar.tsx
972
979
  var import_react6 = __toESM(require("react"));
980
+
981
+ // src/components/ActiveFiltersDisplay.tsx
973
982
  var import_jsx_runtime3 = require("react/jsx-runtime");
983
+ var TEXT_OPERATOR_LABELS = {
984
+ contains: "contains",
985
+ notContains: "does not contain",
986
+ equals: "equals",
987
+ notEquals: "does not equal",
988
+ startsWith: "starts with",
989
+ endsWith: "ends with",
990
+ isEmpty: "is empty",
991
+ isNotEmpty: "is not empty"
992
+ };
993
+ var NUMBER_OPERATOR_LABELS = {
994
+ equals: "=",
995
+ notEquals: "\u2260",
996
+ greaterThan: ">",
997
+ greaterThanOrEqual: "\u2265",
998
+ lessThan: "<",
999
+ lessThanOrEqual: "\u2264",
1000
+ between: "between",
1001
+ isEmpty: "is empty",
1002
+ isNotEmpty: "is not empty"
1003
+ };
1004
+ var DATE_OPERATOR_LABELS = {
1005
+ equals: "is",
1006
+ notEquals: "is not",
1007
+ before: "before",
1008
+ after: "after",
1009
+ between: "between",
1010
+ today: "is today",
1011
+ yesterday: "is yesterday",
1012
+ thisWeek: "is this week",
1013
+ lastWeek: "is last week",
1014
+ thisMonth: "is this month",
1015
+ lastMonth: "is last month",
1016
+ thisYear: "is this year",
1017
+ isEmpty: "is empty",
1018
+ isNotEmpty: "is not empty"
1019
+ };
1020
+ function formatFilter(filter, _column) {
1021
+ const parts = [];
1022
+ if (filter.textCondition) {
1023
+ const { operator, value } = filter.textCondition;
1024
+ const label = TEXT_OPERATOR_LABELS[operator];
1025
+ if (["isEmpty", "isNotEmpty"].includes(operator)) {
1026
+ parts.push(label);
1027
+ } else if (value) {
1028
+ parts.push(`${label} "${value}"`);
1029
+ }
1030
+ }
1031
+ if (filter.numberCondition) {
1032
+ const { operator, value, valueTo } = filter.numberCondition;
1033
+ const label = NUMBER_OPERATOR_LABELS[operator];
1034
+ if (["isEmpty", "isNotEmpty"].includes(operator)) {
1035
+ parts.push(label);
1036
+ } else if (operator === "between" && value !== void 0 && valueTo !== void 0) {
1037
+ parts.push(`${label} ${value} and ${valueTo}`);
1038
+ } else if (value !== void 0) {
1039
+ parts.push(`${label} ${value}`);
1040
+ }
1041
+ }
1042
+ if (filter.dateCondition) {
1043
+ const { operator, value, valueTo } = filter.dateCondition;
1044
+ const label = DATE_OPERATOR_LABELS[operator];
1045
+ const noValueOperators = [
1046
+ "isEmpty",
1047
+ "isNotEmpty",
1048
+ "today",
1049
+ "yesterday",
1050
+ "thisWeek",
1051
+ "lastWeek",
1052
+ "thisMonth",
1053
+ "lastMonth",
1054
+ "thisYear"
1055
+ ];
1056
+ if (noValueOperators.includes(operator)) {
1057
+ parts.push(label);
1058
+ } else if (operator === "between" && value && valueTo) {
1059
+ parts.push(`${label} ${formatDate(value)} and ${formatDate(valueTo)}`);
1060
+ } else if (value) {
1061
+ parts.push(`${label} ${formatDate(value)}`);
1062
+ }
1063
+ }
1064
+ if (filter.text) {
1065
+ parts.push(`contains "${filter.text}"`);
1066
+ }
1067
+ if (filter.selectedValues && filter.selectedValues.length > 0) {
1068
+ if (filter.selectedValues.length === 1) {
1069
+ parts.push(`is "${filter.selectedValues[0]}"`);
1070
+ } else {
1071
+ parts.push(`is one of ${filter.selectedValues.length} values`);
1072
+ }
1073
+ }
1074
+ if (filter.min !== void 0 && filter.max !== void 0) {
1075
+ parts.push(`between ${filter.min} and ${filter.max}`);
1076
+ } else if (filter.min !== void 0) {
1077
+ parts.push(`\u2265 ${filter.min}`);
1078
+ } else if (filter.max !== void 0) {
1079
+ parts.push(`\u2264 ${filter.max}`);
1080
+ }
1081
+ if (filter.includeBlanks) {
1082
+ parts.push("includes blanks");
1083
+ }
1084
+ if (filter.excludeBlanks) {
1085
+ parts.push("excludes blanks");
1086
+ }
1087
+ return parts.join(", ") || "filtered";
1088
+ }
1089
+ function formatDate(dateStr) {
1090
+ try {
1091
+ const date = new Date(dateStr);
1092
+ return date.toLocaleDateString("en-US", {
1093
+ month: "short",
1094
+ day: "numeric",
1095
+ year: "numeric"
1096
+ });
1097
+ } catch {
1098
+ return dateStr;
1099
+ }
1100
+ }
1101
+ var ActiveFiltersDisplay = ({
1102
+ filters,
1103
+ columns,
1104
+ onClearFilter,
1105
+ onClearAllFilters,
1106
+ className
1107
+ }) => {
1108
+ const activeFilters = Object.entries(filters).filter(([_, filter]) => {
1109
+ return filter.textCondition || filter.numberCondition || filter.dateCondition || filter.text || filter.selectedValues && filter.selectedValues.length > 0 || filter.min !== void 0 || filter.max !== void 0 || filter.includeBlanks || filter.excludeBlanks;
1110
+ });
1111
+ if (activeFilters.length === 0) {
1112
+ return null;
1113
+ }
1114
+ const getColumnLabel = (columnId) => {
1115
+ const column = columns.find((c) => c.id === columnId);
1116
+ return column?.label || columnId;
1117
+ };
1118
+ const getColumn = (columnId) => {
1119
+ return columns.find((c) => c.id === columnId);
1120
+ };
1121
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1122
+ "div",
1123
+ {
1124
+ className: cn(
1125
+ "flex flex-wrap items-center gap-2 px-4 py-2 bg-amber-50 border-b border-amber-200",
1126
+ className
1127
+ ),
1128
+ children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-medium text-amber-700 mr-1", children: "Active filters:" }),
1130
+ activeFilters.map(([columnId, filter]) => {
1131
+ const column = getColumn(columnId);
1132
+ const filterDescription = column ? formatFilter(filter, column) : formatFilter(filter, { id: columnId, label: columnId });
1133
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1134
+ "div",
1135
+ {
1136
+ className: "inline-flex items-center gap-1.5 px-2.5 py-1 bg-white border border-amber-300 rounded-full shadow-sm",
1137
+ children: [
1138
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-medium text-gray-700", children: getColumnLabel(columnId) }),
1139
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs text-gray-500", children: filterDescription }),
1140
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1141
+ "button",
1142
+ {
1143
+ type: "button",
1144
+ onClick: () => onClearFilter(columnId),
1145
+ className: "p-0.5 hover:bg-amber-100 rounded-full transition-colors",
1146
+ title: `Clear filter for ${getColumnLabel(columnId)}`,
1147
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiX, { className: "h-3 w-3 text-amber-600 hover:text-amber-800" })
1148
+ }
1149
+ )
1150
+ ]
1151
+ },
1152
+ columnId
1153
+ );
1154
+ }),
1155
+ activeFilters.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1156
+ "button",
1157
+ {
1158
+ type: "button",
1159
+ onClick: onClearAllFilters,
1160
+ className: "text-xs text-amber-700 hover:text-amber-900 underline ml-2 transition-colors",
1161
+ children: "Clear all"
1162
+ }
1163
+ )
1164
+ ]
1165
+ }
1166
+ );
1167
+ };
1168
+ ActiveFiltersDisplay.displayName = "ActiveFiltersDisplay";
1169
+
1170
+ // src/components/SpreadsheetToolbar.tsx
1171
+ var import_jsx_runtime4 = require("react/jsx-runtime");
974
1172
  var SpreadsheetToolbar = ({
975
1173
  zoom,
976
1174
  canUndo,
@@ -994,6 +1192,11 @@ var SpreadsheetToolbar = ({
994
1192
  onShowShortcuts,
995
1193
  hasActiveFilters,
996
1194
  onClearFilters,
1195
+ filters,
1196
+ columns,
1197
+ onClearFilter,
1198
+ showFiltersPanel,
1199
+ onToggleFiltersPanel,
997
1200
  className
998
1201
  }) => {
999
1202
  const [showMoreMenu, setShowMoreMenu] = import_react6.default.useState(false);
@@ -1047,231 +1250,253 @@ var SpreadsheetToolbar = ({
1047
1250
  return "bg-blue-50 border-blue-200 text-blue-700";
1048
1251
  }
1049
1252
  };
1050
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1051
- "div",
1052
- {
1053
- className: cn(
1054
- "flex flex-wrap items-center justify-between gap-2 px-4 py-2 border-b border-gray-200 bg-white",
1055
- className
1056
- ),
1057
- children: [
1058
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2", children: [
1059
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1", children: [
1060
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1253
+ const activeFilterCount = filters ? Object.values(filters).filter(
1254
+ (f) => f.textCondition || f.numberCondition || f.dateCondition || f.text || f.selectedValues && f.selectedValues.length > 0 || f.min !== void 0 || f.max !== void 0 || f.includeBlanks || f.excludeBlanks
1255
+ ).length : 0;
1256
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col", children: [
1257
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1258
+ "div",
1259
+ {
1260
+ className: cn(
1261
+ "flex flex-wrap items-center justify-between gap-2 px-4 py-2 border-b border-gray-200 bg-white",
1262
+ className
1263
+ ),
1264
+ children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
1266
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1", children: [
1267
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1268
+ "button",
1269
+ {
1270
+ type: "button",
1271
+ onClick: onUndo,
1272
+ disabled: !canUndo,
1273
+ className: cn(
1274
+ buttonBaseClasses,
1275
+ canUndo ? "bg-gray-100 text-gray-700 hover:bg-gray-200" : "bg-gray-50 text-gray-400"
1276
+ ),
1277
+ title: `Undo (${undoCount} changes)`,
1278
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiReply, { className: "h-4 w-4" })
1279
+ }
1280
+ ),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1282
+ "button",
1283
+ {
1284
+ type: "button",
1285
+ onClick: onRedo,
1286
+ disabled: !canRedo,
1287
+ className: cn(
1288
+ buttonBaseClasses,
1289
+ canRedo ? "bg-gray-100 text-gray-700 hover:bg-gray-200" : "bg-gray-50 text-gray-400"
1290
+ ),
1291
+ title: `Redo (${redoCount} changes)`,
1292
+ style: { transform: "scaleX(-1)" },
1293
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiReply, { className: "h-4 w-4" })
1294
+ }
1295
+ )
1296
+ ] }),
1297
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1 px-1.5 py-1 bg-gray-100 rounded", children: [
1298
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1299
+ "button",
1300
+ {
1301
+ type: "button",
1302
+ onClick: onZoomOut,
1303
+ className: "p-1 hover:bg-white rounded",
1304
+ title: "Zoom out",
1305
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiZoomOut, { className: "h-4 w-4 text-gray-600" })
1306
+ }
1307
+ ),
1308
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1309
+ "button",
1310
+ {
1311
+ type: "button",
1312
+ onClick: onZoomReset,
1313
+ className: "px-2 py-0.5 hover:bg-white rounded text-xs min-w-[45px] text-center text-gray-600",
1314
+ title: "Reset zoom",
1315
+ children: [
1316
+ zoom,
1317
+ "%"
1318
+ ]
1319
+ }
1320
+ ),
1321
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1322
+ "button",
1323
+ {
1324
+ type: "button",
1325
+ onClick: onZoomIn,
1326
+ className: "p-1 hover:bg-white rounded",
1327
+ title: "Zoom in",
1328
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiZoomIn, { className: "h-4 w-4 text-gray-600" })
1329
+ }
1330
+ )
1331
+ ] })
1332
+ ] }),
1333
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
1334
+ selectedRowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2 px-2.5 py-1.5 bg-blue-600 text-white rounded", children: [
1335
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "text-xs font-medium whitespace-nowrap", children: [
1336
+ selectedRowCount,
1337
+ " row",
1338
+ selectedRowCount !== 1 ? "s" : "",
1339
+ " selected"
1340
+ ] }),
1341
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1342
+ "button",
1343
+ {
1344
+ type: "button",
1345
+ onClick: onClearSelection,
1346
+ className: "p-0.5 hover:bg-blue-700 rounded",
1347
+ title: "Clear selection",
1348
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiX, { className: "h-3 w-3" })
1349
+ }
1350
+ )
1351
+ ] }),
1352
+ hasActiveFilters && onToggleFiltersPanel && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1061
1353
  "button",
1062
1354
  {
1063
1355
  type: "button",
1064
- onClick: onUndo,
1065
- disabled: !canUndo,
1356
+ onClick: onToggleFiltersPanel,
1066
1357
  className: cn(
1067
- buttonBaseClasses,
1068
- canUndo ? "bg-gray-100 text-gray-700 hover:bg-gray-200" : "bg-gray-50 text-gray-400"
1358
+ "flex items-center gap-2 px-2.5 py-1.5 rounded transition-colors",
1359
+ showFiltersPanel ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-amber-500 text-white hover:bg-amber-600"
1069
1360
  ),
1070
- title: `Undo (${undoCount} changes)`,
1071
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiReply, { className: "h-4 w-4" })
1361
+ title: showFiltersPanel ? "Hide active filters" : "Show active filters",
1362
+ children: [
1363
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiFilter, { className: "h-3.5 w-3.5" }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "text-xs font-medium whitespace-nowrap", children: [
1365
+ activeFilterCount,
1366
+ " filter",
1367
+ activeFilterCount !== 1 ? "s" : "",
1368
+ " active"
1369
+ ] }),
1370
+ showFiltersPanel ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiChevronUp, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiChevronDown, { className: "h-3 w-3" })
1371
+ ]
1072
1372
  }
1073
1373
  ),
1074
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1075
- "button",
1374
+ summary && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1375
+ "div",
1076
1376
  {
1077
- type: "button",
1078
- onClick: onRedo,
1079
- disabled: !canRedo,
1080
1377
  className: cn(
1081
- buttonBaseClasses,
1082
- canRedo ? "bg-gray-100 text-gray-700 hover:bg-gray-200" : "bg-gray-50 text-gray-400"
1378
+ "flex items-center gap-2 px-2.5 py-1.5 rounded border text-xs",
1379
+ getSummaryVariantClasses(summary.variant)
1083
1380
  ),
1084
- title: `Redo (${redoCount} changes)`,
1085
- style: { transform: "scaleX(-1)" },
1086
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiReply, { className: "h-4 w-4" })
1087
- }
1088
- )
1089
- ] }),
1090
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1 px-1.5 py-1 bg-gray-100 rounded", children: [
1091
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1092
- "button",
1093
- {
1094
- type: "button",
1095
- onClick: onZoomOut,
1096
- className: "p-1 hover:bg-white rounded",
1097
- title: "Zoom out",
1098
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiZoomOut, { className: "h-4 w-4 text-gray-600" })
1099
- }
1100
- ),
1101
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1102
- "button",
1103
- {
1104
- type: "button",
1105
- onClick: onZoomReset,
1106
- className: "px-2 py-0.5 hover:bg-white rounded text-xs min-w-[45px] text-center text-gray-600",
1107
- title: "Reset zoom",
1108
1381
  children: [
1109
- zoom,
1110
- "%"
1382
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "font-semibold whitespace-nowrap", children: [
1383
+ summary.label,
1384
+ ":"
1385
+ ] }),
1386
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-bold whitespace-nowrap", children: summary.value })
1111
1387
  ]
1112
1388
  }
1113
- ),
1114
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1115
- "button",
1116
- {
1117
- type: "button",
1118
- onClick: onZoomIn,
1119
- className: "p-1 hover:bg-white rounded",
1120
- title: "Zoom in",
1121
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiZoomIn, { className: "h-4 w-4 text-gray-600" })
1122
- }
1123
- )
1124
- ] })
1125
- ] }),
1126
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
1127
- selectedRowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 px-2.5 py-1.5 bg-blue-600 text-white rounded", children: [
1128
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "text-xs font-medium whitespace-nowrap", children: [
1129
- selectedRowCount,
1130
- " row",
1131
- selectedRowCount !== 1 ? "s" : "",
1132
- " selected"
1133
- ] }),
1134
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1135
- "button",
1136
- {
1137
- type: "button",
1138
- onClick: onClearSelection,
1139
- className: "p-0.5 hover:bg-blue-700 rounded",
1140
- title: "Clear selection",
1141
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiX, { className: "h-3 w-3" })
1142
- }
1143
1389
  )
1144
1390
  ] }),
1145
- hasActiveFilters && onClearFilters && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 px-2.5 py-1.5 bg-amber-500 text-white rounded", children: [
1146
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiFilter, { className: "h-3.5 w-3.5" }),
1147
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-medium whitespace-nowrap", children: "Filters active" }),
1148
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1149
- "button",
1391
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
1392
+ saveStatusDisplay && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1393
+ "span",
1150
1394
  {
1151
- type: "button",
1152
- onClick: onClearFilters,
1153
- className: "p-0.5 hover:bg-amber-600 rounded",
1154
- title: "Clear all filters",
1155
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiX, { className: "h-3 w-3" })
1395
+ className: cn(
1396
+ "text-xs flex items-center gap-1",
1397
+ saveStatusDisplay.className
1398
+ ),
1399
+ children: saveStatusDisplay.text
1156
1400
  }
1157
- )
1158
- ] }),
1159
- summary && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1160
- "div",
1161
- {
1162
- className: cn(
1163
- "flex items-center gap-2 px-2.5 py-1.5 rounded border text-xs",
1164
- getSummaryVariantClasses(summary.variant)
1165
- ),
1166
- children: [
1167
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "font-semibold whitespace-nowrap", children: [
1168
- summary.label,
1169
- ":"
1170
- ] }),
1171
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "font-bold whitespace-nowrap", children: summary.value })
1172
- ]
1173
- }
1174
- )
1175
- ] }),
1176
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2", children: [
1177
- saveStatusDisplay && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1178
- "span",
1179
- {
1180
- className: cn(
1181
- "text-xs flex items-center gap-1",
1182
- saveStatusDisplay.className
1183
- ),
1184
- children: saveStatusDisplay.text
1185
- }
1186
- ),
1187
- !autoSave && onSave && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1188
- "button",
1189
- {
1190
- type: "button",
1191
- onClick: onSave,
1192
- disabled: !hasUnsavedChanges,
1193
- className: cn(
1194
- "px-3 py-1.5 text-xs bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors flex items-center gap-1.5",
1195
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-blue-600"
1196
- ),
1197
- children: [
1198
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiCheck, { className: "h-3.5 w-3.5" }),
1199
- "Save"
1200
- ]
1201
- }
1202
- ),
1203
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative", ref: menuRef, children: [
1204
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1401
+ ),
1402
+ !autoSave && onSave && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1205
1403
  "button",
1206
1404
  {
1207
1405
  type: "button",
1208
- onClick: () => setShowMoreMenu(!showMoreMenu),
1209
- className: "px-2.5 py-1.5 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors flex items-center gap-1.5 text-xs",
1210
- title: "More actions",
1406
+ onClick: onSave,
1407
+ disabled: !hasUnsavedChanges,
1408
+ className: cn(
1409
+ "px-3 py-1.5 text-xs bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors flex items-center gap-1.5",
1410
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-blue-600"
1411
+ ),
1211
1412
  children: [
1212
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiDotsVertical, { className: "h-3.5 w-3.5" }),
1213
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "hidden lg:inline", children: "More" })
1413
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiCheck, { className: "h-3.5 w-3.5" }),
1414
+ "Save"
1214
1415
  ]
1215
1416
  }
1216
1417
  ),
1217
- showMoreMenu && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "absolute right-0 top-full mt-1 bg-white border border-gray-200 shadow-lg rounded py-1 min-w-[180px] z-20", children: [
1218
- onSettings && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1219
- "button",
1220
- {
1221
- type: "button",
1222
- onClick: () => {
1223
- onSettings();
1224
- setShowMoreMenu(false);
1225
- },
1226
- className: "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1227
- children: [
1228
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiCog, { className: "h-3.5 w-3.5 text-gray-500" }),
1229
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-gray-700", children: "Settings" })
1230
- ]
1231
- }
1232
- ),
1233
- onShowShortcuts && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1418
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative", ref: menuRef, children: [
1419
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1234
1420
  "button",
1235
1421
  {
1236
1422
  type: "button",
1237
- onClick: () => {
1238
- onShowShortcuts();
1239
- setShowMoreMenu(false);
1240
- },
1241
- className: "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1423
+ onClick: () => setShowMoreMenu(!showMoreMenu),
1424
+ className: "px-2.5 py-1.5 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors flex items-center gap-1.5 text-xs",
1425
+ title: "More actions",
1242
1426
  children: [
1243
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HiOutlineQuestionMarkCircle, { className: "h-3.5 w-3.5 text-gray-500" }),
1244
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-gray-700", children: "Keyboard Shortcuts" })
1427
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiDotsVertical, { className: "h-3.5 w-3.5" }),
1428
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "hidden lg:inline", children: "More" })
1245
1429
  ]
1246
1430
  }
1247
1431
  ),
1248
- menuItems && menuItems.length > 0 && (onSettings || onShowShortcuts) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "border-t border-gray-100 my-1" }),
1249
- menuItems?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1250
- "button",
1251
- {
1252
- type: "button",
1253
- disabled: item.disabled,
1254
- onClick: () => {
1255
- item.onClick();
1256
- setShowMoreMenu(false);
1432
+ showMoreMenu && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "absolute right-0 top-full mt-1 bg-white border border-gray-200 shadow-lg rounded py-1 min-w-[180px] z-20", children: [
1433
+ onSettings && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1434
+ "button",
1435
+ {
1436
+ type: "button",
1437
+ onClick: () => {
1438
+ onSettings();
1439
+ setShowMoreMenu(false);
1440
+ },
1441
+ className: "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1442
+ children: [
1443
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiCog, { className: "h-3.5 w-3.5 text-gray-500" }),
1444
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-gray-700", children: "Settings" })
1445
+ ]
1446
+ }
1447
+ ),
1448
+ onShowShortcuts && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1449
+ "button",
1450
+ {
1451
+ type: "button",
1452
+ onClick: () => {
1453
+ onShowShortcuts();
1454
+ setShowMoreMenu(false);
1455
+ },
1456
+ className: "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1457
+ children: [
1458
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiOutlineQuestionMarkCircle, { className: "h-3.5 w-3.5 text-gray-500" }),
1459
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-gray-700", children: "Keyboard Shortcuts" })
1460
+ ]
1461
+ }
1462
+ ),
1463
+ menuItems && menuItems.length > 0 && (onSettings || onShowShortcuts) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t border-gray-100 my-1" }),
1464
+ menuItems?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1465
+ "button",
1466
+ {
1467
+ type: "button",
1468
+ disabled: item.disabled,
1469
+ onClick: () => {
1470
+ item.onClick();
1471
+ setShowMoreMenu(false);
1472
+ },
1473
+ className: cn(
1474
+ "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1475
+ item.disabled && "opacity-50 cursor-not-allowed"
1476
+ ),
1477
+ children: [
1478
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "h-3.5 w-3.5 text-gray-500 flex items-center justify-center", children: item.icon }),
1479
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-gray-700", children: item.label })
1480
+ ]
1257
1481
  },
1258
- className: cn(
1259
- "w-full px-3 py-2 text-left hover:bg-gray-50 flex items-center gap-2 text-xs transition-colors",
1260
- item.disabled && "opacity-50 cursor-not-allowed"
1261
- ),
1262
- children: [
1263
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "h-3.5 w-3.5 text-gray-500 flex items-center justify-center", children: item.icon }),
1264
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-gray-700", children: item.label })
1265
- ]
1266
- },
1267
- item.id
1268
- ))
1482
+ item.id
1483
+ ))
1484
+ ] })
1269
1485
  ] })
1270
1486
  ] })
1271
- ] })
1272
- ]
1273
- }
1274
- );
1487
+ ]
1488
+ }
1489
+ ),
1490
+ showFiltersPanel && filters && columns && onClearFilter && onClearFilters && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1491
+ ActiveFiltersDisplay,
1492
+ {
1493
+ filters,
1494
+ columns,
1495
+ onClearFilter,
1496
+ onClearAllFilters: onClearFilters
1497
+ }
1498
+ )
1499
+ ] });
1275
1500
  };
1276
1501
  SpreadsheetToolbar.displayName = "SpreadsheetToolbar";
1277
1502
 
@@ -1284,7 +1509,7 @@ function MdOutlinePushPin(props) {
1284
1509
  }
1285
1510
 
1286
1511
  // src/components/ColumnHeaderActions.tsx
1287
- var import_jsx_runtime4 = require("react/jsx-runtime");
1512
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1288
1513
  function ColumnHeaderActions({
1289
1514
  enableFiltering = false,
1290
1515
  enableHighlighting = false,
@@ -1301,8 +1526,8 @@ function ColumnHeaderActions({
1301
1526
  unpinnedTitle = "Pin column",
1302
1527
  className
1303
1528
  }) {
1304
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: cn("flex items-center gap-0.5", className), children: [
1305
- enableFiltering && onFilterClick && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1529
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("flex items-center gap-0.5", className), children: [
1530
+ enableFiltering && onFilterClick && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1306
1531
  "button",
1307
1532
  {
1308
1533
  type: "button",
@@ -1315,10 +1540,10 @@ function ColumnHeaderActions({
1315
1540
  hasActiveFilter ? "text-blue-600 opacity-100" : "text-gray-400 opacity-0 group-hover:opacity-100"
1316
1541
  ),
1317
1542
  title: filterTitle,
1318
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HiFilter, { className: "h-3 w-3" })
1543
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HiFilter, { className: "h-3 w-3" })
1319
1544
  }
1320
1545
  ),
1321
- enableHighlighting && onHighlightClick && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1546
+ enableHighlighting && onHighlightClick && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1322
1547
  "button",
1323
1548
  {
1324
1549
  type: "button",
@@ -1331,10 +1556,10 @@ function ColumnHeaderActions({
1331
1556
  hasActiveHighlight ? "text-amber-500 opacity-100" : "text-gray-400 opacity-0 group-hover:opacity-100"
1332
1557
  ),
1333
1558
  title: highlightTitle,
1334
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AiFillHighlight, { className: "h-3 w-3" })
1559
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AiFillHighlight, { className: "h-3 w-3" })
1335
1560
  }
1336
1561
  ),
1337
- enablePinning && onPinClick && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1562
+ enablePinning && onPinClick && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1338
1563
  "button",
1339
1564
  {
1340
1565
  type: "button",
@@ -1347,7 +1572,7 @@ function ColumnHeaderActions({
1347
1572
  isPinned ? "text-blue-600 opacity-100" : "text-gray-400 opacity-0 group-hover:opacity-100"
1348
1573
  ),
1349
1574
  title: isPinned ? pinnedTitle : unpinnedTitle,
1350
- children: isPinned ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MdPushPin, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MdOutlinePushPin, { className: "h-3 w-3" })
1575
+ children: isPinned ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MdPushPin, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MdOutlinePushPin, { className: "h-3 w-3" })
1351
1576
  }
1352
1577
  )
1353
1578
  ] });
@@ -1355,7 +1580,7 @@ function ColumnHeaderActions({
1355
1580
  ColumnHeaderActions.displayName = "ColumnHeaderActions";
1356
1581
 
1357
1582
  // src/components/SpreadsheetHeader.tsx
1358
- var import_jsx_runtime5 = require("react/jsx-runtime");
1583
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1359
1584
  var cellPaddingCompact2 = "px-1 py-0.5";
1360
1585
  var cellPaddingNormal2 = "px-2 py-1.5";
1361
1586
  var SpreadsheetHeader = ({
@@ -1387,7 +1612,7 @@ var SpreadsheetHeader = ({
1387
1612
  positionStyles.right = `${rightOffset}px`;
1388
1613
  }
1389
1614
  }
1390
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1615
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1391
1616
  "th",
1392
1617
  {
1393
1618
  onClick: column.sortable ? onClick : void 0,
@@ -1408,20 +1633,26 @@ var SpreadsheetHeader = ({
1408
1633
  // Pinned columns must have a fixed width so sticky offsets stay correct.
1409
1634
  // Enforce MIN_PINNED_COLUMN_WIDTH so header actions (pin/filter/highlight) always fit.
1410
1635
  ...isPinned && {
1411
- width: Math.max(column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH),
1412
- maxWidth: Math.max(column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH)
1636
+ width: Math.max(
1637
+ column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH,
1638
+ MIN_PINNED_COLUMN_WIDTH
1639
+ ),
1640
+ maxWidth: Math.max(
1641
+ column.minWidth || column.width || MIN_PINNED_COLUMN_WIDTH,
1642
+ MIN_PINNED_COLUMN_WIDTH
1643
+ )
1413
1644
  },
1414
1645
  top: 0,
1415
1646
  // For sticky header
1416
1647
  ...positionStyles
1417
1648
  },
1418
1649
  children: [
1419
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-between gap-1", children: [
1420
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex-1 flex items-center gap-1", children: [
1650
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between gap-1", children: [
1651
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex-1 flex items-center gap-1", children: [
1421
1652
  column.label,
1422
- isSorted && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-blue-600", children: sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HiChevronUp, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HiChevronDown, { className: "h-3 w-3" }) })
1653
+ isSorted && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-blue-600", children: sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HiChevronUp, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HiChevronDown, { className: "h-3 w-3" }) })
1423
1654
  ] }),
1424
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1655
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1425
1656
  ColumnHeaderActions,
1426
1657
  {
1427
1658
  enableFiltering: column.filterable,
@@ -1444,7 +1675,7 @@ var SpreadsheetHeader = ({
1444
1675
  SpreadsheetHeader.displayName = "SpreadsheetHeader";
1445
1676
 
1446
1677
  // src/components/RowIndexColumnHeader.tsx
1447
- var import_jsx_runtime6 = require("react/jsx-runtime");
1678
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1448
1679
  var cellPaddingCompact3 = "px-1 py-0.5";
1449
1680
  var cellPaddingNormal3 = "px-2 py-1.5";
1450
1681
  function RowIndexColumnHeader({
@@ -1458,7 +1689,7 @@ function RowIndexColumnHeader({
1458
1689
  className
1459
1690
  }) {
1460
1691
  const cellPadding = compactMode ? cellPaddingCompact3 : cellPaddingNormal3;
1461
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1692
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1462
1693
  "th",
1463
1694
  {
1464
1695
  className: cn(
@@ -1477,9 +1708,9 @@ function RowIndexColumnHeader({
1477
1708
  left: isPinned ? 0 : void 0,
1478
1709
  backgroundColor: highlightColor || "rgb(243 244 246)"
1479
1710
  },
1480
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
1481
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "#" }),
1482
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1711
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
1712
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "#" }),
1713
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1483
1714
  ColumnHeaderActions,
1484
1715
  {
1485
1716
  enableHighlighting,
@@ -1682,7 +1913,7 @@ function useSpreadsheetHighlighting({
1682
1913
  }
1683
1914
 
1684
1915
  // src/components/ColorPickerPopover.tsx
1685
- var import_jsx_runtime7 = require("react/jsx-runtime");
1916
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1686
1917
  function ColorPickerPopover({
1687
1918
  title,
1688
1919
  paletteType = "column",
@@ -1692,9 +1923,9 @@ function ColorPickerPopover({
1692
1923
  className
1693
1924
  }) {
1694
1925
  const colorPalette = colors ?? [...HIGHLIGHT_COLORS[paletteType], null];
1695
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("bg-white rounded-lg shadow-xl p-4 w-64", className), children: [
1696
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-sm font-semibold mb-3", children: title }),
1697
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "grid grid-cols-5 gap-2", children: colorPalette.map((color) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1926
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("bg-white rounded-lg shadow-xl p-4 w-64", className), children: [
1927
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "text-sm font-semibold mb-3", children: title }),
1928
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-5 gap-2", children: colorPalette.map((color) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1698
1929
  "button",
1699
1930
  {
1700
1931
  type: "button",
@@ -1709,7 +1940,7 @@ function ColorPickerPopover({
1709
1940
  },
1710
1941
  color || "clear"
1711
1942
  )) }),
1712
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1943
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1713
1944
  "button",
1714
1945
  {
1715
1946
  type: "button",
@@ -1724,7 +1955,7 @@ ColorPickerPopover.displayName = "ColorPickerPopover";
1724
1955
 
1725
1956
  // src/components/SpreadsheetSettingsModal.tsx
1726
1957
  var import_react8 = require("react");
1727
- var import_jsx_runtime8 = require("react/jsx-runtime");
1958
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1728
1959
  var DEFAULT_SETTINGS = {
1729
1960
  defaultPinnedColumns: [],
1730
1961
  defaultSort: null,
@@ -1799,7 +2030,7 @@ var SpreadsheetSettingsModal = ({
1799
2030
  { id: "sorting", label: "Default Sorting", Icon: HiSortAscending },
1800
2031
  { id: "display", label: "Display Options", Icon: HiEye }
1801
2032
  ];
1802
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2033
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1803
2034
  "div",
1804
2035
  {
1805
2036
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
@@ -1807,7 +2038,7 @@ var SpreadsheetSettingsModal = ({
1807
2038
  "aria-modal": "true",
1808
2039
  "aria-labelledby": "settings-modal-title",
1809
2040
  children: [
1810
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2041
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1811
2042
  "button",
1812
2043
  {
1813
2044
  type: "button",
@@ -1817,55 +2048,55 @@ var SpreadsheetSettingsModal = ({
1817
2048
  "aria-label": "Close settings"
1818
2049
  }
1819
2050
  ),
1820
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-white rounded-lg w-[90%] max-w-[700px] max-h-[90vh] flex flex-col shadow-xl relative z-10", children: [
1821
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "px-6 py-5 border-b border-gray-200 flex items-center justify-between", children: [
1822
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
1823
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HiCog, { className: "h-6 w-6 text-blue-600" }),
1824
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { id: "settings-modal-title", className: "text-xl font-bold text-gray-900", children: title })
2051
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white rounded-lg w-[90%] max-w-[700px] max-h-[90vh] flex flex-col shadow-xl relative z-10", children: [
2052
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "px-6 py-5 border-b border-gray-200 flex items-center justify-between", children: [
2053
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
2054
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HiCog, { className: "h-6 w-6 text-blue-600" }),
2055
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { id: "settings-modal-title", className: "text-xl font-bold text-gray-900", children: title })
1825
2056
  ] }),
1826
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2057
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1827
2058
  "button",
1828
2059
  {
1829
2060
  type: "button",
1830
2061
  onClick: onClose,
1831
2062
  className: "p-2 hover:bg-gray-100 rounded-lg transition-colors text-gray-500 hover:text-gray-700",
1832
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HiX, { className: "h-5 w-5" })
2063
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HiX, { className: "h-5 w-5" })
1833
2064
  }
1834
2065
  )
1835
2066
  ] }),
1836
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex border-b border-gray-200 px-6", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2067
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex border-b border-gray-200 px-6", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1837
2068
  "button",
1838
2069
  {
1839
2070
  type: "button",
1840
2071
  onClick: () => setActiveTab(tab.id),
1841
2072
  className: `px-4 py-3 flex items-center gap-2 text-sm font-medium transition-colors border-b-2 ${activeTab === tab.id ? "text-blue-600 border-blue-600" : "text-gray-500 border-transparent hover:text-gray-700"}`,
1842
2073
  children: [
1843
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(tab.Icon, { className: "h-4 w-4" }),
2074
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(tab.Icon, { className: "h-4 w-4" }),
1844
2075
  tab.label
1845
2076
  ]
1846
2077
  },
1847
2078
  tab.id
1848
2079
  )) }),
1849
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1 overflow-auto p-6", children: [
1850
- activeTab === "columns" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1851
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-4 bg-blue-50 border border-blue-200 rounded-lg mb-4 flex gap-3", children: [
1852
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HiViewBoards, { className: "h-4 w-4 text-blue-600 shrink-0 mt-0.5" }),
1853
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1854
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-semibold text-gray-900 mb-1", children: "About Pinned Columns" }),
1855
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-gray-600", children: "Pinned columns stay visible while you scroll horizontally through the table." })
2080
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 overflow-auto p-6", children: [
2081
+ activeTab === "columns" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2082
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "p-4 bg-blue-50 border border-blue-200 rounded-lg mb-4 flex gap-3", children: [
2083
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HiViewBoards, { className: "h-4 w-4 text-blue-600 shrink-0 mt-0.5" }),
2084
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2085
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-semibold text-gray-900 mb-1", children: "About Pinned Columns" }),
2086
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-600", children: "Pinned columns stay visible while you scroll horizontally through the table." })
1856
2087
  ] })
1857
2088
  ] }),
1858
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-gray-600 mb-4", children: "Select which columns should be pinned to the left by default." }),
1859
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2", children: [
1860
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2089
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-600 mb-4", children: "Select which columns should be pinned to the left by default." }),
2090
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2", children: [
2091
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1861
2092
  "button",
1862
2093
  {
1863
2094
  type: "button",
1864
2095
  onClick: () => togglePinnedColumn("__row_index__"),
1865
2096
  className: `flex items-center gap-2 p-3 rounded-lg border transition-colors text-left ${localSettings.defaultPinnedColumns.includes("__row_index__") ? "bg-blue-50 border-blue-300 text-blue-700" : "bg-gray-50 border-gray-200 text-gray-700 hover:border-blue-300"}`,
1866
2097
  children: [
1867
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HiViewBoards, { className: "h-4 w-4 shrink-0" }),
1868
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm flex-1 truncate", children: "# (Row Index)" })
2098
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HiViewBoards, { className: "h-4 w-4 shrink-0" }),
2099
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm flex-1 truncate", children: "# (Row Index)" })
1869
2100
  ]
1870
2101
  }
1871
2102
  ),
@@ -1873,15 +2104,15 @@ var SpreadsheetSettingsModal = ({
1873
2104
  const isPinned = localSettings.defaultPinnedColumns.includes(
1874
2105
  column.id
1875
2106
  );
1876
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2107
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1877
2108
  "button",
1878
2109
  {
1879
2110
  type: "button",
1880
2111
  onClick: () => togglePinnedColumn(column.id),
1881
2112
  className: `flex items-center gap-2 p-3 rounded-lg border transition-colors text-left ${isPinned ? "bg-blue-50 border-blue-300 text-blue-700" : "bg-gray-50 border-gray-200 text-gray-700 hover:border-blue-300"}`,
1882
2113
  children: [
1883
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HiViewBoards, { className: "h-4 w-4 shrink-0" }),
1884
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm flex-1 truncate", children: column.label })
2114
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HiViewBoards, { className: "h-4 w-4 shrink-0" }),
2115
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm flex-1 truncate", children: column.label })
1885
2116
  ]
1886
2117
  },
1887
2118
  column.id
@@ -1889,12 +2120,12 @@ var SpreadsheetSettingsModal = ({
1889
2120
  })
1890
2121
  ] })
1891
2122
  ] }),
1892
- activeTab === "sorting" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1893
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-gray-600 mb-4", children: "Set the default column sorting when opening the spreadsheet." }),
1894
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-4", children: [
1895
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1896
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Sort Column" }),
1897
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2123
+ activeTab === "sorting" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2124
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-600 mb-4", children: "Set the default column sorting when opening the spreadsheet." }),
2125
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-4", children: [
2126
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2127
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Sort Column" }),
2128
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1898
2129
  "select",
1899
2130
  {
1900
2131
  value: localSettings.defaultSort?.columnId || "",
@@ -1904,15 +2135,15 @@ var SpreadsheetSettingsModal = ({
1904
2135
  ),
1905
2136
  className: "w-full p-3 text-sm bg-white border border-gray-300 rounded-lg text-gray-900 cursor-pointer focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
1906
2137
  children: [
1907
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "No default sorting" }),
1908
- columns.filter((col) => col.sortable !== false).map((column) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: column.id, children: column.label }, column.id))
2138
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "No default sorting" }),
2139
+ columns.filter((col) => col.sortable !== false).map((column) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: column.id, children: column.label }, column.id))
1909
2140
  ]
1910
2141
  }
1911
2142
  )
1912
2143
  ] }),
1913
- localSettings.defaultSort && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1914
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Sort Direction" }),
1915
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2144
+ localSettings.defaultSort && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2145
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Sort Direction" }),
2146
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1916
2147
  "select",
1917
2148
  {
1918
2149
  value: localSettings.defaultSort.direction,
@@ -1922,19 +2153,19 @@ var SpreadsheetSettingsModal = ({
1922
2153
  ),
1923
2154
  className: "w-full p-3 text-sm bg-white border border-gray-300 rounded-lg text-gray-900 cursor-pointer focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
1924
2155
  children: [
1925
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "asc", children: "Ascending (A \u2192 Z, 0 \u2192 9)" }),
1926
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "desc", children: "Descending (Z \u2192 A, 9 \u2192 0)" })
2156
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "asc", children: "Ascending (A \u2192 Z, 0 \u2192 9)" }),
2157
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "desc", children: "Descending (Z \u2192 A, 9 \u2192 0)" })
1927
2158
  ]
1928
2159
  }
1929
2160
  )
1930
2161
  ] })
1931
2162
  ] })
1932
2163
  ] }),
1933
- activeTab === "display" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-5", children: [
1934
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-gray-600", children: "Customize the display and behavior of the spreadsheet." }),
1935
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1936
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Default Page Size" }),
1937
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2164
+ activeTab === "display" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-5", children: [
2165
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-600", children: "Customize the display and behavior of the spreadsheet." }),
2166
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2167
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: "Default Page Size" }),
2168
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1938
2169
  "select",
1939
2170
  {
1940
2171
  value: localSettings.defaultPageSize,
@@ -1943,20 +2174,20 @@ var SpreadsheetSettingsModal = ({
1943
2174
  defaultPageSize: parseInt(e.target.value, 10)
1944
2175
  }),
1945
2176
  className: "w-full p-3 text-sm bg-white border border-gray-300 rounded-lg text-gray-900 cursor-pointer focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
1946
- children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("option", { value: size, children: [
2177
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("option", { value: size, children: [
1947
2178
  size,
1948
2179
  " rows"
1949
2180
  ] }, size))
1950
2181
  }
1951
2182
  )
1952
2183
  ] }),
1953
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1954
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: [
2184
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
2185
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-sm font-medium text-gray-900 mb-2", children: [
1955
2186
  "Default Zoom Level: ",
1956
2187
  localSettings.defaultZoom,
1957
2188
  "%"
1958
2189
  ] }),
1959
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2190
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1960
2191
  "input",
1961
2192
  {
1962
2193
  type: "range",
@@ -1971,14 +2202,14 @@ var SpreadsheetSettingsModal = ({
1971
2202
  className: "w-full cursor-pointer"
1972
2203
  }
1973
2204
  ),
1974
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-between mt-1 text-xs text-gray-500", children: [
1975
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "50%" }),
1976
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "150%" })
2205
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between mt-1 text-xs text-gray-500", children: [
2206
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "50%" }),
2207
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "150%" })
1977
2208
  ] })
1978
2209
  ] }),
1979
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-3", children: [
1980
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "flex items-center gap-3 p-4 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: [
1981
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2210
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-3", children: [
2211
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "flex items-center gap-3 p-4 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: [
2212
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1982
2213
  "input",
1983
2214
  {
1984
2215
  type: "checkbox",
@@ -1987,13 +2218,13 @@ var SpreadsheetSettingsModal = ({
1987
2218
  className: "w-5 h-5 cursor-pointer rounded border-gray-300 text-blue-600 focus:ring-blue-500"
1988
2219
  }
1989
2220
  ),
1990
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1", children: [
1991
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-sm font-medium text-gray-900", children: "Auto-save changes" }),
1992
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-sm text-gray-500 mt-0.5", children: "Automatically save changes without confirmation" })
2221
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1", children: [
2222
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "text-sm font-medium text-gray-900", children: "Auto-save changes" }),
2223
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "text-sm text-gray-500 mt-0.5", children: "Automatically save changes without confirmation" })
1993
2224
  ] })
1994
2225
  ] }),
1995
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "flex items-center gap-3 p-4 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: [
1996
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2226
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "flex items-center gap-3 p-4 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: [
2227
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1997
2228
  "input",
1998
2229
  {
1999
2230
  type: "checkbox",
@@ -2005,16 +2236,16 @@ var SpreadsheetSettingsModal = ({
2005
2236
  className: "w-5 h-5 cursor-pointer rounded border-gray-300 text-blue-600 focus:ring-blue-500"
2006
2237
  }
2007
2238
  ),
2008
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1", children: [
2009
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-sm font-medium text-gray-900", children: "Compact view" }),
2010
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-sm text-gray-500 mt-0.5", children: "Reduce padding and spacing to show more rows on screen" })
2239
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1", children: [
2240
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "text-sm font-medium text-gray-900", children: "Compact view" }),
2241
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "text-sm text-gray-500 mt-0.5", children: "Reduce padding and spacing to show more rows on screen" })
2011
2242
  ] })
2012
2243
  ] })
2013
2244
  ] })
2014
2245
  ] })
2015
2246
  ] }),
2016
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-between items-center gap-3", children: [
2017
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2247
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-between items-center gap-3", children: [
2248
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2018
2249
  "button",
2019
2250
  {
2020
2251
  type: "button",
@@ -2023,8 +2254,8 @@ var SpreadsheetSettingsModal = ({
2023
2254
  children: "Reset to Defaults"
2024
2255
  }
2025
2256
  ),
2026
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2", children: [
2027
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2257
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-2", children: [
2258
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2028
2259
  "button",
2029
2260
  {
2030
2261
  type: "button",
@@ -2033,7 +2264,7 @@ var SpreadsheetSettingsModal = ({
2033
2264
  children: "Cancel"
2034
2265
  }
2035
2266
  ),
2036
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2267
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2037
2268
  "button",
2038
2269
  {
2039
2270
  type: "button",
@@ -2053,7 +2284,7 @@ SpreadsheetSettingsModal.displayName = "SpreadsheetSettingsModal";
2053
2284
 
2054
2285
  // src/components/CommentModals.tsx
2055
2286
  var import_react9 = require("react");
2056
- var import_jsx_runtime9 = require("react/jsx-runtime");
2287
+ var import_jsx_runtime10 = require("react/jsx-runtime");
2057
2288
  function AddCommentModal({ isOpen, columnLabel, onAdd, onClose }) {
2058
2289
  const [commentText, setCommentText] = (0, import_react9.useState)("");
2059
2290
  (0, import_react9.useEffect)(() => {
@@ -2072,12 +2303,12 @@ function AddCommentModal({ isOpen, columnLabel, onAdd, onClose }) {
2072
2303
  setCommentText("");
2073
2304
  onClose();
2074
2305
  };
2075
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-96 max-w-full mx-4", children: [
2076
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h3", { className: "text-lg font-semibold mb-4", children: [
2306
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-96 max-w-full mx-4", children: [
2307
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("h3", { className: "text-lg font-semibold mb-4", children: [
2077
2308
  "Add Comment",
2078
2309
  columnLabel ? ` - ${columnLabel}` : ""
2079
2310
  ] }),
2080
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2311
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2081
2312
  "textarea",
2082
2313
  {
2083
2314
  value: commentText,
@@ -2091,8 +2322,8 @@ function AddCommentModal({ isOpen, columnLabel, onAdd, onClose }) {
2091
2322
  autoFocus: true
2092
2323
  }
2093
2324
  ),
2094
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-end gap-2 mt-4", children: [
2095
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2325
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-end gap-2 mt-4", children: [
2326
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2096
2327
  "button",
2097
2328
  {
2098
2329
  type: "button",
@@ -2101,7 +2332,7 @@ function AddCommentModal({ isOpen, columnLabel, onAdd, onClose }) {
2101
2332
  children: "Cancel"
2102
2333
  }
2103
2334
  ),
2104
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2335
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2105
2336
  "button",
2106
2337
  {
2107
2338
  type: "button",
@@ -2124,13 +2355,13 @@ function ViewCommentsModal({
2124
2355
  onClose
2125
2356
  }) {
2126
2357
  if (!isOpen) return null;
2127
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-[480px] max-w-full mx-4 max-h-[80vh] flex flex-col", children: [
2128
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
2129
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h3", { className: "text-lg font-semibold", children: [
2358
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-[480px] max-w-full mx-4 max-h-[80vh] flex flex-col", children: [
2359
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
2360
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("h3", { className: "text-lg font-semibold", children: [
2130
2361
  "Comments",
2131
2362
  columnLabel ? ` - ${columnLabel}` : ""
2132
2363
  ] }),
2133
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2364
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2134
2365
  "button",
2135
2366
  {
2136
2367
  type: "button",
@@ -2140,8 +2371,8 @@ function ViewCommentsModal({
2140
2371
  }
2141
2372
  )
2142
2373
  ] }),
2143
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 overflow-y-auto space-y-3", children: [
2144
- comments.map((comment) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2374
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1 overflow-y-auto space-y-3", children: [
2375
+ comments.map((comment) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2145
2376
  "div",
2146
2377
  {
2147
2378
  className: cn(
@@ -2149,9 +2380,9 @@ function ViewCommentsModal({
2149
2380
  comment.resolved ? "bg-gray-50 border-gray-200" : "bg-yellow-50 border-yellow-200"
2150
2381
  ),
2151
2382
  children: [
2152
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
2153
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-700", children: comment.text }),
2154
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2383
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
2384
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-gray-700", children: comment.text }),
2385
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2155
2386
  "button",
2156
2387
  {
2157
2388
  type: "button",
@@ -2164,23 +2395,23 @@ function ViewCommentsModal({
2164
2395
  }
2165
2396
  )
2166
2397
  ] }),
2167
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2 mt-2 text-xs text-gray-500", children: [
2168
- comment.author && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: comment.author }),
2169
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: new Date(comment.timestamp).toLocaleString() })
2398
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2 mt-2 text-xs text-gray-500", children: [
2399
+ comment.author && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: comment.author }),
2400
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: new Date(comment.timestamp).toLocaleString() })
2170
2401
  ] })
2171
2402
  ]
2172
2403
  },
2173
2404
  comment.id
2174
2405
  )),
2175
- comments.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-center text-gray-500 py-8", children: "No comments for this cell." })
2406
+ comments.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-center text-gray-500 py-8", children: "No comments for this cell." })
2176
2407
  ] }),
2177
- onAddComment && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-4 pt-4 border-t border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2408
+ onAddComment && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-4 pt-4 border-t border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2178
2409
  "button",
2179
2410
  {
2180
2411
  type: "button",
2181
2412
  onClick: onAddComment,
2182
2413
  className: "w-full px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center justify-center gap-2",
2183
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "+ Add Comment" })
2414
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "+ Add Comment" })
2184
2415
  }
2185
2416
  ) })
2186
2417
  ] }) });
@@ -2195,11 +2426,11 @@ function DeleteConfirmationModal({
2195
2426
  onClose
2196
2427
  }) {
2197
2428
  if (!isOpen) return null;
2198
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-96 max-w-full mx-4", children: [
2199
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "text-lg font-semibold mb-2", children: title }),
2200
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-gray-600 mb-6", children: message }),
2201
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-end gap-2", children: [
2202
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2429
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-96 max-w-full mx-4", children: [
2430
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-lg font-semibold mb-2", children: title }),
2431
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-gray-600 mb-6", children: message }),
2432
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-end gap-2", children: [
2433
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2203
2434
  "button",
2204
2435
  {
2205
2436
  type: "button",
@@ -2208,7 +2439,7 @@ function DeleteConfirmationModal({
2208
2439
  children: "Cancel"
2209
2440
  }
2210
2441
  ),
2211
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2442
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2212
2443
  "button",
2213
2444
  {
2214
2445
  type: "button",
@@ -2227,50 +2458,50 @@ DeleteConfirmationModal.displayName = "DeleteConfirmationModal";
2227
2458
 
2228
2459
  // src/components/KeyboardShortcutsModal.tsx
2229
2460
  var import_react10 = __toESM(require("react"));
2230
- var import_jsx_runtime10 = require("react/jsx-runtime");
2461
+ var import_jsx_runtime11 = require("react/jsx-runtime");
2231
2462
  function KeyboardShortcutsModal({
2232
2463
  isOpen,
2233
2464
  onClose,
2234
2465
  shortcuts
2235
2466
  }) {
2236
2467
  if (!isOpen) return null;
2237
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto mx-4", children: [
2238
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
2239
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-xl font-bold text-gray-900", children: "Keyboard Shortcuts" }),
2240
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2468
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "bg-white rounded-lg shadow-xl p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto mx-4", children: [
2469
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
2470
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-xl font-bold text-gray-900", children: "Keyboard Shortcuts" }),
2471
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2241
2472
  "button",
2242
2473
  {
2243
2474
  type: "button",
2244
2475
  onClick: onClose,
2245
2476
  className: "p-1 hover:bg-gray-100 rounded",
2246
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-500 text-xl", children: "\u2715" })
2477
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-500 text-xl", children: "\u2715" })
2247
2478
  }
2248
2479
  )
2249
2480
  ] }),
2250
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-6", children: [
2251
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutSection, { title: "General", children: shortcuts.general.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2252
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutSection, { title: "Row Selection", children: shortcuts.rowSelection.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2253
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutSection, { title: "Editing", children: shortcuts.editing.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2254
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutSection, { title: "Cell Navigation", children: shortcuts.navigation.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2255
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ShortcutSection, { title: "Row Actions (hover over row #)", children: shortcuts.rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between", children: [
2256
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-600 text-sm", children: action.label }),
2257
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-500 text-xs", children: action.description })
2481
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-6", children: [
2482
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutSection, { title: "General", children: shortcuts.general.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2483
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutSection, { title: "Row Selection", children: shortcuts.rowSelection.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2484
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutSection, { title: "Editing", children: shortcuts.editing.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2485
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutSection, { title: "Cell Navigation", children: shortcuts.navigation.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutRow, { label: shortcut.label, keys: shortcut.keys }, index)) }),
2486
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ShortcutSection, { title: "Row Actions (hover over row #)", children: shortcuts.rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between", children: [
2487
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-600 text-sm", children: action.label }),
2488
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-500 text-xs", children: action.description })
2258
2489
  ] }, index)) })
2259
2490
  ] })
2260
2491
  ] }) });
2261
2492
  }
2262
2493
  function ShortcutSection({ title, children }) {
2263
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
2264
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { className: "text-gray-900 font-semibold mb-3", children: title }),
2265
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "space-y-2", children })
2494
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
2495
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h4", { className: "text-gray-900 font-semibold mb-3", children: title }),
2496
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "space-y-2", children })
2266
2497
  ] });
2267
2498
  }
2268
2499
  function ShortcutRow({ label, keys }) {
2269
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between", children: [
2270
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-600 text-sm", children: label }),
2271
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center gap-1", children: keys.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react10.default.Fragment, { children: [
2272
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-400", children: "+" }),
2273
- key.includes("Click") ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-gray-500 text-xs", children: key }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("kbd", { className: "px-2 py-1 bg-gray-100 text-gray-800 rounded text-xs border border-gray-200", children: key })
2500
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between", children: [
2501
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-600 text-sm", children: label }),
2502
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center gap-1", children: keys.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react10.default.Fragment, { children: [
2503
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-400", children: "+" }),
2504
+ key.includes("Click") ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-gray-500 text-xs", children: key }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("kbd", { className: "px-2 py-1 bg-gray-100 text-gray-800 rounded text-xs border border-gray-200", children: key })
2274
2505
  ] }, index)) })
2275
2506
  ] });
2276
2507
  }
@@ -2279,7 +2510,7 @@ KeyboardShortcutsModal.displayName = "KeyboardShortcutsModal";
2279
2510
  // src/components/RowContextMenu.tsx
2280
2511
  var import_react11 = require("react");
2281
2512
  var import_design_system = require("@xcelsior/design-system");
2282
- var import_jsx_runtime11 = require("react/jsx-runtime");
2513
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2283
2514
  function RowContextMenu({
2284
2515
  row,
2285
2516
  rowId,
@@ -2293,10 +2524,10 @@ function RowContextMenu({
2293
2524
  if (visibleItems.length === 0) {
2294
2525
  return null;
2295
2526
  }
2296
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2527
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2297
2528
  import_design_system.ContextMenu,
2298
2529
  {
2299
- trigger: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2530
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2300
2531
  "button",
2301
2532
  {
2302
2533
  type: "button",
@@ -2305,7 +2536,7 @@ function RowContextMenu({
2305
2536
  className
2306
2537
  ),
2307
2538
  title: "More actions",
2308
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2539
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2309
2540
  HiDotsVertical,
2310
2541
  {
2311
2542
  className: cn("text-gray-500", compactMode ? "h-2.5 w-2.5" : "h-3 w-3")
@@ -2317,7 +2548,7 @@ function RowContextMenu({
2317
2548
  children: visibleItems.map((item) => {
2318
2549
  const isDisabled = item.disabled?.(row);
2319
2550
  const variantClass = item.variant === "destructive" ? "text-red-600 hover:bg-red-50" : "";
2320
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2551
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2321
2552
  import_design_system.ContextMenuItem,
2322
2553
  {
2323
2554
  onClick: (e) => {
@@ -2327,7 +2558,7 @@ function RowContextMenu({
2327
2558
  disabled: isDisabled,
2328
2559
  className: `${variantClass} ${item.className || ""}`,
2329
2560
  children: [
2330
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mr-2", children: item.icon }),
2561
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "mr-2", children: item.icon }),
2331
2562
  item.label
2332
2563
  ]
2333
2564
  },
@@ -2344,7 +2575,7 @@ var import_design_system2 = require("@xcelsior/design-system");
2344
2575
 
2345
2576
  // src/hooks/useSpreadsheetFiltering.ts
2346
2577
  var import_react12 = require("react");
2347
- var import_utils10 = require("@xcelsior/utils");
2578
+ var import_utils11 = require("@xcelsior/utils");
2348
2579
  function useSpreadsheetFiltering({
2349
2580
  data,
2350
2581
  columns,
@@ -2542,13 +2773,13 @@ function useSpreadsheetFiltering({
2542
2773
  [sortConfig?.columnId]
2543
2774
  );
2544
2775
  const filteredData = (0, import_react12.useMemo)(() => {
2545
- if (!data || !Array.isArray(data)) return import_utils10.LazyArray.empty();
2776
+ if (!data || !Array.isArray(data)) return import_utils11.LazyArray.empty();
2546
2777
  if (serverSide) {
2547
- return import_utils10.LazyArray.from(data);
2778
+ return import_utils11.LazyArray.from(data);
2548
2779
  }
2549
- if (!columns || !Array.isArray(columns)) return import_utils10.LazyArray.from(data);
2550
- let lazyResult = import_utils10.LazyArray.from(data);
2551
- const filterChain = new import_utils10.FilterChain();
2780
+ if (!columns || !Array.isArray(columns)) return import_utils11.LazyArray.from(data);
2781
+ let lazyResult = import_utils11.LazyArray.from(data);
2782
+ const filterChain = new import_utils11.FilterChain();
2552
2783
  for (const [columnId, filter] of Object.entries(filters)) {
2553
2784
  if (!filter) continue;
2554
2785
  const column = columns.find((c) => c.id === columnId);
@@ -3426,7 +3657,7 @@ function useSpreadsheetSelection({
3426
3657
  }
3427
3658
 
3428
3659
  // src/components/Spreadsheet.tsx
3429
- var import_jsx_runtime12 = require("react/jsx-runtime");
3660
+ var import_jsx_runtime13 = require("react/jsx-runtime");
3430
3661
  function Spreadsheet({
3431
3662
  data,
3432
3663
  columns,
@@ -3557,6 +3788,7 @@ function Spreadsheet({
3557
3788
  onToggleCommentResolved
3558
3789
  });
3559
3790
  const [showSettingsModal, setShowSettingsModal] = (0, import_react17.useState)(false);
3791
+ const [showFiltersPanel, setShowFiltersPanel] = (0, import_react17.useState)(false);
3560
3792
  const {
3561
3793
  canUndo,
3562
3794
  canRedo,
@@ -4001,8 +4233,8 @@ function Spreadsheet({
4001
4233
  );
4002
4234
  return [...leftPinned, ...groups, ...rightPinned];
4003
4235
  }, [columnGroups, collapsedGroups, columns, pinnedColumns]);
4004
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cn("flex flex-col h-full bg-white", className), children: [
4005
- showToolbar && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4236
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("flex flex-col h-full bg-white", className), children: [
4237
+ showToolbar && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4006
4238
  SpreadsheetToolbar,
4007
4239
  {
4008
4240
  zoom,
@@ -4016,6 +4248,11 @@ function Spreadsheet({
4016
4248
  autoSave: spreadsheetSettings.autoSave,
4017
4249
  hasActiveFilters,
4018
4250
  onClearFilters: clearAllFilters,
4251
+ filters,
4252
+ columns,
4253
+ onClearFilter: (columnId) => handleFilterChange(columnId, void 0),
4254
+ showFiltersPanel,
4255
+ onToggleFiltersPanel: () => setShowFiltersPanel(!showFiltersPanel),
4019
4256
  onZoomIn: () => setZoom((z) => Math.min(z + 10, 200)),
4020
4257
  onZoomOut: () => setZoom((z) => Math.max(z - 10, 50)),
4021
4258
  onZoomReset: () => setZoom(100),
@@ -4032,16 +4269,16 @@ function Spreadsheet({
4032
4269
  menuItems: toolbarMenuItems
4033
4270
  }
4034
4271
  ),
4035
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { ref: tableRef, className: "flex-1 overflow-auto border border-gray-200 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4272
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { ref: tableRef, className: "flex-1 overflow-auto border border-gray-200 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4036
4273
  "div",
4037
4274
  {
4038
4275
  style: {
4039
4276
  zoom: zoom / 100
4040
4277
  },
4041
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("table", { className: "border-separate border-spacing-0 text-xs select-none", children: [
4042
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("thead", { children: [
4043
- columnGroups && groupHeaderItems && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("tr", { children: [
4044
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4278
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("table", { className: "border-separate border-spacing-0 text-xs select-none", children: [
4279
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("thead", { children: [
4280
+ columnGroups && groupHeaderItems && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
4281
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4045
4282
  RowIndexColumnHeader,
4046
4283
  {
4047
4284
  enableHighlighting,
@@ -4057,7 +4294,11 @@ function Spreadsheet({
4057
4294
  if (item.type === "pinned-column") {
4058
4295
  const col = columns.find((c) => c.id === item.columnId);
4059
4296
  const isPinnedLeft = item.pinSide === "left";
4060
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4297
+ const pinnedWidth = Math.max(
4298
+ col?.minWidth || col?.width || MIN_PINNED_COLUMN_WIDTH,
4299
+ MIN_PINNED_COLUMN_WIDTH
4300
+ );
4301
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4061
4302
  "th",
4062
4303
  {
4063
4304
  className: cn(
@@ -4069,16 +4310,14 @@ function Spreadsheet({
4069
4310
  position: "sticky",
4070
4311
  left: isPinnedLeft ? `${getColumnLeftOffset(item.columnId)}px` : void 0,
4071
4312
  right: !isPinnedLeft ? `${getColumnRightOffset(item.columnId)}px` : void 0,
4072
- minWidth: Math.max(col?.minWidth || col?.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH),
4073
- width: Math.max(col?.minWidth || col?.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH),
4074
- maxWidth: Math.max(col?.minWidth || col?.width || MIN_PINNED_COLUMN_WIDTH, MIN_PINNED_COLUMN_WIDTH)
4313
+ minWidth: pinnedWidth
4075
4314
  }
4076
4315
  },
4077
4316
  `pinned-group-${item.columnId}`
4078
4317
  );
4079
4318
  }
4080
4319
  const { group, colSpan, isCollapsed } = item;
4081
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4320
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4082
4321
  "th",
4083
4322
  {
4084
4323
  colSpan,
@@ -4090,17 +4329,17 @@ function Spreadsheet({
4090
4329
  backgroundColor: group.headerColor || "rgb(243 244 246)"
4091
4330
  },
4092
4331
  onClick: () => group.collapsible && handleToggleGroupCollapse(group.id),
4093
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
4094
- group.collapsible && (isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HiChevronRight, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HiChevronDown, { className: "h-3 w-3" })),
4095
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: group.label })
4332
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
4333
+ group.collapsible && (isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(HiChevronRight, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(HiChevronDown, { className: "h-3 w-3" })),
4334
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: group.label })
4096
4335
  ] })
4097
4336
  },
4098
4337
  group.id
4099
4338
  );
4100
4339
  })
4101
4340
  ] }),
4102
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("tr", { children: [
4103
- !columnGroups && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4341
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
4342
+ !columnGroups && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4104
4343
  RowIndexColumnHeader,
4105
4344
  {
4106
4345
  enableHighlighting,
@@ -4114,7 +4353,7 @@ function Spreadsheet({
4114
4353
  ),
4115
4354
  columnRenderItems.map((item) => {
4116
4355
  if (item.type === "collapsed-placeholder") {
4117
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4356
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4118
4357
  "th",
4119
4358
  {
4120
4359
  className: "border border-gray-200 px-2 py-1 text-center text-gray-400",
@@ -4130,7 +4369,7 @@ function Spreadsheet({
4130
4369
  const column = item.column;
4131
4370
  const isPinnedLeft = isColumnPinned(column.id) && getColumnPinSide(column.id) === "left";
4132
4371
  const isPinnedRight = isColumnPinned(column.id) && getColumnPinSide(column.id) === "right";
4133
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4372
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4134
4373
  SpreadsheetHeader,
4135
4374
  {
4136
4375
  column,
@@ -4148,7 +4387,7 @@ function Spreadsheet({
4148
4387
  ),
4149
4388
  onPinClick: () => handleTogglePin(column.id),
4150
4389
  onHighlightClick: enableHighlighting ? () => setHighlightPickerColumn(column.id) : void 0,
4151
- children: activeFilterColumn === column.id && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4390
+ children: activeFilterColumn === column.id && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4152
4391
  SpreadsheetFilterDropdown,
4153
4392
  {
4154
4393
  column,
@@ -4163,17 +4402,17 @@ function Spreadsheet({
4163
4402
  })
4164
4403
  ] })
4165
4404
  ] }),
4166
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tbody", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4405
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tbody", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4167
4406
  "td",
4168
4407
  {
4169
4408
  colSpan: columnRenderItems.length + 1,
4170
4409
  className: "text-center py-8 text-gray-500",
4171
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-center gap-2", children: [
4172
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin" }),
4410
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-center gap-2", children: [
4411
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin" }),
4173
4412
  "Loading..."
4174
4413
  ] })
4175
4414
  }
4176
- ) }) : paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4415
+ ) }) : paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4177
4416
  "td",
4178
4417
  {
4179
4418
  colSpan: columnRenderItems.length + 1,
@@ -4186,7 +4425,7 @@ function Spreadsheet({
4186
4425
  const isRowHovered = hoveredRow === rowId;
4187
4426
  const rowHighlight = getRowHighlight(rowId);
4188
4427
  const displayIndex = rowIndex + 1 + (currentPage - 1) * pageSize;
4189
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
4428
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
4190
4429
  "tr",
4191
4430
  {
4192
4431
  onMouseEnter: () => setHoveredRow(rowId),
@@ -4196,7 +4435,7 @@ function Spreadsheet({
4196
4435
  },
4197
4436
  onDoubleClick: () => onRowDoubleClick?.(row, rowIndex),
4198
4437
  children: [
4199
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4438
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4200
4439
  "td",
4201
4440
  {
4202
4441
  onClick: (e) => handleRowSelect(rowId, e),
@@ -4217,10 +4456,10 @@ function Spreadsheet({
4217
4456
  left: 0
4218
4457
  }
4219
4458
  },
4220
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative flex items-center justify-center w-full h-full", children: [
4221
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: displayIndex }),
4222
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "absolute inset-0 flex items-center justify-evenly", children: [
4223
- rowContextMenuItems && rowContextMenuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4459
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative flex items-center justify-center w-full h-full", children: [
4460
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: displayIndex }),
4461
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "absolute inset-0 flex items-center justify-evenly", children: [
4462
+ rowContextMenuItems && rowContextMenuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4224
4463
  RowContextMenu,
4225
4464
  {
4226
4465
  row,
@@ -4229,7 +4468,7 @@ function Spreadsheet({
4229
4468
  compactMode: effectiveCompactMode
4230
4469
  }
4231
4470
  ),
4232
- enableHighlighting && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4471
+ enableHighlighting && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4233
4472
  "button",
4234
4473
  {
4235
4474
  type: "button",
@@ -4239,7 +4478,7 @@ function Spreadsheet({
4239
4478
  },
4240
4479
  className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 bg-gray-100 hover:bg-gray-200 rounded",
4241
4480
  title: "Highlight row",
4242
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4481
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4243
4482
  AiFillHighlight,
4244
4483
  {
4245
4484
  className: cn(
@@ -4253,7 +4492,7 @@ function Spreadsheet({
4253
4492
  enableComments && (cellHasComments(
4254
4493
  rowId,
4255
4494
  ROW_INDEX_COLUMN_ID
4256
- ) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
4495
+ ) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
4257
4496
  "button",
4258
4497
  {
4259
4498
  type: "button",
@@ -4267,11 +4506,11 @@ function Spreadsheet({
4267
4506
  className: "p-0.5 bg-amber-100 hover:bg-amber-200 rounded transition-colors flex items-center gap-0.5",
4268
4507
  title: `${getCellUnresolvedCommentCount(rowId, ROW_INDEX_COLUMN_ID)} comment(s) - click to view`,
4269
4508
  children: [
4270
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FaComment, { className: "h-2.5 w-2.5 text-amber-500" }),
4509
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FaComment, { className: "h-2.5 w-2.5 text-amber-500" }),
4271
4510
  getCellUnresolvedCommentCount(
4272
4511
  rowId,
4273
4512
  ROW_INDEX_COLUMN_ID
4274
- ) > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-[9px] font-medium text-amber-600", children: getCellUnresolvedCommentCount(
4513
+ ) > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-[9px] font-medium text-amber-600", children: getCellUnresolvedCommentCount(
4275
4514
  rowId,
4276
4515
  ROW_INDEX_COLUMN_ID
4277
4516
  ) > 99 ? "99+" : getCellUnresolvedCommentCount(
@@ -4280,7 +4519,7 @@ function Spreadsheet({
4280
4519
  ) })
4281
4520
  ]
4282
4521
  }
4283
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4522
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4284
4523
  "button",
4285
4524
  {
4286
4525
  type: "button",
@@ -4293,13 +4532,13 @@ function Spreadsheet({
4293
4532
  },
4294
4533
  className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 bg-gray-100 hover:bg-gray-200 rounded",
4295
4534
  title: "Add comment",
4296
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FaRegComment, { className: "h-2.5 w-2.5 text-gray-500" })
4535
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FaRegComment, { className: "h-2.5 w-2.5 text-gray-500" })
4297
4536
  }
4298
4537
  )),
4299
4538
  rowActions?.map((action) => {
4300
4539
  if (action.visible && !action.visible(row))
4301
4540
  return null;
4302
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4541
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4303
4542
  "button",
4304
4543
  {
4305
4544
  type: "button",
@@ -4323,7 +4562,7 @@ function Spreadsheet({
4323
4562
  ),
4324
4563
  columnRenderItems.map((item) => {
4325
4564
  if (item.type === "collapsed-placeholder") {
4326
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4565
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4327
4566
  "td",
4328
4567
  {
4329
4568
  className: "border border-gray-200 px-2 py-1 text-center text-gray-300",
@@ -4349,7 +4588,7 @@ function Spreadsheet({
4349
4588
  const cellOrRowOrColumnHighlight = getCellHighlight(rowId, column.id) || rowHighlight?.color || getColumnHighlight(column.id);
4350
4589
  const isColPinned = isColumnPinned(column.id);
4351
4590
  const colPinSide = getColumnPinSide(column.id);
4352
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4591
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4353
4592
  MemoizedSpreadsheetCell,
4354
4593
  {
4355
4594
  value,
@@ -4409,7 +4648,7 @@ function Spreadsheet({
4409
4648
  ] })
4410
4649
  }
4411
4650
  ) }),
4412
- showPagination && effectiveTotalItems > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4651
+ showPagination && effectiveTotalItems > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4413
4652
  import_design_system2.Pagination,
4414
4653
  {
4415
4654
  currentPage,
@@ -4424,7 +4663,7 @@ function Spreadsheet({
4424
4663
  onPageSizeChange: handlePageSizeChange
4425
4664
  }
4426
4665
  ),
4427
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4666
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4428
4667
  AddCommentModal,
4429
4668
  {
4430
4669
  isOpen: commentModalCell !== null,
@@ -4435,7 +4674,7 @@ function Spreadsheet({
4435
4674
  }
4436
4675
  }
4437
4676
  ),
4438
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4677
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4439
4678
  ViewCommentsModal,
4440
4679
  {
4441
4680
  isOpen: viewCommentsCell !== null,
@@ -4450,7 +4689,7 @@ function Spreadsheet({
4450
4689
  onClose: () => setViewCommentsCell(null)
4451
4690
  }
4452
4691
  ),
4453
- highlightPickerRow !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4692
+ highlightPickerRow !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4454
4693
  ColorPickerPopover,
4455
4694
  {
4456
4695
  title: "Highlight Row",
@@ -4459,7 +4698,7 @@ function Spreadsheet({
4459
4698
  onClose: () => setHighlightPickerRow(null)
4460
4699
  }
4461
4700
  ),
4462
- highlightPickerColumn !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4701
+ highlightPickerColumn !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4463
4702
  ColorPickerPopover,
4464
4703
  {
4465
4704
  title: highlightPickerColumn === ROW_INDEX_COLUMN_ID ? "Highlight Row Index Column" : `Highlight Column: ${columns.find((c) => c.id === highlightPickerColumn)?.label || ""}`,
@@ -4468,7 +4707,7 @@ function Spreadsheet({
4468
4707
  onClose: () => setHighlightPickerColumn(null)
4469
4708
  }
4470
4709
  ),
4471
- highlightPickerCell !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4710
+ highlightPickerCell !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4472
4711
  ColorPickerPopover,
4473
4712
  {
4474
4713
  title: "Highlight Cell",
@@ -4481,7 +4720,7 @@ function Spreadsheet({
4481
4720
  onClose: () => setHighlightPickerCell(null)
4482
4721
  }
4483
4722
  ),
4484
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4723
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4485
4724
  KeyboardShortcutsModal,
4486
4725
  {
4487
4726
  isOpen: showKeyboardShortcuts,
@@ -4489,7 +4728,7 @@ function Spreadsheet({
4489
4728
  shortcuts
4490
4729
  }
4491
4730
  ),
4492
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4731
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4493
4732
  SpreadsheetSettingsModal,
4494
4733
  {
4495
4734
  isOpen: showSettingsModal,
@@ -4517,6 +4756,7 @@ function Spreadsheet({
4517
4756
  Spreadsheet.displayName = "Spreadsheet";
4518
4757
  // Annotate the CommonJS export names for ESM import in node:
4519
4758
  0 && (module.exports = {
4759
+ ActiveFiltersDisplay,
4520
4760
  RowContextMenu,
4521
4761
  Spreadsheet,
4522
4762
  SpreadsheetCell,