@univerjs/sheets-conditional-formatting v0.5.4
Class: ConditionalFormattingRuleModel
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:27
Constructors
new ConditionalFormattingRuleModel()
new ConditionalFormattingRuleModel(): ConditionalFormattingRuleModel
Returns
ConditionalFormattingRuleModel
Properties
Property | Modifier | Type | Defined in |
---|---|---|---|
$ruleChange | public | Observable <{ oldRule : IConditionFormattingRule ; rule : IConditionFormattingRule ; subUnitId : string ; type : RuleOperatorType ; unitId : string ; }> | sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:31 |
Methods
addRule()
addRule(
unitId,
subUnitId,
rule): void
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:87
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule |
Returns
void
createCfId()
createCfId(_unitId, _subUnitId): string
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:115
Parameters
Parameter | Type |
---|---|
_unitId | string |
_subUnitId | string |
Returns
string
deleteRule()
deleteRule(
unitId,
subUnitId,
cfId): void
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:65
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
cfId | string |
Returns
void
deleteUnitId()
deleteUnitId(unitId): void
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:119
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
getRule()
getRule(
unitId,
subUnitId,
cfId?):
| undefined
| null
| IConditionFormattingRule
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:47
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
cfId ? | string |
Returns
| undefined
| null
| IConditionFormattingRule
getSubunitRules()
getSubunitRules(unitId, subUnitId):
| null
| IConditionFormattingRule[]
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:60
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
| null
| IConditionFormattingRule
[]
getUnitRules()
getUnitRules(unitId):
| null
| Map<string, IConditionFormattingRule[]>
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:55
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
| null
| Map
<string
, IConditionFormattingRule
[]>
moveRulePriority()
moveRulePriority(
unitId,
subUnitId,
start,
end): void
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:101
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
setRule()
setRule(
unitId,
subUnitId,
rule,
oldCfId): void
Defined in: sheets-conditional-formatting/src/models/conditional-formatting-rule-model.ts:77
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IConditionFormattingRule |
oldCfId | string |
Returns
void