@univerjs/sheets-conditional-formatting-ui 0.2.14 → 0.2.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/lib/es/index.js CHANGED
@@ -2,8 +2,8 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
3
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
5
- import { CommandType, ICommandService, IUniverInstanceService, IUndoRedoService, ObjectMatrix, Range, sequenceExecute, ColorKit, BooleanNumber, Disposable, OnLifecycle, LifecycleStages, Inject, LocaleService, useDependency, Injector, UniverInstanceType, Rectangle, createInterceptorKey, createInternalEditorID, Tools, InterceptorManager, generateRandomId, toDisposable, Plugin, DependentOn, IConfigService } from "@univerjs/core";
6
- import { ConditionalFormattingRuleModel, CFRuleType, CFSubRuleType, AddConditionalRuleMutation, CFNumberOperator, setConditionalRuleMutationUndoFactory, SetConditionalRuleMutation, DeleteConditionalRuleMutationUndoFactory, DeleteConditionalRuleMutation, transformSupportSymmetryAnchor, MoveConditionalRuleMutationUndoFactory, MoveConditionalRuleMutation, getColorScaleFromValue, iconMap, DEFAULT_BG_COLOR, DEFAULT_FONT_COLOR, defaultDataBarPositiveColor, defaultDataBarNativeColor, AddConditionalRuleMutationUndoFactory, CFValueType, createDefaultValueByValueType, SHEET_CONDITIONAL_FORMATTING_PLUGIN, removeUndefinedAttr, createDefaultValue, CFTextOperator, CFTimePeriodOperator, iconGroup, getOppositeOperator, compareWithNumber, EMPTY_ICON_TYPE, createDefaultRule, DEFAULT_PADDING, DEFAULT_WIDTH, ConditionalFormattingService, ConditionalFormattingViewModel, isRangesEqual, UniverSheetsConditionalFormattingPlugin, getStringFromDataStream } from "@univerjs/sheets-conditional-formatting";
5
+ import { CommandType, ICommandService, IUniverInstanceService, IUndoRedoService, ObjectMatrix, Range, sequenceExecute, ColorKit, BooleanNumber, Disposable, OnLifecycle, LifecycleStages, Inject, LocaleService, useDependency, Injector, UniverInstanceType, Rectangle, createInterceptorKey, createInternalEditorID, Tools, InterceptorManager, generateRandomId, toDisposable, Plugin, DependentOn, IConfigService, BuildTextUtils } from "@univerjs/core";
6
+ import { ConditionalFormattingRuleModel, CFRuleType, CFSubRuleType, AddConditionalRuleMutation, CFNumberOperator, setConditionalRuleMutationUndoFactory, SetConditionalRuleMutation, DeleteConditionalRuleMutationUndoFactory, DeleteConditionalRuleMutation, transformSupportSymmetryAnchor, MoveConditionalRuleMutationUndoFactory, MoveConditionalRuleMutation, getColorScaleFromValue, iconMap, DEFAULT_BG_COLOR, DEFAULT_FONT_COLOR, defaultDataBarPositiveColor, defaultDataBarNativeColor, AddConditionalRuleMutationUndoFactory, CFValueType, createDefaultValueByValueType, SHEET_CONDITIONAL_FORMATTING_PLUGIN, removeUndefinedAttr, createDefaultValue, CFTextOperator, CFTimePeriodOperator, iconGroup, getOppositeOperator, compareWithNumber, EMPTY_ICON_TYPE, createDefaultRule, DEFAULT_PADDING, DEFAULT_WIDTH, ConditionalFormattingService, ConditionalFormattingViewModel, isRangesEqual, UniverSheetsConditionalFormattingPlugin } from "@univerjs/sheets-conditional-formatting";
7
7
  import { getSheetCommandTarget, SheetsSelectionsService, findAllRectangle, createTopMatrixFromMatrix, SetWorksheetActiveOperation, SetSelectionsOperation, checkRangesEditablePermission, RemoveSheetMutation, setEndForRange, INTERCEPTOR_POINT, SheetInterceptorService, RefRangeService, handleDefaultRangeChangeWithEffectRefCommands, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, WorksheetSetCellStylePermission, ClearSelectionFormatCommand, ClearSelectionAllCommand, RangeMergeUtil } from "@univerjs/sheets";
8
8
  import { useObservable, ComponentManager, TextEditor, ILayoutService, useScrollYOverContainer, RangeSelector, ISidebarService, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
9
9
  import require$$0, { forwardRef, useRef, createElement, useMemo, useState, useEffect } from "react";
@@ -7524,11 +7524,12 @@ let ConditionalFormattingEditorController = (_a11 = class extends Disposable {
7524
7524
  this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT,
7525
7525
  {
7526
7526
  handler: /* @__PURE__ */ __name((value, context, next) => {
7527
+ var _a15, _b;
7527
7528
  const result = this._conditionalFormattingService.composeStyle(context.unitId, context.subUnitId, context.row, context.col);
7528
7529
  if (result != null && result.style && (value != null && value.p)) {
7529
7530
  const keys = Object.keys(result == null ? void 0 : result.style);
7530
7531
  if (keys.length > 0) {
7531
- const v = getStringFromDataStream(value.p), s = { ...(typeof value.s == "string" ? context.workbook.getStyles().get(value.s) : value.s) || {} };
7532
+ const v = BuildTextUtils.transform.getPlainText((_b = (_a15 = value.p.body) == null ? void 0 : _a15.dataStream) != null ? _b : ""), s = { ...(typeof value.s == "string" ? context.workbook.getStyles().get(value.s) : value.s) || {} };
7532
7533
  keys.forEach((key) => {
7533
7534
  delete s[key];
7534
7535
  });
@@ -1,6 +1,6 @@
1
1
  import { Disposable } from '@univerjs/core';
2
- import { IEditorBridgeService } from '@univerjs/sheets-ui';
3
2
  import { ConditionalFormattingService } from '@univerjs/sheets-conditional-formatting';
3
+ import { IEditorBridgeService } from '@univerjs/sheets-ui';
4
4
  export declare class ConditionalFormattingEditorController extends Disposable {
5
5
  private _editorBridgeService;
6
6
  private _conditionalFormattingService;