@rowsncolumns/spreadsheet 10.6.0 → 10.6.5

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.
Files changed (186) hide show
  1. package/dist/cjs/api/cf-data-bar.d.ts +73 -0
  2. package/dist/cjs/api/cf-data-bar.d.ts.map +1 -0
  3. package/dist/cjs/api/cf-data-bar.js +182 -0
  4. package/dist/cjs/api/cf-icons.d.ts +73 -0
  5. package/dist/cjs/api/cf-icons.d.ts.map +1 -0
  6. package/dist/cjs/api/cf-icons.js +322 -0
  7. package/dist/cjs/api/cf-overlays.d.ts +89 -3
  8. package/dist/cjs/api/cf-overlays.d.ts.map +1 -1
  9. package/dist/cjs/api/cf-overlays.js +256 -80
  10. package/dist/cjs/api/cf-priority.d.ts +34 -0
  11. package/dist/cjs/api/cf-priority.d.ts.map +1 -0
  12. package/dist/cjs/api/cf-priority.js +94 -0
  13. package/dist/cjs/api/heatmap.d.ts +7 -1
  14. package/dist/cjs/api/heatmap.d.ts.map +1 -1
  15. package/dist/cjs/api/heatmap.js +27 -11
  16. package/dist/cjs/api/selections.d.ts +2 -2
  17. package/dist/cjs/api/validation.d.ts +6 -0
  18. package/dist/cjs/api/validation.d.ts.map +1 -1
  19. package/dist/cjs/api/validation.js +10 -1
  20. package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
  21. package/dist/cjs/components/canvas-grid/index.js +194 -51
  22. package/dist/cjs/components/canvas-grid/overflow.d.ts +37 -0
  23. package/dist/cjs/components/canvas-grid/overflow.d.ts.map +1 -0
  24. package/dist/cjs/components/canvas-grid/overflow.js +49 -0
  25. package/dist/cjs/components/canvas-grid/page-breaks.d.ts +15 -0
  26. package/dist/cjs/components/canvas-grid/page-breaks.d.ts.map +1 -0
  27. package/dist/cjs/components/canvas-grid/page-breaks.js +77 -0
  28. package/dist/cjs/components/canvas-grid/typings.d.ts +25 -0
  29. package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
  30. package/dist/cjs/components/cell/alignment.d.ts +83 -1
  31. package/dist/cjs/components/cell/alignment.d.ts.map +1 -1
  32. package/dist/cjs/components/cell/alignment.js +182 -1
  33. package/dist/cjs/components/cell/cell-background.d.ts +18 -0
  34. package/dist/cjs/components/cell/cell-background.d.ts.map +1 -1
  35. package/dist/cjs/components/cell/cell-background.js +145 -59
  36. package/dist/cjs/components/cell/cell-backgrounds.d.ts.map +1 -1
  37. package/dist/cjs/components/cell/cell-backgrounds.js +5 -1
  38. package/dist/cjs/components/cell/cell-text-runs.d.ts +12 -5
  39. package/dist/cjs/components/cell/cell-text-runs.d.ts.map +1 -1
  40. package/dist/cjs/components/cell/cell-text-runs.js +19 -21
  41. package/dist/cjs/components/cell/index.d.ts.map +1 -1
  42. package/dist/cjs/components/cell/index.js +392 -45
  43. package/dist/cjs/components/cell/number-format-layout.d.ts +35 -0
  44. package/dist/cjs/components/cell/number-format-layout.d.ts.map +1 -0
  45. package/dist/cjs/components/cell/number-format-layout.js +106 -0
  46. package/dist/cjs/components/cell/typings.d.ts +22 -0
  47. package/dist/cjs/components/cell/typings.d.ts.map +1 -1
  48. package/dist/cjs/components/cell-editor/index.js +2 -2
  49. package/dist/cjs/components/cell-filter/index.d.ts.map +1 -1
  50. package/dist/cjs/components/cell-filter/index.js +3 -3
  51. package/dist/cjs/components/cell-overlay/index.d.ts +20 -0
  52. package/dist/cjs/components/cell-overlay/index.d.ts.map +1 -1
  53. package/dist/cjs/components/cell-overlay/index.js +155 -28
  54. package/dist/cjs/components/cf-icon-preview/index.d.ts +16 -0
  55. package/dist/cjs/components/cf-icon-preview/index.d.ts.map +1 -0
  56. package/dist/cjs/components/cf-icon-preview/index.js +48 -0
  57. package/dist/cjs/components/embeds/embed-component.d.ts.map +1 -1
  58. package/dist/cjs/components/embeds/embed-component.js +3 -2
  59. package/dist/cjs/components/hidden-markers/index.d.ts.map +1 -1
  60. package/dist/cjs/components/hidden-markers/index.js +8 -7
  61. package/dist/cjs/components/hidden-markers/style.d.ts +7 -0
  62. package/dist/cjs/components/hidden-markers/style.d.ts.map +1 -1
  63. package/dist/cjs/components/hidden-markers/style.js +13 -2
  64. package/dist/cjs/components/protect-sheet-dialog/index.d.ts +67 -0
  65. package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -0
  66. package/dist/cjs/components/protect-sheet-dialog/index.js +196 -0
  67. package/dist/cjs/components/toolbar/types.d.ts +1 -1
  68. package/dist/cjs/components/toolbar/types.d.ts.map +1 -1
  69. package/dist/cjs/config.d.ts +13 -1
  70. package/dist/cjs/config.d.ts.map +1 -1
  71. package/dist/cjs/config.js +15 -3
  72. package/dist/cjs/helpers.d.ts +15 -5
  73. package/dist/cjs/helpers.d.ts.map +1 -1
  74. package/dist/cjs/helpers.js +51 -35
  75. package/dist/cjs/hooks/use-border-styles.d.ts.map +1 -1
  76. package/dist/cjs/hooks/use-border-styles.js +5 -28
  77. package/dist/cjs/hooks/use-cell-renderer.d.ts +35 -3
  78. package/dist/cjs/hooks/use-cell-renderer.d.ts.map +1 -1
  79. package/dist/cjs/hooks/use-cell-renderer.js +85 -47
  80. package/dist/cjs/hooks/use-conditional-formatting.d.ts +13 -1
  81. package/dist/cjs/hooks/use-conditional-formatting.d.ts.map +1 -1
  82. package/dist/cjs/hooks/use-conditional-formatting.js +281 -230
  83. package/dist/cjs/index.d.ts +5 -0
  84. package/dist/cjs/index.d.ts.map +1 -1
  85. package/dist/cjs/index.js +5 -0
  86. package/dist/cjs/release-date.js +1 -1
  87. package/dist/cjs/themes.d.ts +8 -0
  88. package/dist/cjs/themes.d.ts.map +1 -1
  89. package/dist/cjs/themes.js +21 -3
  90. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  91. package/dist/cjs/types.d.ts +81 -4
  92. package/dist/cjs/types.d.ts.map +1 -1
  93. package/dist/esm/api/cf-data-bar.d.ts +73 -0
  94. package/dist/esm/api/cf-data-bar.d.ts.map +1 -0
  95. package/dist/esm/api/cf-data-bar.js +178 -0
  96. package/dist/esm/api/cf-icons.d.ts +73 -0
  97. package/dist/esm/api/cf-icons.d.ts.map +1 -0
  98. package/dist/esm/api/cf-icons.js +306 -0
  99. package/dist/esm/api/cf-overlays.d.ts +89 -3
  100. package/dist/esm/api/cf-overlays.d.ts.map +1 -1
  101. package/dist/esm/api/cf-overlays.js +223 -67
  102. package/dist/esm/api/cf-priority.d.ts +34 -0
  103. package/dist/esm/api/cf-priority.d.ts.map +1 -0
  104. package/dist/esm/api/cf-priority.js +61 -0
  105. package/dist/esm/api/heatmap.d.ts +7 -1
  106. package/dist/esm/api/heatmap.d.ts.map +1 -1
  107. package/dist/esm/api/heatmap.js +24 -9
  108. package/dist/esm/api/selections.d.ts +2 -2
  109. package/dist/esm/api/validation.d.ts +6 -0
  110. package/dist/esm/api/validation.d.ts.map +1 -1
  111. package/dist/esm/api/validation.js +6 -0
  112. package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
  113. package/dist/esm/components/canvas-grid/index.js +163 -47
  114. package/dist/esm/components/canvas-grid/overflow.d.ts +37 -0
  115. package/dist/esm/components/canvas-grid/overflow.d.ts.map +1 -0
  116. package/dist/esm/components/canvas-grid/overflow.js +39 -0
  117. package/dist/esm/components/canvas-grid/page-breaks.d.ts +15 -0
  118. package/dist/esm/components/canvas-grid/page-breaks.d.ts.map +1 -0
  119. package/dist/esm/components/canvas-grid/page-breaks.js +50 -0
  120. package/dist/esm/components/canvas-grid/typings.d.ts +25 -0
  121. package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
  122. package/dist/esm/components/cell/alignment.d.ts +83 -1
  123. package/dist/esm/components/cell/alignment.d.ts.map +1 -1
  124. package/dist/esm/components/cell/alignment.js +143 -1
  125. package/dist/esm/components/cell/cell-background.d.ts +18 -0
  126. package/dist/esm/components/cell/cell-background.d.ts.map +1 -1
  127. package/dist/esm/components/cell/cell-background.js +110 -41
  128. package/dist/esm/components/cell/cell-backgrounds.d.ts.map +1 -1
  129. package/dist/esm/components/cell/cell-backgrounds.js +5 -1
  130. package/dist/esm/components/cell/cell-text-runs.d.ts +12 -5
  131. package/dist/esm/components/cell/cell-text-runs.d.ts.map +1 -1
  132. package/dist/esm/components/cell/cell-text-runs.js +19 -24
  133. package/dist/esm/components/cell/index.d.ts.map +1 -1
  134. package/dist/esm/components/cell/index.js +352 -46
  135. package/dist/esm/components/cell/number-format-layout.d.ts +35 -0
  136. package/dist/esm/components/cell/number-format-layout.d.ts.map +1 -0
  137. package/dist/esm/components/cell/number-format-layout.js +99 -0
  138. package/dist/esm/components/cell/typings.d.ts +22 -0
  139. package/dist/esm/components/cell/typings.d.ts.map +1 -1
  140. package/dist/esm/components/cell-editor/index.js +2 -2
  141. package/dist/esm/components/cell-filter/index.d.ts.map +1 -1
  142. package/dist/esm/components/cell-filter/index.js +4 -4
  143. package/dist/esm/components/cell-overlay/index.d.ts +20 -0
  144. package/dist/esm/components/cell-overlay/index.d.ts.map +1 -1
  145. package/dist/esm/components/cell-overlay/index.js +111 -25
  146. package/dist/esm/components/cf-icon-preview/index.d.ts +16 -0
  147. package/dist/esm/components/cf-icon-preview/index.d.ts.map +1 -0
  148. package/dist/esm/components/cf-icon-preview/index.js +41 -0
  149. package/dist/esm/components/embeds/embed-component.d.ts.map +1 -1
  150. package/dist/esm/components/embeds/embed-component.js +4 -3
  151. package/dist/esm/components/hidden-markers/index.d.ts.map +1 -1
  152. package/dist/esm/components/hidden-markers/index.js +9 -8
  153. package/dist/esm/components/hidden-markers/style.d.ts +7 -0
  154. package/dist/esm/components/hidden-markers/style.d.ts.map +1 -1
  155. package/dist/esm/components/hidden-markers/style.js +8 -1
  156. package/dist/esm/components/protect-sheet-dialog/index.d.ts +67 -0
  157. package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -0
  158. package/dist/esm/components/protect-sheet-dialog/index.js +154 -0
  159. package/dist/esm/components/toolbar/types.d.ts +1 -1
  160. package/dist/esm/components/toolbar/types.d.ts.map +1 -1
  161. package/dist/esm/config.d.ts +13 -1
  162. package/dist/esm/config.d.ts.map +1 -1
  163. package/dist/esm/config.js +13 -1
  164. package/dist/esm/helpers.d.ts +15 -5
  165. package/dist/esm/helpers.d.ts.map +1 -1
  166. package/dist/esm/helpers.js +48 -32
  167. package/dist/esm/hooks/use-border-styles.d.ts.map +1 -1
  168. package/dist/esm/hooks/use-border-styles.js +5 -26
  169. package/dist/esm/hooks/use-cell-renderer.d.ts +35 -3
  170. package/dist/esm/hooks/use-cell-renderer.d.ts.map +1 -1
  171. package/dist/esm/hooks/use-cell-renderer.js +83 -42
  172. package/dist/esm/hooks/use-conditional-formatting.d.ts +13 -1
  173. package/dist/esm/hooks/use-conditional-formatting.d.ts.map +1 -1
  174. package/dist/esm/hooks/use-conditional-formatting.js +215 -120
  175. package/dist/esm/index.d.ts +5 -0
  176. package/dist/esm/index.d.ts.map +1 -1
  177. package/dist/esm/index.js +5 -0
  178. package/dist/esm/release-date.js +1 -1
  179. package/dist/esm/themes.d.ts +8 -0
  180. package/dist/esm/themes.d.ts.map +1 -1
  181. package/dist/esm/themes.js +20 -3
  182. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  183. package/dist/esm/types.d.ts +81 -4
  184. package/dist/esm/types.d.ts.map +1 -1
  185. package/dist/spreadsheet.min.css +1 -1
  186. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"use-cell-renderer.d.ts","sourceRoot":"","sources":["../../../hooks/use-cell-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3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AAE,MAAM,GAClB,eAAe,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,g1CA2E5D,iBAAiB,CAAC,CAAC,CAAC,uBAgnBX,aAAa,uCAnmBb,aAAa,gCAkfb,aAAa,uCApFb,aAAa,mDAoRb,aAAa,EAAE,uBA0B1B,CAAC"}
