@univerjs/sheets-conditional-formatting v0.4.2 • Docs
Class: ConditionalFormattingRuleModel
Constructors
new ConditionalFormattingRuleModel()
new ConditionalFormattingRuleModel(_injector): ConditionalFormattingRuleModel
Parameters
Parameter | Type |
---|---|
_injector | Injector |
Returns
ConditionalFormattingRuleModel
Defined in
Properties
Property | Type | Defined in |
---|---|---|
$ruleChange | Observable <{ oldRule : IConditionFormattingRule <IConditionalFormattingRuleConfig >; rule : IConditionFormattingRule <IConditionalFormattingRuleConfig >; subUnitId : string ; type : RuleOperatorType ; unitId : string ; }> | sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:32 (opens in a new tab) |
Methods
addRule()
addRule(
unitId,
subUnitId,
rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule <IConditionalFormattingRuleConfig > |
Returns
void
Defined in
createCfId()
createCfId(_unitId, _subUnitId): string
Parameters
Parameter | Type |
---|---|
_unitId | string |
_subUnitId | string |
Returns
string
Defined in
deleteRule()
deleteRule(
unitId,
subUnitId,
cfId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
cfId | string |
Returns
void
Defined in
deleteUnitId()
deleteUnitId(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
getRule()
getRule(
unitId,
subUnitId,
cfId?): undefined | null | IConditionFormattingRule<IConditionalFormattingRuleConfig>
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
cfId ? | string |
Returns
undefined
| null
| IConditionFormattingRule
<IConditionalFormattingRuleConfig
>
Defined in
getSubunitRules()
getSubunitRules(unitId, subUnitId): null | IConditionFormattingRule<IConditionalFormattingRuleConfig>[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
null
| IConditionFormattingRule
<IConditionalFormattingRuleConfig
>[]
Defined in
getUnitRules()
getUnitRules(unitId): null | Map<string, IConditionFormattingRule<IConditionalFormattingRuleConfig>[]>
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| Map
<string
, IConditionFormattingRule
<IConditionalFormattingRuleConfig
>[]>
Defined in
moveRulePriority()
moveRulePriority(
unitId,
subUnitId,
start,
end): void
example [1,2,3,4,5,6],if you move behind 5 to 2, then cfId=5,targetId=2. if targetId does not exist, it defaults to top
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
start | IAnchor |
end | IAnchor |
Returns
void
Defined in
setRule()
setRule(
unitId,
subUnitId,
rule,
oldCfId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule <IConditionalFormattingRuleConfig > |
oldCfId | string |
Returns
void