Skip to content

Commit

Permalink
ci(docs): Automated site build
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 9, 2025
1 parent 7bcc63d commit 0581ff2
Show file tree
Hide file tree
Showing 4 changed files with 347 additions and 284 deletions.
112 changes: 55 additions & 57 deletions docs/filter.Rmd
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
<a name="module_crosstalk"></a>
<a name="FilterHandle"></a>

## crosstalk

* [crosstalk](#module_crosstalk)
* [.FilterHandle](#module_crosstalk.FilterHandle)
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_module_crosstalk.FilterHandle_new)
* [.filteredKeys](#module_crosstalk.FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
* [.setGroup(group)](#module_crosstalk.FilterHandle+setGroup)
* [.close()](#module_crosstalk.FilterHandle+close)
* [.clear([extraInfo])](#module_crosstalk.FilterHandle+clear)
* [.set(keys, [extraInfo])](#module_crosstalk.FilterHandle+set)
* [.on(eventType, listener)](#module_crosstalk.FilterHandle+on) ⇒ <code>string</code>
* [.off(eventType, listener)](#module_crosstalk.FilterHandle+off)

<a name="module_crosstalk.FilterHandle"></a>

### crosstalk.FilterHandle
## FilterHandle
Use this class to contribute to, and listen for changes to, the filter set
for the given group of widgets. Filter input controls should create one
`FilterHandle` and only call [set](#module_crosstalk.FilterHandle+set).
`FilterHandle` and only call [module:crosstalk.FilterHandle#set](module:crosstalk.FilterHandle#set).
Output widgets that wish to displayed filtered data should create one
`FilterHandle` and use the [filteredKeys](#module_crosstalk.FilterHandle+filteredKeys)
`FilterHandle` and use the [module:crosstalk.FilterHandle#filteredKeys](module:crosstalk.FilterHandle#filteredKeys)
property and listen for change events.

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

**Kind**: static class of [<code>crosstalk</code>](#module_crosstalk)
**Kind**: global class

* [.FilterHandle](#module_crosstalk.FilterHandle)
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_module_crosstalk.FilterHandle_new)
* [.filteredKeys](#module_crosstalk.FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
* [.setGroup(group)](#module_crosstalk.FilterHandle+setGroup)
* [.close()](#module_crosstalk.FilterHandle+close)
* [.clear([extraInfo])](#module_crosstalk.FilterHandle+clear)
* [.set(keys, [extraInfo])](#module_crosstalk.FilterHandle+set)
* [.on(eventType, listener)](#module_crosstalk.FilterHandle+on) ⇒ <code>string</code>
* [.off(eventType, listener)](#module_crosstalk.FilterHandle+off)
* [FilterHandle](#FilterHandle)
* [new crosstalk.FilterHandle([group], [extraInfo])](#new_FilterHandle_new)
* [.filteredKeys](#FilterHandle+filteredKeys) ⇒ <code>Array.&lt;string&gt;</code> \| <code>null</code>
* [.setGroup(group)](#FilterHandle+setGroup)
* [.close()](#FilterHandle+close)
* [.clear([extraInfo])](#FilterHandle+clear)
* [.set(keys, [extraInfo])](#FilterHandle+set)
* [.on(eventType, listener)](#FilterHandle+on) ⇒ <code>string</code>
* [.off(eventType, listener)](#FilterHandle+off)
* ["change"](#FilterHandle+event_change)

<a name="new_module_crosstalk.FilterHandle_new"></a>
<a name="new_FilterHandle_new"></a>

#### new crosstalk.FilterHandle([group], [extraInfo])
### new crosstalk.FilterHandle([group], [extraInfo])

| Param | Type | Description |
| ------------- | ------------- | ------------- |
| [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. |
| [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. |
| [extraInfo] | <code>Object</code> | An object whose properties will be copied to the event object whenever an event is emitted. |

<a name="module_crosstalk.FilterHandle+filteredKeys"></a>
<a name="FilterHandle+filteredKeys"></a>

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

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

**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)

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

<a name="module_crosstalk.FilterHandle+close"></a>
<a name="FilterHandle+close"></a>

#### filterHandle.close()
### filterHandle.close()
Close the handle. This clears this handle's contribution to the filter set,
and unsubscribes all event listeners.

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

#### filterHandle.clear([extraInfo])
### filterHandle.clear([extraInfo])
Clear this handle's contribution to the filter set.

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

| Param | Type | Description |
| ------------- | ------------- | ------------- |
| [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). |

<a name="module_crosstalk.FilterHandle+set"></a>
<a name="FilterHandle+set"></a>

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

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

| Param | Type | Description |
| ------------- | ------------- | ------------- |
| 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. |
| 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. |
| [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). |

<a name="module_crosstalk.FilterHandle+on"></a>
<a name="FilterHandle+on"></a>

#### filterHandle.on(eventType, listener) ⇒ <code>string</code>
### filterHandle.on(eventType, listener) ⇒ <code>string</code>
Subscribe to events on this `FilterHandle`.

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

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

<a name="module_crosstalk.FilterHandle+off"></a>
<a name="FilterHandle+off"></a>

#### filterHandle.off(eventType, listener)
Cancel event subscriptions created by [FilterHandle#on](FilterHandle#on).
### filterHandle.off(eventType, listener)
Cancel event subscriptions created by [on](#FilterHandle+on).

**Kind**: instance method of [<code>FilterHandle</code>](#module_crosstalk.FilterHandle)
**Kind**: instance method of [<code>FilterHandle</code>](#FilterHandle)

| Param | Type | Description |
| ------------- | ------------- | ------------- |
| eventType | <code>string</code> | The type of event to unsubscribe. |
| 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). |
| 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). |

<a name="FilterHandle+event_change"></a>

### "change"
**Kind**: event emitted by [<code>FilterHandle</code>](#FilterHandle)
**Properties**

| Name | Type | Description |
| ------------- | ------------- | ------------- |
| value | <code>object</code> | The new value of the filter set, or `null` if no filter set is active. |
| oldValue | <code>object</code> | The previous value of the filter set. |
| sender | [<code>FilterHandle</code>](#FilterHandle) | The `FilterHandle` instance that changed the value. |

Loading

0 comments on commit 0581ff2

Please sign in to comment.