@@ -1,21 +1,22 @@
1
1
  import { Direction } from "@rowsncolumns/grid";
2
- import { isNil, localizeErrorValue, } from "@rowsncolumns/utils";
2
+ import { getExtendedValueNumber, getExtendedValueString, isNil, isNilOrBlank, localizeErrorValue, } from "@rowsncolumns/utils";
3
3
  import { sparklineGroupAxisFor } from "../components/cell-structured/sparkline-math";
4
4
  import React, { useCallback } from "react";
5
5
  import { getHeaderFill } from "../api/colors";
6
6
  import { showValidationDropdownArrow } from "../api/validation";
7
- import { alignmentImpliesWrap, isFillAlignment, } from "../components/cell/alignment";
7
+ import { alignmentImpliesWrap, isFillAlignment, resolveCanvasVerticalAlign, verticalAlignmentImpliesWrap, } from "../components/cell/alignment";
8
8
  import { CellBackground } from "../components/cell/cell-background";
9
9
  import { CellBackgrounds } from "../components/cell/cell-backgrounds";
10
+ import { getCellNumberFormatLayout } from "../components/cell/number-format-layout";
10
11
  import { CellDiff as CellDiffRenderer } from "../components/cell-diff";
11
12
  import { CellOverlayRenderer } from "../components/cell-overlay";
