cupertino-files / FilterSet
Class: FilterSet
Defined in: src/tst/filters.ts:99
Constructors
Constructor
new FilterSet(
store,object):FilterSet
Defined in: src/tst/filters.ts:103
Parameters
store
object
Returns
FilterSet
Properties
object
readonlyobject:IwaObject
Defined in: src/tst/filters.ts:101
store
readonlystore:ObjectStore
Defined in: src/tst/filters.ts:100
Accessors
consistent
Get Signature
get consistent():
boolean
Defined in: src/tst/filters.ts:192
True when the parallel arrays line up with the rule list.
filter_offsets and filter_enabled are indexed by rule position, so a set where they are shorter than the rules is one whose later rules have no column — worth detecting rather than silently reading as column 0. An empty set with a single stray offset, which is what every fixture holds, counts as consistent.
Returns
boolean
enabled
Get Signature
get enabled():
boolean
Defined in: src/tst/filters.ts:113
Whether the app is applying this set at all.
Returns
boolean
id
Get Signature
get id():
bigint
Defined in: src/tst/filters.ts:108
Returns
bigint
mode
Get Signature
get mode():
FilterMode
Defined in: src/tst/filters.ts:135
Returns
Methods
addRule()
addRule(
predicate):number
Defined in: src/tst/filters.ts:228
Add a rule, enabled, and switch the set on.
The rule carries its column in its predicate; the boundary list grows by one. The predicate is written by writeComparisonPredicate; the rows the rule would hide are the app's to recompute (the hidden-state extent is not touched), and whether the app does so for a rule it did not author is unproven. Returns the new rule's index.
Parameters
predicate
Returns
number
describe()
describe():
string[]
Defined in: src/tst/filters.ts:253
Readable summary, one line per rule.
Returns
string[]
rules()
rules(
options?):FilterRule[]
Defined in: src/tst/filters.ts:163
The rules, in stored order.
The modern list wins where both exist, matching how the apps read them; a file written before the 2016 format change carries only the older one.
Parameters
options?
ReadPredicateOptions = {}
Returns
setEnabled()
setEnabled(
enabled):void
Defined in: src/tst/filters.ts:131
Turn the set on or off — the flag alone, never the stored states.
The extent's RowOrColumnState list is the filter machinery's working substrate, not a result cache: the app keeps it across enable/disable (a disabled filter with its states opens unfiltered and re-enables correctly), and a panel toggle never rebuilds a missing list — a filter enabled over no states stores the flag and hides nothing. Corpus tables with zero states are filters that never ran, not filters the app cleaned. So disabling leaves the states exactly where they were.
Parameters
enabled
boolean
Returns
void
setMode()
setMode(
mode):void
Defined in: src/tst/filters.ts:139
Parameters
mode
Returns
void
setRuleEnabled()
setRuleEnabled(
index,enabled):void
Defined in: src/tst/filters.ts:200
Turn a rule on or off without removing it.
Parameters
index
number
enabled
boolean
Returns
void