@univerjs/sheets-conditional-formatting v0.5.0-beta.1 • Docs
Class: ConditionalFormattingRuleModel
Constructors
new ConditionalFormattingRuleModel()
new ConditionalFormattingRuleModel(_injector): ConditionalFormattingRuleModel
Parameters
Parameter | Type |
---|---|
_injector | Injector |
Returns
ConditionalFormattingRuleModel
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:104
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 |
Methods
addRule()
addRule(
unitId,
subUnitId,
rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule <IConditionalFormattingRuleConfig > |
Returns
void
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:164
createCfId()
createCfId(_unitId, _subUnitId): string
Parameters
Parameter | Type |
---|---|
_unitId | string |
_subUnitId | string |
Returns
string
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:192
deleteRule()
deleteRule(
unitId,
subUnitId,
cfId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
cfId | string |
Returns
void
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:142
deleteUnitId()
deleteUnitId(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:196
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
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:124
getSubunitRules()
getSubunitRules(unitId, subUnitId): null | IConditionFormattingRule<IConditionalFormattingRuleConfig>[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
null
| IConditionFormattingRule
<IConditionalFormattingRuleConfig
>[]
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:137
getUnitRules()
getUnitRules(unitId): null | Map<string, IConditionFormattingRule<IConditionalFormattingRuleConfig>[]>
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| Map
<string
, IConditionFormattingRule
<IConditionalFormattingRuleConfig
>[]>
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:132
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
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:178
setRule()
setRule(
unitId,
subUnitId,
rule,
oldCfId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule <IConditionalFormattingRuleConfig > |
oldCfId | string |
Returns
void
Defined in
sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:154