12
13
  import { DEFAULT_ARRAY } from "../config";
13
- import { convertBorderStyleToDashArray, normalizeDisplayText, } from "../helpers";
14
+ import { convertBorderStyleToDashArray, getBorderStyleWidth, normalizeDisplayText, } from "../helpers";
14
15
  import { getCellBordersForRendering } from "../helpers/merged-cell-borders";
15
16
  import { getStringifiedColor } from "../themes";
16
17
  import { applyShowZeros } from "./show-zeros";
17
18
  import { useCellDiffHighlight } from "./use-cell-diff-highlight";
18
- export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRowHeader, isColumnHeader, selectedRows, selectedColumns, selectedRowHeaders, selectedColumnHeaders, cellBackgroundColor, headerBorderColor, headerBackgroundColor, headerColor, headerActiveBackgroundColor, headerSelectedBackgroundColor, headerSelectedColor, headerTableBackgroundColor, headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor, chipBackgroundColor, filterIconColor, showCalculatedColumnIcon, enableTextOverflow, showHeaders, theme, getDefaultHorizontalAlignment, isTableFilterVisible, columnContainsTable, rowsContainsTable, canOverflowToNextCell, getTableHeaderSortOrder, getDataValidation, getErrorValue, formulaLocale, getEffectiveValue, getSparklineGroup, getFormattedValue, getNote, getComment, getEffectiveCellFormat, getCellBounds, getCellImageUrl, getCellMetaType, getRowHeaderText, getColumnHeaderText, getMaximumOverflowTextWidth, getTextDimension, getCellGroupingInfo, getTextFormatRuns, onRequestEdit, onFilterClick, onCheckboxClick, isTableHeader, isTableTotalsCell, onTotalsArrowClick, isCalculatedColumnHeader, isTableHeaderFilterActive, HeaderCell, Cell, StructuredResult, gridLineWidth, showNotes, showComments, defaultFontSizePoint, lineHeightMode, readonly, onExpandCollapse, onOverflow, isComparing = false, getCellDiff, }) => {
19
+ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRowHeader, isColumnHeader, selectedRows, selectedColumns, selectedRowHeaders, selectedColumnHeaders, cellBackgroundColor, headerBorderColor, headerBackgroundColor, headerColor, headerActiveBackgroundColor, headerSelectedBackgroundColor, headerSelectedColor, headerTableBackgroundColor, headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor, chipBackgroundColor, filterIconColor, showCalculatedColumnIcon, enableTextOverflow, showHeaders, theme, getDefaultHorizontalAlignment, isTableFilterVisible, columnContainsTable, rowsContainsTable, canOverflowToNextCell, getTableHeaderSortOrder, getDataValidation, getErrorValue, formulaLocale, locale, getEffectiveValue, getSparklineGroup, getFormattedValue, getNote, getComment, getEffectiveCellFormat, getCellBounds, getCellImageUrl, getCellMetaType, getRowHeaderText, getColumnHeaderText, getMaximumOverflowTextWidth, getCenterAcrossSelectionSpan, activeCell, getTextDimension, getCellGroupingInfo, getTextFormatRuns, onRequestEdit, onFilterClick, onCheckboxClick, isTableHeader, isTableTotalsCell, onTotalsArrowClick, isCalculatedColumnHeader, isTableHeaderFilterActive, HeaderCell, Cell, StructuredResult, gridLineWidth, showNotes, showComments, defaultFontSizePoint, lineHeightMode, readonly, onExpandCollapse, onOverflow, isComparing = false, getCellDiff, }) => {
19
20
  // Version comparison diff highlighting - only active when isComparing is true
20
21
  const { mergeCellFormatWithDiff, getDiffHighlight } = useCellDiffHighlight(isComparing ? getCellDiff : undefined);
21
22
  // Edit
@@ -28,7 +29,12 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
28
29
  const effectiveCellFormat = getEffectiveCellFormat(sheetId, rowIndex, columnIndex);
29
30
  // Checkbox for boolean values (Checkbox icon)
30
31
  const effectiveValue = getEffectiveValue(sheetId, rowIndex, columnIndex);
31
- const formattedValue = applyShowZeros(rawFormattedValue, effectiveValue, showZeros);
32
+ // "Show Bar Only" / "Show Icon Only" conditional formats hide the value.
33
+ const hideConditionalValue = Boolean(effectiveCellFormat?.conditionalDataBar?.hideValue ||
34
+ effectiveCellFormat?.conditionalIcon?.hideValue);
35
+ const formattedValue = hideConditionalValue
36
+ ? ""
37
+ : applyShowZeros(rawFormattedValue, effectiveValue, showZeros);
32
38
  const dataValidation = getDataValidation(sheetId, rowIndex, columnIndex);
33
39
  const validationType = dataValidation?.condition?.type;
34
40
  const horizontalAlignment = effectiveCellFormat?.horizontalAlignment;
@@ -43,7 +49,13 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
43
49
  // Show dropdown arrow: a data-validation list, or a table totals cell
44
50
  // whose arrow opens the totals-function picker.
45
51
  const showTotalsArrow = !showFilter && !!isTableTotalsCell?.(rowIndex, columnIndex);
46
- const showArrow = showValidationDropdownArrow(dataValidation) || showTotalsArrow;
52
+ // Excel shows a list's in-cell dropdown button only beside the active
53
+ // cell, outside its right edge — it never takes room from the value.
54
+ const showValidationArrow = !showTotalsArrow &&
55
+ activeCell?.rowIndex === rowIndex &&
56
+ activeCell?.columnIndex === columnIndex &&
57
+ showValidationDropdownArrow(dataValidation);
58
+ const showArrow = showValidationArrow || showTotalsArrow;
47
59
  // Has notes
48
60
  const showNote = showNotes
49
61
  ? !!getNote(sheetId, rowIndex, columnIndex)
@@ -60,7 +72,8 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
60
72
  // repeats the text to the cell edge — none of them ever spill into
61
73
  // the neighbouring cells.
62
74
  const wrapStrategy = effectiveCellFormat?.wrapStrategy;
63
- const wrapsByAlignment = alignmentImpliesWrap(horizontalAlignment);
75
+ const wrapsByAlignment = alignmentImpliesWrap(horizontalAlignment) ||
76
+ verticalAlignmentImpliesWrap(effectiveCellFormat?.verticalAlignment);
64
77
  const fillsCell = isFillAlignment(horizontalAlignment);
65
78
  const shouldWrap = wrapStrategy === "wrap" || wrapsByAlignment;
66
79
  const isWrapEnabled = (wrapStrategy ?? "overflow") === "overflow" &&
@@ -81,30 +94,44 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
81
94
  Number.isFinite(numericRotation) &&
82
95
  numericRotation !== 0;
83
96
  const containsTextInside = !!effectiveCellFormat?.shrinkToFit || hasNumericRotation;
84
- const shouldOverflow = enableTextOverflow &&
97
+ const isCentered = horizontalAlignment === "center";
98
+ const isCenterAcross = horizontalAlignment === "centerContinuous";
99
+ const canSpill = enableTextOverflow &&
85
100
  isWrapEnabled &&
86
- !dataValidation &&
87
101
  !showFilter &&
88
102
  !isCalculatedColumn &&
89
- !showArrow &&
103
+ !showTotalsArrow &&
90
104
  !expandable &&
91
105
  !containsTextInside &&
92
106
  // Following Excel and Google sheets behavior
93
107
  // Text does not overflow merged cells
94
- !isMergedCell &&
95
- (isRightAligned ? isStringValue : true) &&
96
- canOverflowToNextCell({
97
- rowIndex,
98
- columnIndex: columnIndex + (isRightAligned ? -1 : 1),
99
- });
100
- const [cellWidth, columnSpans] = shouldOverflow
101
- ? getMaximumOverflowTextWidth(displayFormattedValue, sheetId, rowIndex, columnIndex,
102
- // Investigate why isHiddenCell and the instance from Sheet-Grid differs
103
- canOverflowToNextCell, effectiveCellFormat?.textFormat, shouldWrap, isRightAligned ? Direction.Left : Direction.Right)
104
- : [
105
- props.width,
106
- DEFAULT_ARRAY,
107
- ];
108
+ !isMergedCell;
109
+ // Center Across Selection: the text centres over the run of empty
110
+ // neighbours that share the alignment, however short it is.
111
+ const centerAcrossSpan = canSpill && isCenterAcross && !isNilOrBlank(displayFormattedValue)
112
+ ? getCenterAcrossSelectionSpan?.(sheetId, rowIndex, columnIndex)
113
+ : undefined;
114
+ const shouldOverflow = !!centerAcrossSpan ||
115
+ (canSpill &&
116
+ (isRightAligned ? isStringValue : true) &&
117
+ (isCentered
118
+ ? canOverflowToNextCell({ rowIndex, columnIndex: columnIndex - 1 }) ||
119
+ canOverflowToNextCell({ rowIndex, columnIndex: columnIndex + 1 })
120
+ : canOverflowToNextCell({
121
+ rowIndex,
122
+ columnIndex: columnIndex + (isRightAligned ? -1 : 1),
123
+ })));
124
+ const [cellWidth, columnSpans, overflowLeft] = centerAcrossSpan
125
+ ? centerAcrossSpan
126
+ : shouldOverflow
127
+ ? getMaximumOverflowTextWidth(displayFormattedValue, sheetId, rowIndex, columnIndex,
128
+ // Investigate why isHiddenCell and the instance from Sheet-Grid differs
129
+ canOverflowToNextCell, effectiveCellFormat?.textFormat, shouldWrap, isRightAligned ? Direction.Left : Direction.Right, isCentered)
130
+ : [
131
+ props.width,
132
+ DEFAULT_ARRAY,
133
+ undefined,
134
+ ];
108
135
  if (shouldOverflow && cellWidth > props.width) {
109
136
  // Report the full visual width as the required buffer
110
137
  // This ensures that even if we scroll to the far right of the overflow,
@@ -164,9 +191,17 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
164
191
  const oldValueWidth = diffHighlight.oldFormattedValue
165
192
  ? getTextDimension(sheetId, rowIndex, columnIndex, diffHighlight.oldFormattedValue, diffHighlight.oldFormat?.textFormat ?? undefined).width
166
193
  : undefined;
167
- return (React.createElement(CellDiffRenderer, { diffHighlight: diffHighlight, value: formattedValue, defaultColor: textColor, scale: scale, fontSizePt: defaultFontSizePoint, fontFamily: effectiveCellFormat?.textFormat?.fontFamily, bold: effectiveCellFormat?.textFormat?.bold, italic: effectiveCellFormat?.textFormat?.italic, horizontalAlignment: effectiveCellFormat?.horizontalAlignment, verticalAlignment: effectiveCellFormat?.verticalAlignment, oldValueWidth: oldValueWidth, ...props }));
194
+ return (React.createElement(CellDiffRenderer, { diffHighlight: diffHighlight, value: formattedValue, defaultColor: textColor, scale: scale, fontSizePt: defaultFontSizePoint, fontFamily: effectiveCellFormat?.textFormat?.fontFamily, bold: effectiveCellFormat?.textFormat?.bold, italic: effectiveCellFormat?.textFormat?.italic, horizontalAlignment: effectiveCellFormat?.horizontalAlignment, verticalAlignment: effectiveCellFormat?.verticalAlignment
195
+ ? resolveCanvasVerticalAlign(effectiveCellFormat.verticalAlignment)
196
+ : undefined, oldValueWidth: oldValueWidth, ...props }));
168
197
  }
169
- return (React.createElement(Cell, { value: displayValue, cellFormat: effectiveCellFormat, scale: scale, defaultBackgroundColor: cellBackgroundColor, onRequestEdit: onRequestEditCell, onArrowClick: showTotalsArrow ? onTotalsArrowClick : undefined, showArrow: showArrow, showFilter: showFilter, isCalculatedColumn: isCalculatedColumn, showCheckbox: showCheckbox, showChip: showChip, chipBackgroundColor: chipBackgroundColor, filterIconColor: filterIconColor, onFilterClick: onFilterClick, onCheckboxClick: onCheckboxClick, isChecked: isChecked, isInvalid: isInvalid, isError: isError, imageUrl: imageUrl, isFilterActive: isFilterActive, enableOverflow: enableOverflow, cellWidth: cellWidth, showNote: showNote, showComment: showComment, showCalculatedColumnIcon: showCalculatedColumnIcon, theme: theme, expandable: expandable, expanded: expanded, textWidth: textWidth, columnSpans: columnSpans, overflowRight: overflowRight, showGridLines: showGridLines, structuredValue: effectiveValue?.structuredValue, sparklineGroupAxis: effectiveValue?.structuredValue?.kind === "sparkline" &&
198
+ const numberFormatLayout = isError
199
+ ? undefined
200
+ : getCellNumberFormatLayout(effectiveCellFormat?.numberFormat?.pattern, getExtendedValueNumber(effectiveValue) ??
201
+ getExtendedValueString(effectiveValue), displayValue, locale);
202
+ return (React.createElement(Cell, { value: displayValue, numberFormatLayout: numberFormatLayout, cellFormat: effectiveCellFormat, scale: scale, defaultBackgroundColor: cellBackgroundColor, onRequestEdit: onRequestEditCell, onArrowClick: showTotalsArrow ? onTotalsArrowClick : undefined, showArrow: showArrow, arrowOutside: showValidationArrow, showFilter: showFilter, isCalculatedColumn: isCalculatedColumn, showCheckbox: showCheckbox, showChip: showChip, chipBackgroundColor: chipBackgroundColor, filterIconColor: filterIconColor, onFilterClick: onFilterClick, onCheckboxClick: onCheckboxClick, isChecked: isChecked, isInvalid: isInvalid, isError: isError, imageUrl: imageUrl, isFilterActive: isFilterActive, enableOverflow: enableOverflow, cellWidth: cellWidth, showNote: showNote, showComment: showComment, showCalculatedColumnIcon: showCalculatedColumnIcon, theme: theme, expandable: expandable, expanded: expanded, textWidth: textWidth, columnSpans: columnSpans, overflowRight: overflowRight, overflowLeft: enableOverflow && (isCentered || centerAcrossSpan)
203
+ ? overflowLeft ?? 0
204
+ : undefined, centerOnSpan: !!centerAcrossSpan, showGridLines: showGridLines, structuredValue: effectiveValue?.structuredValue, sparklineGroupAxis: effectiveValue?.structuredValue?.kind === "sparkline" &&
170
205
  getSparklineGroup
171
206
  ? sparklineGroupAxisFor(effectiveValue.structuredValue, () => getSparklineGroup(sheetId, { rowIndex, columnIndex }), (cell) => getEffectiveValue(sheetId, cell.rowIndex, cell.columnIndex)
172
207
  ?.structuredValue)
@@ -176,6 +211,7 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
176
211
  sheetId,
177
212
  scale,
178
213
  showGridLines,
214
+ showZeros,
179
215
  theme,
180
216
  showNotes,
181
217
  showComments,
@@ -195,6 +231,7 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
195
231
  getDataValidation,
196
232
  getErrorValue,
197
233
  formulaLocale,
234
+ locale,
198
235
  getEffectiveValue,
199
236
  getSparklineGroup,
200
237
  getFormattedValue,
@@ -204,6 +241,8 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
204
241
  getNote,
205
242
  getComment,
206
243
  getMaximumOverflowTextWidth,
244
+ getCenterAcrossSelectionSpan,
245
+ activeCell,
207
246
  getCellGroupingInfo,
208
247
  onCheckboxClick,
209
248
  onFilterClick,
@@ -298,27 +337,27 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
298
337
  const strokeDiagonalUpStyle = borders?.diagonalUp?.style;
299
338
  const strokeDiagonalDownStyle = borders?.diagonalDown?.style;
300
339
  /* Border width */
301
- const strokeTopWidth = (strokeTopStyle === "double" ? 3 : borders?.top?.width ?? 0) * scale;
302
- const strokeBottomWidth = (strokeBottomStyle === "double" ? 3 : borders?.bottom?.width ?? 0) *
340
+ const strokeTopWidth = (strokeTopStyle === "double" ? 3 : getBorderStyleWidth(borders?.top?.style, borders?.top?.width)) * scale;
341
+ const strokeBottomWidth = (strokeBottomStyle === "double" ? 3 : getBorderStyleWidth(borders?.bottom?.style, borders?.bottom?.width)) *
303
342
  scale;
304
- const strokeLeftWidth = (strokeLeftStyle === "double" ? 3 : borders?.left?.width ?? 0) * scale;
305
- const strokeRightWidth = (strokeRightStyle === "double" ? 3 : borders?.right?.width ?? 0) *
343
+ const strokeLeftWidth = (strokeLeftStyle === "double" ? 3 : getBorderStyleWidth(borders?.left?.style, borders?.left?.width)) * scale;
344
+ const strokeRightWidth = (strokeRightStyle === "double" ? 3 : getBorderStyleWidth(borders?.right?.style, borders?.right?.width)) *
306
345
  scale;
307
346
  const strokeDiagonalUpWidth = (strokeDiagonalUpStyle === "double"
308
347
  ? 3
309
- : borders?.diagonalUp?.width ?? 0) * scale;
348
+ : getBorderStyleWidth(borders?.diagonalUp?.style, borders?.diagonalUp?.width)) * scale;
310
349
  const strokeDiagonalDownWidth = (strokeDiagonalDownStyle === "double"
311
350
  ? 3
312
- : borders?.diagonalDown?.width ?? 0) * scale;
351
+ : getBorderStyleWidth(borders?.diagonalDown?.style, borders?.diagonalDown?.width)) * scale;
313
352
  // Double inset
314
353
  const strokeDoubleInsetWidth = 1 * scale;
315
354
  /* Border style */
316
- const strokeTopDash = convertBorderStyleToDashArray(borders?.top?.style);
317
- const strokeBottomDash = convertBorderStyleToDashArray(borders?.bottom?.style);
318
- const strokeLeftDash = convertBorderStyleToDashArray(borders?.left?.style);
319
- const strokeRightDash = convertBorderStyleToDashArray(borders?.right?.style);
320
- const strokeDiagonalUpDash = convertBorderStyleToDashArray(borders?.diagonalUp?.style);
321
- const strokeDiagonalDownDash = convertBorderStyleToDashArray(borders?.diagonalDown?.style);
355
+ const strokeTopDash = convertBorderStyleToDashArray(borders?.top?.style, scale);
356
+ const strokeBottomDash = convertBorderStyleToDashArray(borders?.bottom?.style, scale);
357
+ const strokeLeftDash = convertBorderStyleToDashArray(borders?.left?.style, scale);
358
+ const strokeRightDash = convertBorderStyleToDashArray(borders?.right?.style, scale);
359
+ const strokeDiagonalUpDash = convertBorderStyleToDashArray(borders?.diagonalUp?.style, scale);
360
+ const strokeDiagonalDownDash = convertBorderStyleToDashArray(borders?.diagonalDown?.style, scale);
322
361
  return CellOverlayRenderer({
323
362
  ...props,
324
363
  strokeDoubleInsetWidth,
@@ -344,6 +383,8 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
344
383
  strokeBottomStyle,
345
384
  strokeLeftStyle,
346
385
  strokeRightStyle,
386
+ strokeDiagonalUpStyle,
387
+ strokeDiagonalDownStyle,
347
388
  cellBackgroundColor: finalCellBackgroundColor,
348
389
  });
349
390
  }, [
@@ -367,11 +408,11 @@ export const useCellRenderer = ({ sheetId, scale, showGridLines, showZeros, isRo
367
408
  */
368
409
  const fillPattern = effectiveCellFormat?.fillPattern ?? null;
369
410
  const gradient = effectiveCellFormat?.gradient ?? null;
370
- const hasPaintedPattern = fillPattern && fillPattern !== "none" && fillPattern !== "solid"
411
+ // A pattern with no colour of its own paints in Excel's Automatic
412
+ // (black); a solid pattern needs its foreground.
413
+ const hasPaintedPattern = fillPattern === "solid"
371
414
  ? !!effectiveCellFormat?.foregroundColor
372
- : fillPattern === "solid"
373
- ? !!effectiveCellFormat?.foregroundColor
374
- : false;
415
+ : !!fillPattern && fillPattern !== "none";
375
416
  const hasGradient = !!gradient && (gradient.stops?.length ?? 0) > 0;
376
417
  const showFillRectange = !isNil(effectiveCellFormat?.backgroundColor) ||
377
418
  isMergedCell ||
@@ -1,4 +1,5 @@
1
1
  import { type GridRange } from "@rowsncolumns/grid";
2
+ import { type CfRangeStats } from "../api/cf-overlays";
2
3
  import type { CanvasGridProps, SpreadsheetTheme } from "../components/canvas-grid/typings";
3
4
  import type { CellData, CellFormat, ConditionalFormatRule, CustomFormulaResult } from "../types";
4
5
  /**
@@ -38,6 +39,17 @@ export type UseConditionalFormattingProps<T extends CellData> = {
38
39
  * JS computation. Omit for engine-free documents.
39
40
  */
40
41
  getConditionalFormatResult?: (sheetId: number, rowIndex: number, columnIndex: number, ruleId: ConditionalFormatRule["id"]) => unknown;
42
+ /**
43
+ * Whole-range statistics of a rule's numeric covered cells, for hosts whose
44
+ * cell data is windowed (an engine that only streams the visible slice).
45
+ * Used for rules cut to the evaluation window, so data bars, colour
46
+ * scales, icon sets, top/bottom-N and averages resolve over the rule's
47
+ * full range. Return `sorted` for percentile / rank thresholds. Hosts
48
+ * should cache per rule and invalidate on edit; without this prop the
49
+ * hook computes the statistics itself from `getValidationValue` and
50
+ * caches them per rule until the data changes.
51
+ */
52
+ getConditionalFormatRuleStats?: (sheetId: number, rule: ConditionalFormatRule) => CfRangeStats | null | undefined;
41
53
  };
42
- export declare const useConditionalFormatting: <T extends CellData>({ sheetId, theme, conditionalFormats, locale, getValidationValue, isNumberValue, getSheetRowCount, getSheetColumnCount, window: evaluationWindow, getConditionalFormatResult, }: UseConditionalFormattingProps<T>) => Map<string, CellFormat | undefined>;
54
+ export declare const useConditionalFormatting: <T extends CellData>({ sheetId, theme, conditionalFormats, locale, getValidationValue, isNumberValue, getSheetRowCount, getSheetColumnCount, window: evaluationWindow, getConditionalFormatResult, getConditionalFormatRuleStats, }: UseConditionalFormattingProps<T>) => Map<string, CellFormat | undefined>;
43
55
  //# sourceMappingURL=use-conditional-formatting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-conditional-formatting.d.ts","sourceRoot":"","sources":["../../../hooks/use-conditional-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAoBpE,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAGlB;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,UAAU,EAClB,OAAO,UAAU,KAChB,UAYF,CAAC;AAaF,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,gBAAgB,CAAC;IACxB,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,qBAAqB,KACzB,mBAAmB,CAAC;IACzB,aAAa,CACX,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IACX,gBAAgB,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACtD,mBAAmB,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;;;;;;;;OASG;IACH,0BAA0B,CAAC,EAAE,CAC3B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAChC,OAAO,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,QAAQ,EAAE,iLAW1D,6BAA6B,CAAC,CAAC,CAAC,wCA0pBlC,CAAC"}
1
+ {"version":3,"file":"use-conditional-formatting.d.ts","sourceRoot":"","sources":["../../../hooks/use-conditional-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAWpE,OAAO,EAIL,KAAK,YAAY,EAKlB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,UAAU,EAClB,OAAO,UAAU,KAChB,UAYF,CAAC;AAmCF,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,gBAAgB,CAAC;IACxB,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,qB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