@@ -159,8 +159,8 @@ Before you start:
159159#### CustomPluginConfigOptions
160160
161161A plugin can be configured with any number of configuration fields. Each field
162- type has its own configuration options. Each field type is also garunteed to
163- have a the following options:
162+ type has its own configuration options. Each field type is also guaranteed to
163+ have the following options:
164164
165165- `name : string` - the name of the field
166166- `type : string` - the field type
@@ -247,6 +247,16 @@ type CustomPluginConfigOptions =
247247 type: ' interaction' ;
248248 name: string;
249249 label?: string;
250+ }
251+ | {
252+ type: ' action-trigger' ;
253+ name: string;
254+ label?: string;
255+ }
256+ | {
257+ type: ' action-effect' ;
258+ name: string;
259+ label?: string;
250260 };
251261```
252262
@@ -376,6 +386,14 @@ Additional Fields
376386
377387A configurable workbook interaction to interact with other charts within your workbook
378388
389+ **Action Trigger**
390+
391+ A configurable action trigger to trigger actions in other elements within your workbook
392+
393+ **Action Effect**
394+
395+ A configurable action effect that can be triggered by other elements within your workbook
396+
379397#### PluginInstance
380398
381399```ts
@@ -437,6 +455,16 @@ interface PluginInstance<T> {
437455 selection: WorkbookSelection[],
438456 ): void;
439457
458+ /**
459+ * Triggers an action based on the provided action trigger ID
460+ */
461+ triggerAction(id: string): void;
462+
463+ /**
464+ * Registers an effect with the provided action effect ID
465+ */
466+ registerEffect(id: string, effect: Function): void;
467+
440468 /**
441469 * Overrider function for Config Ready state
442470 */
@@ -678,7 +706,7 @@ function setVariableCallback(...values: unknown[]): void;
678706
679707# ### useInteraction()
680708
681- Returns a given interaction' s selection state and a setter to update that interation
709+ Returns a given interaction' s selection state and a setter to update that interaction
682710
683711```ts
684712function useInteraction(
@@ -699,6 +727,41 @@ The returned setter function accepts an array of workbook selection elements
699727function setVariableCallback(value: WorkbookSelection[]): void;
700728```
701729
730+ #### useActionTrigger()
731+
732+ - `configId : string` - The ID of the action trigger from the Plugin Config
733+
734+ Returns a callback function to trigger one or more action effects for a given action trigger
735+
736+ ```ts
737+ function useActionTrigger(configId: string): () => void;
738+ ```
739+
740+ #### triggerActionCallback();
741+
742+ Arguments
743+
744+ - `configId : string` - The ID of the action trigger from the Plugin Config
745+
746+ The function that can be called to asynchronously trigger the action
747+
748+ ```ts
749+ function triggerActionCallback(configId: string): void;
750+ ```
751+
752+ #### useActionEffect()
753+
754+ Registers and unregisters an action effect within the plugin
755+
756+ ```ts
757+ function useActionEffect(effectId: string, effect: () => void);
758+ ```
759+
760+ Arguments
761+
762+ - `effectId : string` - The ID of the action effect
763+ - `effect : Function` - The function to be called when the effect is triggered
764+
702765#### useConfig()
703766
704767Returns the workbook element’s current configuration. If a key is provided, only
0 commit comments