@univerjs/sheets-conditional-formatting 0.2.12 → 0.2.14
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +6 -6
- package/lib/types/base/const.d.ts +1 -1
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/render/data-bar.render.d.ts +1 -1
- package/lib/types/render/icon.render.d.ts +1 -1
- package/lib/types/services/__test__/test.util.d.ts +6 -6
- package/lib/umd/index.js +1 -1
- package/package.json +16 -16
package/lib/es/index.js
CHANGED
|
@@ -571,11 +571,11 @@ const dataBarUKey = "sheet-conditional-rule-data-bar", defaultDataBarPositiveCol
|
|
|
571
571
|
if (!worksheet)
|
|
572
572
|
return !1;
|
|
573
573
|
ctx.save(), Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => {
|
|
574
|
+
if (!worksheet.getRowVisible(row) || !worksheet.getColVisible(col))
|
|
575
|
+
return;
|
|
574
576
|
const cellData = worksheet.getCell(row, col);
|
|
575
577
|
if (cellData && cellData.dataBar) {
|
|
576
|
-
|
|
577
|
-
return;
|
|
578
|
-
const { color, value, startPoint, isGradient } = cellData.dataBar, cellInfo = this.getCellIndex(row, col, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);
|
|
578
|
+
const { color, value, startPoint, isGradient } = cellData.dataBar, cellInfo = this.getCellByIndex(row, col, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);
|
|
579
579
|
let { isMerged, isMergedMainCell, mergeInfo, startY, endY, startX, endX } = cellInfo;
|
|
580
580
|
if (isMerged || (isMergedMainCell && (startY = mergeInfo.startY, endY = mergeInfo.endY, startX = mergeInfo.startX, endX = mergeInfo.endX), !this.isRenderDiffRangesByCell(mergeInfo, diffRanges)))
|
|
581
581
|
return;
|
|
@@ -1678,17 +1678,17 @@ const EMPTY_ICON_TYPE = "EMPTY_ICON_TYPE", IconUKey = "sheet-conditional-rule-ic
|
|
|
1678
1678
|
if (!worksheet)
|
|
1679
1679
|
return !1;
|
|
1680
1680
|
ctx.save(), Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => {
|
|
1681
|
+
if (!worksheet.getRowVisible(row) || !worksheet.getColVisible(col))
|
|
1682
|
+
return;
|
|
1681
1683
|
const cellData = worksheet.getCell(row, col);
|
|
1682
1684
|
if (cellData != null && cellData.iconSet) {
|
|
1683
|
-
if (!worksheet.getColVisible(col) || !worksheet.getRowRawVisible(row))
|
|
1684
|
-
return;
|
|
1685
1685
|
const { iconType, iconId } = cellData.iconSet;
|
|
1686
1686
|
if (iconType === EMPTY_ICON_TYPE)
|
|
1687
1687
|
return;
|
|
1688
1688
|
const icon = this._imageMap.get(this._createKey(iconType, iconId));
|
|
1689
1689
|
if (!icon)
|
|
1690
1690
|
return;
|
|
1691
|
-
const cellInfo = this.
|
|
1691
|
+
const cellInfo = this.getCellByIndex(row, col, rowHeightAccumulation, columnWidthAccumulation, dataMergeCache);
|
|
1692
1692
|
let { isMerged, isMergedMainCell, mergeInfo, startY, endY, startX, endX } = cellInfo;
|
|
1693
1693
|
if (isMerged || (isMergedMainCell && (startY = mergeInfo.startY, endY = mergeInfo.endY, startX = mergeInfo.startX, endX = mergeInfo.endX), !this.isRenderDiffRangesByCell(mergeInfo, diffRanges)))
|
|
1694
1694
|
return;
|
|
@@ -60,6 +60,6 @@ export declare enum CFValueType {
|
|
|
60
60
|
}
|
|
61
61
|
export declare const DEFAULT_BG_COLOR = "#fff";
|
|
62
62
|
export declare const DEFAULT_FONT_COLOR = "#000000";
|
|
63
|
-
export declare const createDefaultRule: () => IConditionFormattingRule<import('
|
|
63
|
+
export declare const createDefaultRule: () => IConditionFormattingRule<import('..').IConditionalFormattingRuleConfig>;
|
|
64
64
|
export declare const createDefaultValue: (subType: CFSubRuleType, operator: CFTextOperator | CFNumberOperator | CFTimePeriodOperator) => 10 | "" | [number, number];
|
|
65
65
|
export declare const createDefaultValueByValueType: (type: CFValueType, defaultValue?: number) => number | "" | "=";
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export declare class UniverSheetsConditionalFormattingPlugin extends Plugin {
|
|
|
7
7
|
private readonly _configService;
|
|
8
8
|
static pluginName: string;
|
|
9
9
|
static type: UniverInstanceType;
|
|
10
|
-
constructor(_config: Partial<IUniverSheetsConditionalFormattingConfig
|
|
10
|
+
constructor(_config: Partial<IUniverSheetsConditionalFormattingConfig> | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { SheetExtension, SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';
|
|
1
2
|
import { IRange, IScale } from '@univerjs/core';
|
|
2
|
-
import { SpreadsheetSkeleton, UniverRenderingContext, SheetExtension } from '@univerjs/engine-render';
|
|
3
3
|
export declare const dataBarUKey = "sheet-conditional-rule-data-bar";
|
|
4
4
|
export declare const defaultDataBarPositiveColor = "#ffbe38";
|
|
5
5
|
export declare const defaultDataBarNativeColor = "#abd91a";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { SheetExtension, SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';
|
|
1
2
|
import { IRange, IScale } from '@univerjs/core';
|
|
2
|
-
import { SpreadsheetSkeleton, UniverRenderingContext, SheetExtension } from '@univerjs/engine-render';
|
|
3
3
|
export declare const IconUKey = "sheet-conditional-rule-icon";
|
|
4
4
|
export declare const DEFAULT_WIDTH = 15;
|
|
5
5
|
export declare const DEFAULT_PADDING = 2;
|
|
@@ -5,12 +5,12 @@ import { ConditionalFormattingViewModel } from '../../models/conditional-formatt
|
|
|
5
5
|
export declare const createTestBed: (dependencies?: Dependency[]) => {
|
|
6
6
|
univer: Univer;
|
|
7
7
|
get: {
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
12
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
13
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
14
14
|
};
|
|
15
15
|
workbook: import('@univerjs/core').Workbook;
|
|
16
16
|
unitId: string;
|