Skip to content

Commit 0581ff2

Browse files
author
github-actions
committed
ci(docs): Automated site build
1 parent 7bcc63d commit 0581ff2

File tree

4 files changed

+347
-284
lines changed

4 files changed

+347
-284
lines changed

docs/filter.Rmd

Lines changed: 55 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
1-
<a name="module_crosstalk"></a>
1+
<a name="FilterHandle"></a>
22

3-
## crosstalk
4-
5-
* [crosstalk](#module_crosstalk)
6-
* [.FilterHandle](#module_crosstalk.FilterHandle)
7-
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_module_crosstalk.FilterHandle_new)
8-
* [.filteredKeys](#module_crosstalk.FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
9-
* [.setGroup(group)](#module_crosstalk.FilterHandle+setGroup)
10-
* [.close()](#module_crosstalk.FilterHandle+close)
11-
* [.clear([extraInfo])](#module_crosstalk.FilterHandle+clear)
12-
* [.set(keys, [extraInfo])](#module_crosstalk.FilterHandle+set)
13-
* [.on(eventType, listener)](#module_crosstalk.FilterHandle+on) ⇒ <code>string</code>
14-
* [.off(eventType, listener)](#module_crosstalk.FilterHandle+off)
15-
16-
<a name="module_crosstalk.FilterHandle"></a>
17-
18-
### crosstalk.FilterHandle
3+
## FilterHandle
194
Use this class to contribute to, and listen for changes to, the filter set
205
for the given group of widgets. Filter input controls should create one
21-
`FilterHandle` and only call [set](#module_crosstalk.FilterHandle+set).
6+
`FilterHandle` and only call [module:crosstalk.FilterHandle#set](module:crosstalk.FilterHandle#set).
227
Output widgets that wish to displayed filtered data should create one
23-
`FilterHandle` and use the [filteredKeys](#module_crosstalk.FilterHandle+filteredKeys)
8+
`FilterHandle` and use the [module:crosstalk.FilterHandle#filteredKeys](module:crosstalk.FilterHandle#filteredKeys)
249
property and listen for change events.
2510

2611
If two (or more) `FilterHandle` instances in the same webpage share the
@@ -33,109 +18,122 @@ various key arrays by finding their intersection; only keys that are
3318
present in all non-null filter handles are considered part of the filter
3419
set.
3520

36-
**Kind**: static class of [<code>crosstalk</code>](#module_crosstalk)
21+
**Kind**: global class
3722

38-
* [.FilterHandle](#module_crosstalk.FilterHandle)
39-
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_module_crosstalk.FilterHandle_new)
40-
* [.filteredKeys](#module_crosstalk.FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
41-
* [.setGroup(group)](#module_crosstalk.FilterHandle+setGroup)
42-
* [.close()](#module_crosstalk.FilterHandle+close)
43-
* [.clear([extraInfo])](#module_crosstalk.FilterHandle+clear)
44-
* [.set(keys, [extraInfo])](#module_crosstalk.FilterHandle+set)
45-
* [.on(eventType, listener)](#module_crosstalk.FilterHandle+on) ⇒ <code>string</code>
46-
* [.off(eventType, listener)](#module_crosstalk.FilterHandle+off)
23+
* [FilterHandle](#FilterHandle)
24+
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_FilterHandle_new)
25+
* [.filteredKeys](#FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
26+
* [.setGroup(group)](#FilterHandle+setGroup)
27+
* [.close()](#FilterHandle+close)
28+
* [.clear([extraInfo])](#FilterHandle+clear)
29+
* [.set(keys, [extraInfo])](#FilterHandle+set)
30+
* [.on(eventType, listener)](#FilterHandle+on) ⇒ <code>string</code>
31+
* [.off(eventType, listener)](#FilterHandle+off)
32+
* ["change"](#FilterHandle+event_change)
4733

48-
<a name="new_module_crosstalk.FilterHandle_new"></a>
34+
<a name="new_FilterHandle_new"></a>
4935

50-
#### new crosstalk.FilterHandle([group], [extraInfo])
36+
### new crosstalk.FilterHandle([group], [extraInfo])
5137

5238
| Param | Type | Description |
5339
| ------------- | ------------- | ------------- |
54-
| [group] | <code>string</code> | The name of the Crosstalk group, or if none, null or undefined (or any other falsy value). This can be changed later via the [FilterHandle#setGroup](FilterHandle#setGroup) method. |
40+
| [group] | <code>string</code> | The name of the Crosstalk group, or if none, null or undefined (or any other falsy value). This can be changed later via the [setGroup](#FilterHandle+setGroup) method. |
5541
| [extraInfo] | <code>Object</code> | An object whose properties will be copied to the event object whenever an event is emitted. |
5642

57-
<a name="module_crosstalk.FilterHandle+filteredKeys"></a>
43+
<a name="FilterHandle+filteredKeys"></a>
5844

59-
#### filterHandle.filteredKeys ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
60-
**Kind**: instance property of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
45+
### filterHandle.filteredKeys ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
46+
**Kind**: instance property of [<code>FilterHandle</code>](#FilterHandle)
6147
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>null</code> - - Either: 1) an array of keys that made it through
6248
all of the `FilterHandle` instances, or, 2) `null`, which means no filter
6349
is being applied (all data should be displayed).
64-
<a name="module_crosstalk.FilterHandle+setGroup"></a>
50+
<a name="FilterHandle+setGroup"></a>
6551

66-
#### filterHandle.setGroup(group)
52+
### filterHandle.setGroup(group)
6753
Changes the Crosstalk group membership of this FilterHandle. If `set()` was
6854
previously called on this handle, switching groups will clear those keys
6955
from the old group's filter set. These keys will not be applied to the new
7056
group's filter set either. In other words, `setGroup()` effectively calls
7157
`clear()` before switching groups.
7258

73-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
59+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
7460

7561
| Param | Type | Description |
7662
| ------------- | ------------- | ------------- |
7763
| group | <code>string</code> | The name of the Crosstalk group, or null (or undefined) to clear the group. |
7864

79-
<a name="module_crosstalk.FilterHandle+close"></a>
65+
<a name="FilterHandle+close"></a>
8066

81-
#### filterHandle.close()
67+
### filterHandle.close()
8268
Close the handle. This clears this handle's contribution to the filter set,
8369
and unsubscribes all event listeners.
8470

85-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
86-
<a name="module_crosstalk.FilterHandle+clear"></a>
71+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
72+
<a name="FilterHandle+clear"></a>
8773

88-
#### filterHandle.clear([extraInfo])
74+
### filterHandle.clear([extraInfo])
8975
Clear this handle's contribution to the filter set.
9076

91-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
77+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
9278
**Emits**: [<code>change</code>](#FilterHandle+event_change)
9379

9480
| Param | Type | Description |
9581
| ------------- | ------------- | ------------- |
9682
| [extraInfo] | <code>Object</code> | Extra properties to be included on the event object that's passed to listeners (in addition to any options that were passed into the `FilterHandle` constructor). |
9783

98-
<a name="module_crosstalk.FilterHandle+set"></a>
84+
<a name="FilterHandle+set"></a>
9985

100-
#### filterHandle.set(keys, [extraInfo])
86+
### filterHandle.set(keys, [extraInfo])
10187
Set this handle's contribution to the filter set. This array should consist
10288
of the keys of the rows that _should_ be displayed; any keys that are not
10389
present in the array will be considered _filtered out_. Note that multiple
10490
`FilterHandle` instances in the group may each contribute an array of keys,
10591
and only those keys that appear in _all_ of the arrays make it through the
10692
filter.
10793

108-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
94+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
10995
**Emits**: [<code>change</code>](#FilterHandle+event_change)
11096

11197
| Param | Type | Description |
11298
| ------------- | ------------- | ------------- |
113-
| keys | <code>Array.&lt;string&gt;</code> | Empty array, or array of keys. To clear the filter, don't pass an empty array; instead, use the [FilterHandle#clear](FilterHandle#clear) method. |
99+
| keys | <code>[ &#x27;Array&#x27; ].&lt;string&gt;</code> | Empty array, or array of keys. To clear the filter, don't pass an empty array; instead, use the [clear](#FilterHandle+clear) method. |
114100
| [extraInfo] | <code>Object</code> | Extra properties to be included on the event object that's passed to listeners (in addition to any options that were passed into the `FilterHandle` constructor). |
115101

116-
<a name="module_crosstalk.FilterHandle+on"></a>
102+
<a name="FilterHandle+on"></a>
117103

118-
#### filterHandle.on(eventType, listener) ⇒ <code>string</code>
104+
### filterHandle.on(eventType, listener) ⇒ <code>string</code>
119105
Subscribe to events on this `FilterHandle`.
120106

121-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
122-
**Returns**: <code>string</code> - - A token to pass to [FilterHandle#off](FilterHandle#off) to cancel
107+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
108+
**Returns**: <code>string</code> - - A token to pass to [off](#FilterHandle+off) to cancel
123109
this subscription.
124110

125111
| Param | Type | Description |
126112
| ------------- | ------------- | ------------- |
127113
| eventType | <code>string</code> | Indicates the type of events to listen to. Currently, only `"change"` is supported. |
128114
| listener | <code>FilterHandle~listener</code> | The callback function that will be invoked when the event occurs. |
129115

130-
<a name="module_crosstalk.FilterHandle+off"></a>
116+
<a name="FilterHandle+off"></a>
131117

132-
#### filterHandle.off(eventType, listener)
133-
Cancel event subscriptions created by [FilterHandle#on](FilterHandle#on).
118+
### filterHandle.off(eventType, listener)
119+
Cancel event subscriptions created by [on](#FilterHandle+on).
134120

135-
**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
121+
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)
136122

137123
| Param | Type | Description |
138124
| ------------- | ------------- | ------------- |
139125
| eventType | <code>string</code> | The type of event to unsubscribe. |
140-
| listener | <code>string</code> \| <code>FilterHandle~listener</code> | Either the callback function previously passed into [FilterHandle#on](FilterHandle#on), or the string that was returned from [FilterHandle#on](FilterHandle#on). |
126+
| listener | <code>string</code> \| <code>FilterHandle~listener</code> | Either the callback function previously passed into [on](#FilterHandle+on), or the string that was returned from [on](#FilterHandle+on). |
127+
128+
<a name="FilterHandle+event_change"></a>
129+
130+
### "change"
131+
**Kind**: event emitted by [<code>FilterHandle</code>](#FilterHandle)
132+
**Properties**
133+
134+
| Name | Type | Description |
135+
| ------------- | ------------- | ------------- |
136+
| value | <code>object</code> | The new value of the filter set, or `null` if no filter set is active. |
137+
| oldValue | <code>object</code> | The previous value of the filter set. |
138+
| sender | [<code>FilterHandle</code>](#FilterHandle) | The `FilterHandle` instance that changed the value. |
141139

0 commit comments

Comments
 (0)