@rowsncolumns/spreadsheet 10.5.17 → 10.6.4
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/cjs/api/cf-data-bar.d.ts +73 -0
- package/dist/cjs/api/cf-data-bar.d.ts.map +1 -0
- package/dist/cjs/api/cf-data-bar.js +182 -0
- package/dist/cjs/api/cf-icons.d.ts +73 -0
- package/dist/cjs/api/cf-icons.d.ts.map +1 -0
- package/dist/cjs/api/cf-icons.js +322 -0
- package/dist/cjs/api/cf-overlays.d.ts +89 -3
- package/dist/cjs/api/cf-overlays.d.ts.map +1 -1
- package/dist/cjs/api/cf-overlays.js +256 -80
- package/dist/cjs/api/cf-priority.d.ts +34 -0
- package/dist/cjs/api/cf-priority.d.ts.map +1 -0
- package/dist/cjs/api/cf-priority.js +94 -0
- package/dist/cjs/api/heatmap.d.ts +7 -1
- package/dist/cjs/api/heatmap.d.ts.map +1 -1
- package/dist/cjs/api/heatmap.js +27 -11
- package/dist/cjs/api/selections.d.ts +2 -2
- package/dist/cjs/api/validation.d.ts +6 -0
- package/dist/cjs/api/validation.d.ts.map +1 -1
- package/dist/cjs/api/validation.js +10 -1
- package/dist/cjs/atoms/goal-seek-dialog.atom.d.ts +8 -3
- package/dist/cjs/atoms/goal-seek-dialog.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/index.d.ts +4 -0
- package/dist/cjs/atoms/index.d.ts.map +1 -1
- package/dist/cjs/atoms/index.js +4 -0
- package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/cjs/components/canvas-grid/index.js +194 -51
- package/dist/cjs/components/canvas-grid/overflow.d.ts +37 -0
- package/dist/cjs/components/canvas-grid/overflow.d.ts.map +1 -0
- package/dist/cjs/components/canvas-grid/overflow.js +49 -0
- package/dist/cjs/components/canvas-grid/page-breaks.d.ts +15 -0
- package/dist/cjs/components/canvas-grid/page-breaks.d.ts.map +1 -0
- package/dist/cjs/components/canvas-grid/page-breaks.js +77 -0
- package/dist/cjs/components/canvas-grid/typings.d.ts +32 -3
- package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.d.ts +58 -1
- package/dist/cjs/components/cell/alignment.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.js +144 -1
- package/dist/cjs/components/cell/cell-background.d.ts +2 -0
- package/dist/cjs/components/cell/cell-background.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-background.js +5 -6
- package/dist/cjs/components/cell/cell-backgrounds.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-backgrounds.js +5 -1
- package/dist/cjs/components/cell/cell-text-runs.js +1 -1
- package/dist/cjs/components/cell/index.d.ts.map +1 -1
- package/dist/cjs/components/cell/index.js +378 -37
- package/dist/cjs/components/cell/number-format-layout.d.ts +35 -0
- package/dist/cjs/components/cell/number-format-layout.d.ts.map +1 -0
- package/dist/cjs/components/cell/number-format-layout.js +106 -0
- package/dist/cjs/components/cell/typings.d.ts +22 -0
- package/dist/cjs/components/cell/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/index.js +2 -2
- package/dist/cjs/components/cell-filter/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-filter/index.js +3 -3
- package/dist/cjs/components/cell-overlay/index.d.ts +20 -0
- package/dist/cjs/components/cell-overlay/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-overlay/index.js +155 -28
- package/dist/cjs/components/cf-icon-preview/index.d.ts +16 -0
- package/dist/cjs/components/cf-icon-preview/index.d.ts.map +1 -0
- package/dist/cjs/components/cf-icon-preview/index.js +48 -0
- package/dist/cjs/components/context-menu/index.d.ts.map +1 -1
- package/dist/cjs/components/context-menu/index.js +11 -3
- package/dist/cjs/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/cjs/components/embeds/embed-component.js +3 -2
- package/dist/cjs/components/goal-seek-dialog/index.d.ts +15 -5
- package/dist/cjs/components/goal-seek-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/goal-seek-dialog/index.js +145 -42
- package/dist/cjs/components/hidden-markers/index.d.ts.map +1 -1
- package/dist/cjs/components/hidden-markers/index.js +8 -7
- package/dist/cjs/components/hidden-markers/style.d.ts +7 -0
- package/dist/cjs/components/hidden-markers/style.d.ts.map +1 -1
- package/dist/cjs/components/hidden-markers/style.js +13 -2
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts +67 -0
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/protect-sheet-dialog/index.js +196 -0
- package/dist/cjs/components/toolbar/types.d.ts +1 -1
- package/dist/cjs/components/toolbar/types.d.ts.map +1 -1
- package/dist/cjs/config.d.ts +13 -1
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +15 -3
- package/dist/cjs/helpers.d.ts +10 -5
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +43 -31
- package/dist/cjs/hooks/use-border-styles.d.ts.map +1 -1
- package/dist/cjs/hooks/use-border-styles.js +5 -28
- package/dist/cjs/hooks/use-cell-renderer.d.ts +35 -3
- package/dist/cjs/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/cjs/hooks/use-cell-renderer.js +85 -47
- package/dist/cjs/hooks/use-conditional-formatting.d.ts +13 -1
- package/dist/cjs/hooks/use-conditional-formatting.d.ts.map +1 -1
- package/dist/cjs/hooks/use-conditional-formatting.js +281 -230
- package/dist/cjs/index.d.ts +7 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/release-date.js +1 -1
- package/dist/cjs/themes.d.ts +8 -0
- package/dist/cjs/themes.d.ts.map +1 -1
- package/dist/cjs/themes.js +21 -3
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +115 -5
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/api/cf-data-bar.d.ts +73 -0
- package/dist/esm/api/cf-data-bar.d.ts.map +1 -0
- package/dist/esm/api/cf-data-bar.js +178 -0
- package/dist/esm/api/cf-icons.d.ts +73 -0
- package/dist/esm/api/cf-icons.d.ts.map +1 -0
- package/dist/esm/api/cf-icons.js +306 -0
- package/dist/esm/api/cf-overlays.d.ts +89 -3
- package/dist/esm/api/cf-overlays.d.ts.map +1 -1
- package/dist/esm/api/cf-overlays.js +223 -67
- package/dist/esm/api/cf-priority.d.ts +34 -0
- package/dist/esm/api/cf-priority.d.ts.map +1 -0
- package/dist/esm/api/cf-priority.js +61 -0
- package/dist/esm/api/heatmap.d.ts +7 -1
- package/dist/esm/api/heatmap.d.ts.map +1 -1
- package/dist/esm/api/heatmap.js +24 -9
- package/dist/esm/api/selections.d.ts +2 -2
- package/dist/esm/api/validation.d.ts +6 -0
- package/dist/esm/api/validation.d.ts.map +1 -1
- package/dist/esm/api/validation.js +6 -0
- package/dist/esm/atoms/goal-seek-dialog.atom.d.ts +8 -3
- package/dist/esm/atoms/goal-seek-dialog.atom.d.ts.map +1 -1
- package/dist/esm/atoms/index.d.ts +4 -0
- package/dist/esm/atoms/index.d.ts.map +1 -1
- package/dist/esm/atoms/index.js +4 -0
- package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/esm/components/canvas-grid/index.js +163 -47
- package/dist/esm/components/canvas-grid/overflow.d.ts +37 -0
- package/dist/esm/components/canvas-grid/overflow.d.ts.map +1 -0
- package/dist/esm/components/canvas-grid/overflow.js +39 -0
- package/dist/esm/components/canvas-grid/page-breaks.d.ts +15 -0
- package/dist/esm/components/canvas-grid/page-breaks.d.ts.map +1 -0
- package/dist/esm/components/canvas-grid/page-breaks.js +50 -0
- package/dist/esm/components/canvas-grid/typings.d.ts +32 -3
- package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.d.ts +58 -1
- package/dist/esm/components/cell/alignment.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.js +110 -1
- package/dist/esm/components/cell/cell-background.d.ts +2 -0
- package/dist/esm/components/cell/cell-background.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-background.js +4 -5
- package/dist/esm/components/cell/cell-backgrounds.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-backgrounds.js +5 -1
- package/dist/esm/components/cell/cell-text-runs.js +2 -2
- package/dist/esm/components/cell/index.d.ts.map +1 -1
- package/dist/esm/components/cell/index.js +339 -39
- package/dist/esm/components/cell/number-format-layout.d.ts +35 -0
- package/dist/esm/components/cell/number-format-layout.d.ts.map +1 -0
- package/dist/esm/components/cell/number-format-layout.js +99 -0
- package/dist/esm/components/cell/typings.d.ts +22 -0
- package/dist/esm/components/cell/typings.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/index.js +2 -2
- package/dist/esm/components/cell-filter/index.d.ts.map +1 -1
- package/dist/esm/components/cell-filter/index.js +4 -4
- package/dist/esm/components/cell-overlay/index.d.ts +20 -0
- package/dist/esm/components/cell-overlay/index.d.ts.map +1 -1
- package/dist/esm/components/cell-overlay/index.js +111 -25
- package/dist/esm/components/cf-icon-preview/index.d.ts +16 -0
- package/dist/esm/components/cf-icon-preview/index.d.ts.map +1 -0
- package/dist/esm/components/cf-icon-preview/index.js +41 -0
- package/dist/esm/components/context-menu/index.d.ts.map +1 -1
- package/dist/esm/components/context-menu/index.js +11 -3
- package/dist/esm/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/esm/components/embeds/embed-component.js +4 -3
- package/dist/esm/components/goal-seek-dialog/index.d.ts +15 -5
- package/dist/esm/components/goal-seek-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/goal-seek-dialog/index.js +126 -29
- package/dist/esm/components/hidden-markers/index.d.ts.map +1 -1
- package/dist/esm/components/hidden-markers/index.js +9 -8
- package/dist/esm/components/hidden-markers/style.d.ts +7 -0
- package/dist/esm/components/hidden-markers/style.d.ts.map +1 -1
- package/dist/esm/components/hidden-markers/style.js +8 -1
- package/dist/esm/components/protect-sheet-dialog/index.d.ts +67 -0
- package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/protect-sheet-dialog/index.js +154 -0
- package/dist/esm/components/toolbar/types.d.ts +1 -1
- package/dist/esm/components/toolbar/types.d.ts.map +1 -1
- package/dist/esm/config.d.ts +13 -1
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +13 -1
- package/dist/esm/helpers.d.ts +10 -5
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +40 -28
- package/dist/esm/hooks/use-border-styles.d.ts.map +1 -1
- package/dist/esm/hooks/use-border-styles.js +5 -26
- package/dist/esm/hooks/use-cell-renderer.d.ts +35 -3
- package/dist/esm/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/esm/hooks/use-cell-renderer.js +83 -42
- package/dist/esm/hooks/use-conditional-formatting.d.ts +13 -1
- package/dist/esm/hooks/use-conditional-formatting.d.ts.map +1 -1
- package/dist/esm/hooks/use-conditional-formatting.js +215 -120
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +7 -0
- package/dist/esm/release-date.js +1 -1
- package/dist/esm/themes.d.ts +8 -0
- package/dist/esm/themes.d.ts.map +1 -1
- package/dist/esm/themes.js +20 -3
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +115 -5
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/spreadsheet.min.css +1 -1
- 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;
|
|
1
|
+
{"version":3,"file":"use-cell-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("../components/cell/alignment");
|
|
12
12
|
var cell_background_1 = require("../components/cell/cell-background");
|
|
13
13
|
var cell_backgrounds_1 = require("../components/cell/cell-backgrounds");
|
|
14
|
+
var number_format_layout_1 = require("../components/cell/number-format-layout");
|
|
14
15
|
var cell_diff_1 = require("../components/cell-diff");
|
|
15
16
|
var cell_overlay_1 = require("../components/cell-overlay");
|
|
16
17
|
var config_1 = require("../config");
|
|
@@ -20,13 +21,13 @@ var themes_1 = require("../themes");
|
|
|
20
21
|
var show_zeros_1 = require("./show-zeros");
|
|
21
22
|
var use_cell_diff_highlight_1 = require("./use-cell-diff-highlight");
|
|
22
23
|
var useCellRenderer = function (_a) {
|
|
23
|
-
var sheetId = _a.sheetId, scale = _a.scale, showGridLines = _a.showGridLines, showZeros = _a.showZeros, isRowHeader = _a.isRowHeader, isColumnHeader = _a.isColumnHeader, selectedRows = _a.selectedRows, selectedColumns = _a.selectedColumns, selectedRowHeaders = _a.selectedRowHeaders, selectedColumnHeaders = _a.selectedColumnHeaders, cellBackgroundColor = _a.cellBackgroundColor, headerBorderColor = _a.headerBorderColor, headerBackgroundColor = _a.headerBackgroundColor, headerColor = _a.headerColor, headerActiveBackgroundColor = _a.headerActiveBackgroundColor, headerSelectedBackgroundColor = _a.headerSelectedBackgroundColor, headerSelectedColor = _a.headerSelectedColor, headerTableBackgroundColor = _a.headerTableBackgroundColor, headerTableActiveBackgroundColor = _a.headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor = _a.headerTableSelectedBackgroundColor, chipBackgroundColor = _a.chipBackgroundColor, filterIconColor = _a.filterIconColor, showCalculatedColumnIcon = _a.showCalculatedColumnIcon, enableTextOverflow = _a.enableTextOverflow, showHeaders = _a.showHeaders, theme = _a.theme, getDefaultHorizontalAlignment = _a.getDefaultHorizontalAlignment, isTableFilterVisible = _a.isTableFilterVisible, columnContainsTable = _a.columnContainsTable, rowsContainsTable = _a.rowsContainsTable, canOverflowToNextCell = _a.canOverflowToNextCell, getTableHeaderSortOrder = _a.getTableHeaderSortOrder, getDataValidation = _a.getDataValidation, getErrorValue = _a.getErrorValue, formulaLocale = _a.formulaLocale, getEffectiveValue = _a.getEffectiveValue, getSparklineGroup = _a.getSparklineGroup, getFormattedValue = _a.getFormattedValue, getNote = _a.getNote, getComment = _a.getComment, getEffectiveCellFormat = _a.getEffectiveCellFormat, getCellBounds = _a.getCellBounds, getCellImageUrl = _a.getCellImageUrl, getCellMetaType = _a.getCellMetaType, getRowHeaderText = _a.getRowHeaderText, getColumnHeaderText = _a.getColumnHeaderText, getMaximumOverflowTextWidth = _a.getMaximumOverflowTextWidth, getTextDimension = _a.getTextDimension, getCellGroupingInfo = _a.getCellGroupingInfo, getTextFormatRuns = _a.getTextFormatRuns, onRequestEdit = _a.onRequestEdit, onFilterClick = _a.onFilterClick, onCheckboxClick = _a.onCheckboxClick, isTableHeader = _a.isTableHeader, isTableTotalsCell = _a.isTableTotalsCell, onTotalsArrowClick = _a.onTotalsArrowClick, isCalculatedColumnHeader = _a.isCalculatedColumnHeader, isTableHeaderFilterActive = _a.isTableHeaderFilterActive, HeaderCell = _a.HeaderCell, Cell = _a.Cell, StructuredResult = _a.StructuredResult, gridLineWidth = _a.gridLineWidth, showNotes = _a.showNotes, showComments = _a.showComments, defaultFontSizePoint = _a.defaultFontSizePoint, lineHeightMode = _a.lineHeightMode, readonly = _a.readonly, onExpandCollapse = _a.onExpandCollapse, onOverflow = _a.onOverflow, _b = _a.isComparing, isComparing = _b === void 0 ? false : _b, getCellDiff = _a.getCellDiff;
|
|
24
|
+
var sheetId = _a.sheetId, scale = _a.scale, showGridLines = _a.showGridLines, showZeros = _a.showZeros, isRowHeader = _a.isRowHeader, isColumnHeader = _a.isColumnHeader, selectedRows = _a.selectedRows, selectedColumns = _a.selectedColumns, selectedRowHeaders = _a.selectedRowHeaders, selectedColumnHeaders = _a.selectedColumnHeaders, cellBackgroundColor = _a.cellBackgroundColor, headerBorderColor = _a.headerBorderColor, headerBackgroundColor = _a.headerBackgroundColor, headerColor = _a.headerColor, headerActiveBackgroundColor = _a.headerActiveBackgroundColor, headerSelectedBackgroundColor = _a.headerSelectedBackgroundColor, headerSelectedColor = _a.headerSelectedColor, headerTableBackgroundColor = _a.headerTableBackgroundColor, headerTableActiveBackgroundColor = _a.headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor = _a.headerTableSelectedBackgroundColor, chipBackgroundColor = _a.chipBackgroundColor, filterIconColor = _a.filterIconColor, showCalculatedColumnIcon = _a.showCalculatedColumnIcon, enableTextOverflow = _a.enableTextOverflow, showHeaders = _a.showHeaders, theme = _a.theme, getDefaultHorizontalAlignment = _a.getDefaultHorizontalAlignment, isTableFilterVisible = _a.isTableFilterVisible, columnContainsTable = _a.columnContainsTable, rowsContainsTable = _a.rowsContainsTable, canOverflowToNextCell = _a.canOverflowToNextCell, getTableHeaderSortOrder = _a.getTableHeaderSortOrder, getDataValidation = _a.getDataValidation, getErrorValue = _a.getErrorValue, formulaLocale = _a.formulaLocale, locale = _a.locale, getEffectiveValue = _a.getEffectiveValue, getSparklineGroup = _a.getSparklineGroup, getFormattedValue = _a.getFormattedValue, getNote = _a.getNote, getComment = _a.getComment, getEffectiveCellFormat = _a.getEffectiveCellFormat, getCellBounds = _a.getCellBounds, getCellImageUrl = _a.getCellImageUrl, getCellMetaType = _a.getCellMetaType, getRowHeaderText = _a.getRowHeaderText, getColumnHeaderText = _a.getColumnHeaderText, getMaximumOverflowTextWidth = _a.getMaximumOverflowTextWidth, getCenterAcrossSelectionSpan = _a.getCenterAcrossSelectionSpan, activeCell = _a.activeCell, getTextDimension = _a.getTextDimension, getCellGroupingInfo = _a.getCellGroupingInfo, getTextFormatRuns = _a.getTextFormatRuns, onRequestEdit = _a.onRequestEdit, onFilterClick = _a.onFilterClick, onCheckboxClick = _a.onCheckboxClick, isTableHeader = _a.isTableHeader, isTableTotalsCell = _a.isTableTotalsCell, onTotalsArrowClick = _a.onTotalsArrowClick, isCalculatedColumnHeader = _a.isCalculatedColumnHeader, isTableHeaderFilterActive = _a.isTableHeaderFilterActive, HeaderCell = _a.HeaderCell, Cell = _a.Cell, StructuredResult = _a.StructuredResult, gridLineWidth = _a.gridLineWidth, showNotes = _a.showNotes, showComments = _a.showComments, defaultFontSizePoint = _a.defaultFontSizePoint, lineHeightMode = _a.lineHeightMode, readonly = _a.readonly, onExpandCollapse = _a.onExpandCollapse, onOverflow = _a.onOverflow, _b = _a.isComparing, isComparing = _b === void 0 ? false : _b, getCellDiff = _a.getCellDiff;
|
|
24
25
|
// Version comparison diff highlighting - only active when isComparing is true
|
|
25
26
|
var _c = (0, use_cell_diff_highlight_1.useCellDiffHighlight)(isComparing ? getCellDiff : undefined), mergeCellFormatWithDiff = _c.mergeCellFormatWithDiff, getDiffHighlight = _c.getDiffHighlight;
|
|
26
27
|
// Edit
|
|
27
28
|
var onRequestEditCell = (0, react_1.useCallback)(function (cell) { return onRequestEdit === null || onRequestEdit === void 0 ? void 0 : onRequestEdit(sheetId, cell); }, [sheetId, onRequestEdit]);
|
|
28
29
|
var cellRenderer = (0, react_1.useCallback)(function (props) {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
30
31
|
var rowIndex = props.rowIndex, columnIndex = props.columnIndex, isMergedCell = props.isMergedCell;
|
|
31
32
|
// Body cell
|
|
32
33
|
var rawFormattedValue = getFormattedValue(sheetId, rowIndex, columnIndex);
|
|
@@ -34,12 +35,17 @@ var useCellRenderer = function (_a) {
|
|
|
34
35
|
var effectiveCellFormat = getEffectiveCellFormat(sheetId, rowIndex, columnIndex);
|
|
35
36
|
// Checkbox for boolean values (Checkbox icon)
|
|
36
37
|
var effectiveValue = getEffectiveValue(sheetId, rowIndex, columnIndex);
|
|
37
|
-
|
|
38
|
+
// "Show Bar Only" / "Show Icon Only" conditional formats hide the value.
|
|
39
|
+
var hideConditionalValue = Boolean(((_a = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.conditionalDataBar) === null || _a === void 0 ? void 0 : _a.hideValue) ||
|
|
40
|
+
((_b = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.conditionalIcon) === null || _b === void 0 ? void 0 : _b.hideValue));
|
|
41
|
+
var formattedValue = hideConditionalValue
|
|
42
|
+
? ""
|
|
43
|
+
: (0, show_zeros_1.applyShowZeros)(rawFormattedValue, effectiveValue, showZeros);
|
|
38
44
|
var dataValidation = getDataValidation(sheetId, rowIndex, columnIndex);
|
|
39
|
-
var validationType = (
|
|
45
|
+
var validationType = (_c = dataValidation === null || dataValidation === void 0 ? void 0 : dataValidation.condition) === null || _c === void 0 ? void 0 : _c.type;
|
|
40
46
|
var horizontalAlignment = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.horizontalAlignment;
|
|
41
47
|
// Expandable
|
|
42
|
-
var
|
|
48
|
+
var _q = tslib_1.__read(getCellGroupingInfo(sheetId, rowIndex, columnIndex), 2), expandable = _q[0], expanded = _q[1];
|
|
43
49
|
// Display style
|
|
44
50
|
var showChip = getCellMetaType(sheetId, rowIndex, columnIndex) === "people";
|
|
45
51
|
// Image url
|
|
@@ -49,7 +55,13 @@ var useCellRenderer = function (_a) {
|
|
|
49
55
|
// Show dropdown arrow: a data-validation list, or a table totals cell
|
|
50
56
|
// whose arrow opens the totals-function picker.
|
|
51
57
|
var showTotalsArrow = !showFilter && !!(isTableTotalsCell === null || isTableTotalsCell === void 0 ? void 0 : isTableTotalsCell(rowIndex, columnIndex));
|
|
52
|
-
|
|
58
|
+
// Excel shows a list's in-cell dropdown button only beside the active
|
|
59
|
+
// cell, outside its right edge — it never takes room from the value.
|
|
60
|
+
var showValidationArrow = !showTotalsArrow &&
|
|
61
|
+
(activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowIndex) === rowIndex &&
|
|
62
|
+
(activeCell === null || activeCell === void 0 ? void 0 : activeCell.columnIndex) === columnIndex &&
|
|
63
|
+
(0, validation_1.showValidationDropdownArrow)(dataValidation);
|
|
64
|
+
var showArrow = showValidationArrow || showTotalsArrow;
|
|
53
65
|
// Has notes
|
|
54
66
|
var showNote = showNotes
|
|
55
67
|
? !!getNote(sheetId, rowIndex, columnIndex)
|
|
@@ -66,7 +78,8 @@ var useCellRenderer = function (_a) {
|
|
|
66
78
|
// repeats the text to the cell edge — none of them ever spill into
|
|
67
79
|
// the neighbouring cells.
|
|
68
80
|
var wrapStrategy = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.wrapStrategy;
|
|
69
|
-
var wrapsByAlignment = (0, alignment_1.alignmentImpliesWrap)(horizontalAlignment)
|
|
81
|
+
var wrapsByAlignment = (0, alignment_1.alignmentImpliesWrap)(horizontalAlignment) ||
|
|
82
|
+
(0, alignment_1.verticalAlignmentImpliesWrap)(effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.verticalAlignment);
|
|
70
83
|
var fillsCell = (0, alignment_1.isFillAlignment)(horizontalAlignment);
|
|
71
84
|
var shouldWrap = wrapStrategy === "wrap" || wrapsByAlignment;
|
|
72
85
|
var isWrapEnabled = (wrapStrategy !== null && wrapStrategy !== void 0 ? wrapStrategy : "overflow") === "overflow" &&
|
|
@@ -78,7 +91,7 @@ var useCellRenderer = function (_a) {
|
|
|
78
91
|
// Indent
|
|
79
92
|
var isRightAligned = horizontalAlignment === "right";
|
|
80
93
|
// Only strings which are right aligned can overflow to neighbours
|
|
81
|
-
var isStringValue = !(0, utils_1.isNil)((
|
|
94
|
+
var isStringValue = !(0, utils_1.isNil)((_d = effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.sv) !== null && _d !== void 0 ? _d : effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.stringValue);
|
|
82
95
|
var overflowRight = isRightAligned && isStringValue;
|
|
83
96
|
// shrinkToFit and rotated text both keep the text inside the cell,
|
|
84
97
|
// so they must not spill into neighbours regardless of wrapStrategy.
|
|
@@ -87,30 +100,44 @@ var useCellRenderer = function (_a) {
|
|
|
87
100
|
Number.isFinite(numericRotation) &&
|
|
88
101
|
numericRotation !== 0;
|
|
89
102
|
var containsTextInside = !!(effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.shrinkToFit) || hasNumericRotation;
|
|
90
|
-
var
|
|
103
|
+
var isCentered = horizontalAlignment === "center";
|
|
104
|
+
var isCenterAcross = horizontalAlignment === "centerContinuous";
|
|
105
|
+
var canSpill = enableTextOverflow &&
|
|
91
106
|
isWrapEnabled &&
|
|
92
|
-
!dataValidation &&
|
|
93
107
|
!showFilter &&
|
|
94
108
|
!isCalculatedColumn &&
|
|
95
|
-
!
|
|
109
|
+
!showTotalsArrow &&
|
|
96
110
|
!expandable &&
|
|
97
111
|
!containsTextInside &&
|
|
98
112
|
// Following Excel and Google sheets behavior
|
|
99
113
|
// Text does not overflow merged cells
|
|
100
|
-
!isMergedCell
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
!isMergedCell;
|
|
115
|
+
// Center Across Selection: the text centres over the run of empty
|
|
116
|
+
// neighbours that share the alignment, however short it is.
|
|
117
|
+
var centerAcrossSpan = canSpill && isCenterAcross && !(0, utils_1.isNilOrBlank)(displayFormattedValue)
|
|
118
|
+
? getCenterAcrossSelectionSpan === null || getCenterAcrossSelectionSpan === void 0 ? void 0 : getCenterAcrossSelectionSpan(sheetId, rowIndex, columnIndex)
|
|
119
|
+
: undefined;
|
|
120
|
+
var shouldOverflow = !!centerAcrossSpan ||
|
|
121
|
+
(canSpill &&
|
|
122
|
+
(isRightAligned ? isStringValue : true) &&
|
|
123
|
+
(isCentered
|
|
124
|
+
? canOverflowToNextCell({ rowIndex: rowIndex, columnIndex: columnIndex - 1 }) ||
|
|
125
|
+
canOverflowToNextCell({ rowIndex: rowIndex, columnIndex: columnIndex + 1 })
|
|
126
|
+
: canOverflowToNextCell({
|
|
127
|
+
rowIndex: rowIndex,
|
|
128
|
+
columnIndex: columnIndex + (isRightAligned ? -1 : 1),
|
|
129
|
+
})));
|
|
130
|
+
var _r = tslib_1.__read(centerAcrossSpan
|
|
131
|
+
? centerAcrossSpan
|
|
132
|
+
: shouldOverflow
|
|
133
|
+
? getMaximumOverflowTextWidth(displayFormattedValue, sheetId, rowIndex, columnIndex,
|
|
134
|
+
// Investigate why isHiddenCell and the instance from Sheet-Grid differs
|
|
135
|
+
canOverflowToNextCell, effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.textFormat, shouldWrap, isRightAligned ? grid_1.Direction.Left : grid_1.Direction.Right, isCentered)
|
|
136
|
+
: [
|
|
137
|
+
props.width,
|
|
138
|
+
config_1.DEFAULT_ARRAY,
|
|
139
|
+
undefined,
|
|
140
|
+
], 3), cellWidth = _r[0], columnSpans = _r[1], overflowLeft = _r[2];
|
|
114
141
|
if (shouldOverflow && cellWidth > props.width) {
|
|
115
142
|
// Report the full visual width as the required buffer
|
|
116
143
|
// This ensures that even if we scroll to the far right of the overflow,
|
|
@@ -146,7 +173,7 @@ var useCellRenderer = function (_a) {
|
|
|
146
173
|
var errorValue = getErrorValue(sheetId, rowIndex, columnIndex);
|
|
147
174
|
var isInvalid = (errorValue === null || errorValue === void 0 ? void 0 : errorValue.type) === "Invalid";
|
|
148
175
|
var showCheckbox = !errorValue && validationType === "BOOLEAN";
|
|
149
|
-
var isChecked = ((
|
|
176
|
+
var isChecked = ((_e = effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.bv) !== null && _e !== void 0 ? _e : effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.boolValue) === true;
|
|
150
177
|
// Error from formula calculation (Error icon). Both engines store the canonical spelling
|
|
151
178
|
// (`#VALUE!`); the grid paints the formula locale's (`#ЗНАЧ!`).
|
|
152
179
|
var isError = (errorValue === null || errorValue === void 0 ? void 0 : errorValue.type) === "Error";
|
|
@@ -162,17 +189,24 @@ var useCellRenderer = function (_a) {
|
|
|
162
189
|
diffHighlight &&
|
|
163
190
|
diffHighlight.diffState !== "unchanged") {
|
|
164
191
|
// Get text color from format or use default
|
|
165
|
-
var textColor = ((
|
|
192
|
+
var textColor = ((_f = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.textFormat) === null || _f === void 0 ? void 0 : _f.color)
|
|
166
193
|
? (0, themes_1.getStringifiedColor)(effectiveCellFormat.textFormat.color, theme)
|
|
167
194
|
: undefined;
|
|
168
195
|
// Measure old value width for proper spacing in modified cells
|
|
169
196
|
// Use the old format for accurate measurement (bold text is wider than normal)
|
|
170
197
|
var oldValueWidth = diffHighlight.oldFormattedValue
|
|
171
|
-
? getTextDimension(sheetId, rowIndex, columnIndex, diffHighlight.oldFormattedValue, (
|
|
198
|
+
? getTextDimension(sheetId, rowIndex, columnIndex, diffHighlight.oldFormattedValue, (_h = (_g = diffHighlight.oldFormat) === null || _g === void 0 ? void 0 : _g.textFormat) !== null && _h !== void 0 ? _h : undefined).width
|
|
172
199
|
: undefined;
|
|
173
|
-
return (react_1.default.createElement(cell_diff_1.CellDiff, tslib_1.__assign({ diffHighlight: diffHighlight, value: formattedValue, defaultColor: textColor, scale: scale, fontSizePt: defaultFontSizePoint, fontFamily: (
|
|
200
|
+
return (react_1.default.createElement(cell_diff_1.CellDiff, tslib_1.__assign({ diffHighlight: diffHighlight, value: formattedValue, defaultColor: textColor, scale: scale, fontSizePt: defaultFontSizePoint, fontFamily: (_j = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.textFormat) === null || _j === void 0 ? void 0 : _j.fontFamily, bold: (_k = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.textFormat) === null || _k === void 0 ? void 0 : _k.bold, italic: (_l = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.textFormat) === null || _l === void 0 ? void 0 : _l.italic, horizontalAlignment: effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.horizontalAlignment, verticalAlignment: (effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.verticalAlignment)
|
|
201
|
+
? (0, alignment_1.resolveCanvasVerticalAlign)(effectiveCellFormat.verticalAlignment)
|
|
202
|
+
: undefined, oldValueWidth: oldValueWidth }, props)));
|
|
174
203
|
}
|
|
175
|
-
|
|
204
|
+
var numberFormatLayout = isError
|
|
205
|
+
? undefined
|
|
206
|
+
: (0, number_format_layout_1.getCellNumberFormatLayout)((_m = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.numberFormat) === null || _m === void 0 ? void 0 : _m.pattern, (_o = (0, utils_1.getExtendedValueNumber)(effectiveValue)) !== null && _o !== void 0 ? _o : (0, utils_1.getExtendedValueString)(effectiveValue), displayValue, locale);
|
|
207
|
+
return (react_1.default.createElement(Cell, tslib_1.__assign({ 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)
|
|
208
|
+
? overflowLeft !== null && overflowLeft !== void 0 ? overflowLeft : 0
|
|
209
|
+
: undefined, centerOnSpan: !!centerAcrossSpan, showGridLines: showGridLines, structuredValue: effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue, sparklineGroupAxis: ((_p = effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue) === null || _p === void 0 ? void 0 : _p.kind) === "sparkline" &&
|
|
176
210
|
getSparklineGroup
|
|
177
211
|
? (0, sparkline_math_1.sparklineGroupAxisFor)(effectiveValue.structuredValue, function () { return getSparklineGroup(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }); }, function (cell) {
|
|
178
212
|
var _a;
|
|
@@ -190,6 +224,7 @@ var useCellRenderer = function (_a) {
|
|
|
190
224
|
sheetId,
|
|
191
225
|
scale,
|
|
192
226
|
showGridLines,
|
|
227
|
+
showZeros,
|
|
193
228
|
theme,
|
|
194
229
|
showNotes,
|
|
195
230
|
showComments,
|
|
@@ -209,6 +244,7 @@ var useCellRenderer = function (_a) {
|
|
|
209
244
|
getDataValidation,
|
|
210
245
|
getErrorValue,
|
|
211
246
|
formulaLocale,
|
|
247
|
+
locale,
|
|
212
248
|
getEffectiveValue,
|
|
213
249
|
getSparklineGroup,
|
|
214
250
|
getFormattedValue,
|
|
@@ -218,6 +254,8 @@ var useCellRenderer = function (_a) {
|
|
|
218
254
|
getNote,
|
|
219
255
|
getComment,
|
|
220
256
|
getMaximumOverflowTextWidth,
|
|
257
|
+
getCenterAcrossSelectionSpan,
|
|
258
|
+
activeCell,
|
|
221
259
|
getCellGroupingInfo,
|
|
222
260
|
onCheckboxClick,
|
|
223
261
|
onFilterClick,
|
|
@@ -313,28 +351,28 @@ var useCellRenderer = function (_a) {
|
|
|
313
351
|
var strokeDiagonalUpStyle = (_m = borders === null || borders === void 0 ? void 0 : borders.diagonalUp) === null || _m === void 0 ? void 0 : _m.style;
|
|
314
352
|
var strokeDiagonalDownStyle = (_o = borders === null || borders === void 0 ? void 0 : borders.diagonalDown) === null || _o === void 0 ? void 0 : _o.style;
|
|
315
353
|
/* Border width */
|
|
316
|
-
var strokeTopWidth = (strokeTopStyle === "double" ? 3 : (
|
|
317
|
-
var strokeBottomWidth = (strokeBottomStyle === "double" ? 3 : (
|
|
354
|
+
var strokeTopWidth = (strokeTopStyle === "double" ? 3 : (0, helpers_1.getBorderStyleWidth)((_p = borders === null || borders === void 0 ? void 0 : borders.top) === null || _p === void 0 ? void 0 : _p.style, (_q = borders === null || borders === void 0 ? void 0 : borders.top) === null || _q === void 0 ? void 0 : _q.width)) * scale;
|
|
355
|
+
var strokeBottomWidth = (strokeBottomStyle === "double" ? 3 : (0, helpers_1.getBorderStyleWidth)((_r = borders === null || borders === void 0 ? void 0 : borders.bottom) === null || _r === void 0 ? void 0 : _r.style, (_s = borders === null || borders === void 0 ? void 0 : borders.bottom) === null || _s === void 0 ? void 0 : _s.width)) *
|
|
318
356
|
scale;
|
|
319
|
-
var strokeLeftWidth = (strokeLeftStyle === "double" ? 3 : (
|
|
320
|
-
var strokeRightWidth = (strokeRightStyle === "double" ? 3 : (
|
|
357
|
+
var strokeLeftWidth = (strokeLeftStyle === "double" ? 3 : (0, helpers_1.getBorderStyleWidth)((_t = borders === null || borders === void 0 ? void 0 : borders.left) === null || _t === void 0 ? void 0 : _t.style, (_u = borders === null || borders === void 0 ? void 0 : borders.left) === null || _u === void 0 ? void 0 : _u.width)) * scale;
|
|
358
|
+
var strokeRightWidth = (strokeRightStyle === "double" ? 3 : (0, helpers_1.getBorderStyleWidth)((_v = borders === null || borders === void 0 ? void 0 : borders.right) === null || _v === void 0 ? void 0 : _v.style, (_w = borders === null || borders === void 0 ? void 0 : borders.right) === null || _w === void 0 ? void 0 : _w.width)) *
|
|
321
359
|
scale;
|
|
322
360
|
var strokeDiagonalUpWidth = (strokeDiagonalUpStyle === "double"
|
|
323
361
|
? 3
|
|
324
|
-
: (
|
|
362
|
+
: (0, helpers_1.getBorderStyleWidth)((_x = borders === null || borders === void 0 ? void 0 : borders.diagonalUp) === null || _x === void 0 ? void 0 : _x.style, (_y = borders === null || borders === void 0 ? void 0 : borders.diagonalUp) === null || _y === void 0 ? void 0 : _y.width)) * scale;
|
|
325
363
|
var strokeDiagonalDownWidth = (strokeDiagonalDownStyle === "double"
|
|
326
364
|
? 3
|
|
327
|
-
: (
|
|
365
|
+
: (0, helpers_1.getBorderStyleWidth)((_z = borders === null || borders === void 0 ? void 0 : borders.diagonalDown) === null || _z === void 0 ? void 0 : _z.style, (_0 = borders === null || borders === void 0 ? void 0 : borders.diagonalDown) === null || _0 === void 0 ? void 0 : _0.width)) * scale;
|
|
328
366
|
// Double inset
|
|
329
367
|
var strokeDoubleInsetWidth = 1 * scale;
|
|
330
368
|
/* Border style */
|
|
331
|
-
var strokeTopDash = (0, helpers_1.convertBorderStyleToDashArray)((_1 = borders === null || borders === void 0 ? void 0 : borders.top) === null || _1 === void 0 ? void 0 : _1.style);
|
|
332
|
-
var strokeBottomDash = (0, helpers_1.convertBorderStyleToDashArray)((_2 = borders === null || borders === void 0 ? void 0 : borders.bottom) === null || _2 === void 0 ? void 0 : _2.style);
|
|
333
|
-
var strokeLeftDash = (0, helpers_1.convertBorderStyleToDashArray)((_3 = borders === null || borders === void 0 ? void 0 : borders.left) === null || _3 === void 0 ? void 0 : _3.style);
|
|
334
|
-
var strokeRightDash = (0, helpers_1.convertBorderStyleToDashArray)((_4 = borders === null || borders === void 0 ? void 0 : borders.right) === null || _4 === void 0 ? void 0 : _4.style);
|
|
335
|
-
var strokeDiagonalUpDash = (0, helpers_1.convertBorderStyleToDashArray)((_5 = borders === null || borders === void 0 ? void 0 : borders.diagonalUp) === null || _5 === void 0 ? void 0 : _5.style);
|
|
336
|
-
var strokeDiagonalDownDash = (0, helpers_1.convertBorderStyleToDashArray)((_6 = borders === null || borders === void 0 ? void 0 : borders.diagonalDown) === null || _6 === void 0 ? void 0 : _6.style);
|
|
337
|
-
return (0, cell_overlay_1.CellOverlayRenderer)(tslib_1.__assign(tslib_1.__assign({}, props), { strokeDoubleInsetWidth: strokeDoubleInsetWidth, strokeTopColor: strokeTopColor, strokeBottomColor: strokeBottomColor, strokeLeftColor: strokeLeftColor, strokeRightColor: strokeRightColor, strokeDiagonalUpColor: strokeDiagonalUpColor, strokeDiagonalDownColor: strokeDiagonalDownColor, strokeTopWidth: strokeTopWidth, strokeBottomWidth: strokeBottomWidth, strokeLeftWidth: strokeLeftWidth, strokeRightWidth: strokeRightWidth, strokeDiagonalUpWidth: strokeDiagonalUpWidth, strokeDiagonalDownWidth: strokeDiagonalDownWidth, strokeTopDash: strokeTopDash, strokeBottomDash: strokeBottomDash, strokeLeftDash: strokeLeftDash, strokeRightDash: strokeRightDash, strokeDiagonalUpDash: strokeDiagonalUpDash, strokeDiagonalDownDash: strokeDiagonalDownDash, strokeTopStyle: strokeTopStyle, strokeBottomStyle: strokeBottomStyle, strokeLeftStyle: strokeLeftStyle, strokeRightStyle: strokeRightStyle, cellBackgroundColor: finalCellBackgroundColor }));
|
|
369
|
+
var strokeTopDash = (0, helpers_1.convertBorderStyleToDashArray)((_1 = borders === null || borders === void 0 ? void 0 : borders.top) === null || _1 === void 0 ? void 0 : _1.style, scale);
|
|
370
|
+
var strokeBottomDash = (0, helpers_1.convertBorderStyleToDashArray)((_2 = borders === null || borders === void 0 ? void 0 : borders.bottom) === null || _2 === void 0 ? void 0 : _2.style, scale);
|
|
371
|
+
var strokeLeftDash = (0, helpers_1.convertBorderStyleToDashArray)((_3 = borders === null || borders === void 0 ? void 0 : borders.left) === null || _3 === void 0 ? void 0 : _3.style, scale);
|
|
372
|
+
var strokeRightDash = (0, helpers_1.convertBorderStyleToDashArray)((_4 = borders === null || borders === void 0 ? void 0 : borders.right) === null || _4 === void 0 ? void 0 : _4.style, scale);
|
|
373
|
+
var strokeDiagonalUpDash = (0, helpers_1.convertBorderStyleToDashArray)((_5 = borders === null || borders === void 0 ? void 0 : borders.diagonalUp) === null || _5 === void 0 ? void 0 : _5.style, scale);
|
|
374
|
+
var strokeDiagonalDownDash = (0, helpers_1.convertBorderStyleToDashArray)((_6 = borders === null || borders === void 0 ? void 0 : borders.diagonalDown) === null || _6 === void 0 ? void 0 : _6.style, scale);
|
|
375
|
+
return (0, cell_overlay_1.CellOverlayRenderer)(tslib_1.__assign(tslib_1.__assign({}, props), { strokeDoubleInsetWidth: strokeDoubleInsetWidth, strokeTopColor: strokeTopColor, strokeBottomColor: strokeBottomColor, strokeLeftColor: strokeLeftColor, strokeRightColor: strokeRightColor, strokeDiagonalUpColor: strokeDiagonalUpColor, strokeDiagonalDownColor: strokeDiagonalDownColor, strokeTopWidth: strokeTopWidth, strokeBottomWidth: strokeBottomWidth, strokeLeftWidth: strokeLeftWidth, strokeRightWidth: strokeRightWidth, strokeDiagonalUpWidth: strokeDiagonalUpWidth, strokeDiagonalDownWidth: strokeDiagonalDownWidth, strokeTopDash: strokeTopDash, strokeBottomDash: strokeBottomDash, strokeLeftDash: strokeLeftDash, strokeRightDash: strokeRightDash, strokeDiagonalUpDash: strokeDiagonalUpDash, strokeDiagonalDownDash: strokeDiagonalDownDash, strokeTopStyle: strokeTopStyle, strokeBottomStyle: strokeBottomStyle, strokeLeftStyle: strokeLeftStyle, strokeRightStyle: strokeRightStyle, strokeDiagonalUpStyle: strokeDiagonalUpStyle, strokeDiagonalDownStyle: strokeDiagonalDownStyle, cellBackgroundColor: finalCellBackgroundColor }));
|
|
338
376
|
}, [
|
|
339
377
|
getEffectiveCellFormat,
|
|
340
378
|
getCellBounds,
|
|
@@ -357,11 +395,11 @@ var useCellRenderer = function (_a) {
|
|
|
357
395
|
*/
|
|
358
396
|
var fillPattern = (_a = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.fillPattern) !== null && _a !== void 0 ? _a : null;
|
|
359
397
|
var gradient = (_b = effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.gradient) !== null && _b !== void 0 ? _b : null;
|
|
360
|
-
|
|
398
|
+
// A pattern with no colour of its own paints in Excel's Automatic
|
|
399
|
+
// (black); a solid pattern needs its foreground.
|
|
400
|
+
var hasPaintedPattern = fillPattern === "solid"
|
|
361
401
|
? !!(effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.foregroundColor)
|
|
362
|
-
: fillPattern
|
|
363
|
-
? !!(effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.foregroundColor)
|
|
364
|
-
: false;
|
|
402
|
+
: !!fillPattern && fillPattern !== "none";
|
|
365
403
|
var hasGradient = !!gradient && ((_d = (_c = gradient.stops) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
|
|
366
404
|
var showFillRectange = !(0, utils_1.isNil)(effectiveCellFormat === null || effectiveCellFormat === void 0 ? void 0 : effectiveCellFormat.backgroundColor) ||
|
|
367
405
|
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;
|
|
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;AAEl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