1 | import { ClientApplication } from '../client/types';
|
2 | import { Indexable } from './merge';
|
3 | import { ActionCallback, ActionSetInterface, ActionSubscription, Component, ErrorCallback, Unsubscribe } from './types';
|
4 | export declare function actionWrapper(action: any): any;
|
5 | export declare function getVersion(): any;
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare function getEventNameSpace(group: string, eventName: string, component?: Component): string;
|
11 | export declare function isValidOptionalNumber(value?: number): boolean;
|
12 | export declare function isValidOptionalString(value?: string): boolean;
|
13 | export declare abstract class ActionSet implements ActionSetInterface {
|
14 | app: ClientApplication<any>;
|
15 | type: string;
|
16 | group: string;
|
17 | readonly id: string;
|
18 | readonly defaultGroup: string;
|
19 | subgroups: string[];
|
20 | subscriptions: ActionSubscription[];
|
21 | constructor(app: ClientApplication<any>, type: string, group: string, id?: string);
|
22 | set(..._: any[]): void;
|
23 | readonly component: Component;
|
24 | updateSubscription(subscriptionToRemove: ActionSubscription, group: string, subgroups: string[]): Unsubscribe;
|
25 | error(callback: ErrorCallback): Unsubscribe;
|
26 | subscribe(eventName: string, callback: ActionCallback, component?: Component, currentIndex?: number): Unsubscribe;
|
27 | unsubscribe(resetOnly?: boolean): this;
|
28 | }
|
29 | export declare abstract class ActionSetWithChildren extends ActionSet {
|
30 | children: ActionSetChildAction[];
|
31 | unsubscribe(unsubscribeChildren?: boolean, resetParentOnly?: boolean): this;
|
32 | getChild(id: string): ActionSetChildAction | undefined;
|
33 | getChildIndex(id: string): number;
|
34 | getChildSubscriptions(id: string, eventType?: string): ActionSubscription[];
|
35 | addChild(child: ActionSetChildAction, group: string, subgroups: string[]): this;
|
36 | removeChild(id: string): this;
|
37 | subscribeToChild(child: ActionSetChildAction, eventName: string | string[], callback: (childData: any) => void): this;
|
38 | getUpdatedChildActions<A extends ActionSetChildAction>(newActions: A[], currentActions: A[]): A[] | undefined;
|
39 | }
|
40 | export declare type ActionSetChildAction = ActionSet | ActionSetWithChildren;
|
41 | export declare function updateActionFromPayload<A extends Partial<ActionSetInterface>>(action: A, newProps: A): boolean;
|
42 | export declare function getMergedProps<Prop extends Indexable>(props: Prop, newProps: Partial<Prop>): Prop;
|
43 | export declare function forEachInEnum<E extends Indexable>(types: E, callback: (prop: string) => void): void;
|
44 | export declare function findMatchInEnum<E extends Indexable>(types: E, lookup: string): string | undefined;
|