@atlaskit/task-decision 19.2.8 → 19.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/afm-cc/tsconfig.json +2 -2
- package/dist/types/components/DecisionItem.d.ts +3 -3
- package/dist/types/components/Item.d.ts +6 -6
- package/dist/types/components/ResourcedTaskItem.d.ts +14 -14
- package/dist/types/components/TaskItem.d.ts +9 -9
- package/dist/types/components/TaskList.d.ts +1 -1
- package/dist/types/types.d.ts +13 -13
- package/dist/types-ts4.5/components/DecisionItem.d.ts +3 -3
- package/dist/types-ts4.5/components/Item.d.ts +6 -6
- package/dist/types-ts4.5/components/ResourcedTaskItem.d.ts +14 -14
- package/dist/types-ts4.5/components/TaskItem.d.ts +9 -9
- package/dist/types-ts4.5/components/TaskList.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +13 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/task-decision
|
|
2
2
|
|
|
3
|
+
## 19.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0fdcb6f2f96fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fdcb6f2f96fd) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 19.2.8
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type Appearance, type ContentRef } from '../types';
|
|
2
2
|
export interface Props {
|
|
3
|
+
appearance?: Appearance;
|
|
3
4
|
children?: any;
|
|
4
5
|
contentRef?: ContentRef;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
showPlaceholder?: boolean;
|
|
7
|
-
appearance?: Appearance;
|
|
8
6
|
dataAttributes?: {
|
|
9
7
|
[key: string]: string | number;
|
|
10
8
|
};
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
showPlaceholder?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) => JSX.Element;
|
|
13
13
|
export default DecisionItem;
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
6
|
import { type Appearance, type ContentRef, type TaskType, type DecisionType } from '../types';
|
|
7
7
|
export interface Props {
|
|
8
|
-
icon: JSX.Element;
|
|
9
|
-
itemType: TaskType | DecisionType;
|
|
10
|
-
children?: any;
|
|
11
8
|
appearance?: Appearance;
|
|
9
|
+
checkBoxId?: string;
|
|
10
|
+
children?: any;
|
|
12
11
|
contentRef?: ContentRef;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
showPlaceholder?: boolean;
|
|
15
12
|
dataAttributes?: {
|
|
16
13
|
[key: string]: string | number;
|
|
17
14
|
};
|
|
18
|
-
|
|
15
|
+
icon: JSX.Element;
|
|
16
|
+
itemType: TaskType | DecisionType;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
showPlaceholder?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export default class Item extends PureComponent<Props, {}> {
|
|
21
21
|
static defaultProps: Partial<Props>;
|
|
@@ -2,25 +2,25 @@ import React, { type Ref } from 'react';
|
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
|
|
4
4
|
export interface Props {
|
|
5
|
-
taskId: string;
|
|
6
|
-
isDone?: boolean;
|
|
7
|
-
isRenderer?: boolean;
|
|
8
|
-
isFocused?: boolean;
|
|
9
|
-
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
contentRef?: ContentRef;
|
|
12
|
-
children?: any;
|
|
13
|
-
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
14
|
-
objectAri?: string;
|
|
15
|
-
showPlaceholder?: boolean;
|
|
16
|
-
placeholder?: string;
|
|
17
5
|
appearance?: Appearance;
|
|
18
|
-
|
|
6
|
+
children?: any;
|
|
7
|
+
contentRef?: ContentRef;
|
|
19
8
|
dataAttributes?: {
|
|
20
9
|
[key: string]: string | number;
|
|
21
10
|
};
|
|
22
|
-
|
|
11
|
+
disabled?: boolean;
|
|
23
12
|
disableOnChange?: boolean;
|
|
13
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
14
|
+
isDone?: boolean;
|
|
15
|
+
isFocused?: boolean;
|
|
16
|
+
isRenderer?: boolean;
|
|
17
|
+
objectAri?: string;
|
|
18
|
+
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
showPlaceholder?: boolean;
|
|
22
|
+
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
23
|
+
taskId: string;
|
|
24
24
|
}
|
|
25
25
|
export interface State {
|
|
26
26
|
isDone?: boolean;
|
|
@@ -6,22 +6,22 @@ import React, { type Ref } from 'react';
|
|
|
6
6
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
7
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
8
|
export interface Props {
|
|
9
|
-
|
|
9
|
+
appearance?: Appearance;
|
|
10
|
+
children?: any;
|
|
11
|
+
contentRef?: ContentRef;
|
|
12
|
+
dataAttributes?: {
|
|
13
|
+
[key: string]: string | number;
|
|
14
|
+
};
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
10
17
|
isDone?: boolean;
|
|
11
18
|
isFocused?: boolean;
|
|
12
19
|
isRenderer?: boolean;
|
|
13
20
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
14
21
|
onClick?: () => void;
|
|
15
|
-
contentRef?: ContentRef;
|
|
16
|
-
children?: any;
|
|
17
22
|
placeholder?: string;
|
|
18
23
|
showPlaceholder?: boolean;
|
|
19
|
-
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
dataAttributes?: {
|
|
22
|
-
[key: string]: string | number;
|
|
23
|
-
};
|
|
24
|
-
inputRef?: Ref<HTMLInputElement>;
|
|
24
|
+
taskId: string;
|
|
25
25
|
}
|
|
26
26
|
declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
27
27
|
export default _default;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -9,20 +9,20 @@ export interface ContentRef {
|
|
|
9
9
|
(ref: HTMLElement | null): void;
|
|
10
10
|
}
|
|
11
11
|
export interface ObjectKey {
|
|
12
|
-
localId: string;
|
|
13
12
|
containerAri?: string;
|
|
13
|
+
localId: string;
|
|
14
14
|
objectAri: string;
|
|
15
15
|
}
|
|
16
16
|
export interface BaseItem<S> extends ObjectKey {
|
|
17
|
-
state: S;
|
|
18
17
|
lastUpdateDate: Date;
|
|
18
|
+
state: S;
|
|
19
19
|
type: DecisionType | TaskType;
|
|
20
20
|
}
|
|
21
21
|
export interface ServiceDecision {
|
|
22
22
|
creationDate?: string;
|
|
23
23
|
creatorId?: UserId;
|
|
24
|
-
lastUpdaterId?: UserId;
|
|
25
24
|
lastUpdateDate: string;
|
|
25
|
+
lastUpdaterId?: UserId;
|
|
26
26
|
localId: string;
|
|
27
27
|
objectAri: string;
|
|
28
28
|
participants?: UserId[];
|
|
@@ -47,8 +47,8 @@ export interface ServiceTaskState {
|
|
|
47
47
|
export interface Decision extends BaseItem<DecisionState> {
|
|
48
48
|
creationDate?: Date;
|
|
49
49
|
creator?: UserId;
|
|
50
|
-
lastUpdater?: UserId;
|
|
51
50
|
lastUpdateDate: Date;
|
|
51
|
+
lastUpdater?: UserId;
|
|
52
52
|
participants?: UserId[];
|
|
53
53
|
status: DecisionStatus;
|
|
54
54
|
type: DecisionType;
|
|
@@ -58,8 +58,8 @@ export type UserId = string;
|
|
|
58
58
|
export interface ServiceTask {
|
|
59
59
|
creationDate?: string;
|
|
60
60
|
creatorId?: UserId;
|
|
61
|
-
lastUpdaterId?: UserId;
|
|
62
61
|
lastUpdateDate: string;
|
|
62
|
+
lastUpdaterId?: UserId;
|
|
63
63
|
localId: string;
|
|
64
64
|
objectAri: string;
|
|
65
65
|
parentLocalId?: string;
|
|
@@ -71,8 +71,8 @@ export interface ServiceTask {
|
|
|
71
71
|
export interface Task extends BaseItem<TaskState> {
|
|
72
72
|
creationDate?: Date;
|
|
73
73
|
creator?: UserId;
|
|
74
|
-
lastUpdater?: UserId;
|
|
75
74
|
lastUpdateDate: Date;
|
|
75
|
+
lastUpdater?: UserId;
|
|
76
76
|
parentLocalId?: string;
|
|
77
77
|
participants?: UserId[];
|
|
78
78
|
position?: number;
|
|
@@ -81,8 +81,8 @@ export interface Task extends BaseItem<TaskState> {
|
|
|
81
81
|
export type Handler = (state: TaskState | DecisionState) => void;
|
|
82
82
|
export type RecentUpdatesId = string;
|
|
83
83
|
export interface RecentUpdateContext {
|
|
84
|
-
objectAri: string;
|
|
85
84
|
localId?: string;
|
|
85
|
+
objectAri: string;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* A subscriber interface that can be called back if there are new decisions/tasks/items
|
|
@@ -104,7 +104,6 @@ export interface RecentUpdatesListener {
|
|
|
104
104
|
recentUpdates(updateContext: RecentUpdateContext): void;
|
|
105
105
|
}
|
|
106
106
|
export interface TaskDecisionResourceConfig extends ServiceConfig {
|
|
107
|
-
pubSubClient?: PubSubClient;
|
|
108
107
|
/**
|
|
109
108
|
* Indicates if initial state for an action or decision is should be cached,
|
|
110
109
|
* from the content, i.e. was originally hydrated from the service initially,
|
|
@@ -116,20 +115,21 @@ export interface TaskDecisionResourceConfig extends ServiceConfig {
|
|
|
116
115
|
* If false the state will always be hydrated from the service on first view.
|
|
117
116
|
*/
|
|
118
117
|
disableServiceHydration?: boolean;
|
|
118
|
+
pubSubClient?: PubSubClient;
|
|
119
119
|
}
|
|
120
120
|
export interface TaskDecisionProvider {
|
|
121
|
-
unsubscribeRecentUpdates(id: RecentUpdatesId): void;
|
|
122
121
|
notifyRecentUpdates(updateContext: RecentUpdateContext): void;
|
|
123
|
-
toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
|
|
124
122
|
subscribe(objectKey: ObjectKey, handler: Handler, item?: BaseItem<TaskState | DecisionState>): void;
|
|
123
|
+
toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
|
|
125
124
|
unsubscribe(objectKey: ObjectKey, handler: Handler): void;
|
|
125
|
+
unsubscribeRecentUpdates(id: RecentUpdatesId): void;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Same as RendererContext in editor-core (don't want an direct dep though)
|
|
129
129
|
*/
|
|
130
130
|
export interface RendererContext {
|
|
131
|
-
objectAri: string;
|
|
132
131
|
containerAri?: string;
|
|
132
|
+
objectAri: string;
|
|
133
133
|
}
|
|
134
134
|
export interface RenderDocument {
|
|
135
135
|
(document: any, rendererContext?: RendererContext): JSX.Element;
|
|
@@ -147,10 +147,10 @@ export interface PubSubOnEvent<T = any> {
|
|
|
147
147
|
(event: string, data: T): void;
|
|
148
148
|
}
|
|
149
149
|
export interface PubSubClient {
|
|
150
|
-
on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
151
|
-
off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
152
150
|
join(aris: ARI[]): Promise<PubSubClient>;
|
|
153
151
|
leave(aris: ARI[]): Promise<PubSubClient>;
|
|
152
|
+
off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
153
|
+
on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
154
154
|
}
|
|
155
155
|
export declare enum PubSubSpecialEventType {
|
|
156
156
|
ERROR = "ERROR",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type Appearance, type ContentRef } from '../types';
|
|
2
2
|
export interface Props {
|
|
3
|
+
appearance?: Appearance;
|
|
3
4
|
children?: any;
|
|
4
5
|
contentRef?: ContentRef;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
showPlaceholder?: boolean;
|
|
7
|
-
appearance?: Appearance;
|
|
8
6
|
dataAttributes?: {
|
|
9
7
|
[key: string]: string | number;
|
|
10
8
|
};
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
showPlaceholder?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) => JSX.Element;
|
|
13
13
|
export default DecisionItem;
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
6
|
import { type Appearance, type ContentRef, type TaskType, type DecisionType } from '../types';
|
|
7
7
|
export interface Props {
|
|
8
|
-
icon: JSX.Element;
|
|
9
|
-
itemType: TaskType | DecisionType;
|
|
10
|
-
children?: any;
|
|
11
8
|
appearance?: Appearance;
|
|
9
|
+
checkBoxId?: string;
|
|
10
|
+
children?: any;
|
|
12
11
|
contentRef?: ContentRef;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
showPlaceholder?: boolean;
|
|
15
12
|
dataAttributes?: {
|
|
16
13
|
[key: string]: string | number;
|
|
17
14
|
};
|
|
18
|
-
|
|
15
|
+
icon: JSX.Element;
|
|
16
|
+
itemType: TaskType | DecisionType;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
showPlaceholder?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export default class Item extends PureComponent<Props, {}> {
|
|
21
21
|
static defaultProps: Partial<Props>;
|
|
@@ -2,25 +2,25 @@ import React, { type Ref } from 'react';
|
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
|
|
4
4
|
export interface Props {
|
|
5
|
-
taskId: string;
|
|
6
|
-
isDone?: boolean;
|
|
7
|
-
isRenderer?: boolean;
|
|
8
|
-
isFocused?: boolean;
|
|
9
|
-
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
contentRef?: ContentRef;
|
|
12
|
-
children?: any;
|
|
13
|
-
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
14
|
-
objectAri?: string;
|
|
15
|
-
showPlaceholder?: boolean;
|
|
16
|
-
placeholder?: string;
|
|
17
5
|
appearance?: Appearance;
|
|
18
|
-
|
|
6
|
+
children?: any;
|
|
7
|
+
contentRef?: ContentRef;
|
|
19
8
|
dataAttributes?: {
|
|
20
9
|
[key: string]: string | number;
|
|
21
10
|
};
|
|
22
|
-
|
|
11
|
+
disabled?: boolean;
|
|
23
12
|
disableOnChange?: boolean;
|
|
13
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
14
|
+
isDone?: boolean;
|
|
15
|
+
isFocused?: boolean;
|
|
16
|
+
isRenderer?: boolean;
|
|
17
|
+
objectAri?: string;
|
|
18
|
+
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
showPlaceholder?: boolean;
|
|
22
|
+
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
23
|
+
taskId: string;
|
|
24
24
|
}
|
|
25
25
|
export interface State {
|
|
26
26
|
isDone?: boolean;
|
|
@@ -6,22 +6,22 @@ import React, { type Ref } from 'react';
|
|
|
6
6
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
7
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
8
|
export interface Props {
|
|
9
|
-
|
|
9
|
+
appearance?: Appearance;
|
|
10
|
+
children?: any;
|
|
11
|
+
contentRef?: ContentRef;
|
|
12
|
+
dataAttributes?: {
|
|
13
|
+
[key: string]: string | number;
|
|
14
|
+
};
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
10
17
|
isDone?: boolean;
|
|
11
18
|
isFocused?: boolean;
|
|
12
19
|
isRenderer?: boolean;
|
|
13
20
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
14
21
|
onClick?: () => void;
|
|
15
|
-
contentRef?: ContentRef;
|
|
16
|
-
children?: any;
|
|
17
22
|
placeholder?: string;
|
|
18
23
|
showPlaceholder?: boolean;
|
|
19
|
-
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
dataAttributes?: {
|
|
22
|
-
[key: string]: string | number;
|
|
23
|
-
};
|
|
24
|
-
inputRef?: Ref<HTMLInputElement>;
|
|
24
|
+
taskId: string;
|
|
25
25
|
}
|
|
26
26
|
declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
27
27
|
export default _default;
|
|
@@ -9,20 +9,20 @@ export interface ContentRef {
|
|
|
9
9
|
(ref: HTMLElement | null): void;
|
|
10
10
|
}
|
|
11
11
|
export interface ObjectKey {
|
|
12
|
-
localId: string;
|
|
13
12
|
containerAri?: string;
|
|
13
|
+
localId: string;
|
|
14
14
|
objectAri: string;
|
|
15
15
|
}
|
|
16
16
|
export interface BaseItem<S> extends ObjectKey {
|
|
17
|
-
state: S;
|
|
18
17
|
lastUpdateDate: Date;
|
|
18
|
+
state: S;
|
|
19
19
|
type: DecisionType | TaskType;
|
|
20
20
|
}
|
|
21
21
|
export interface ServiceDecision {
|
|
22
22
|
creationDate?: string;
|
|
23
23
|
creatorId?: UserId;
|
|
24
|
-
lastUpdaterId?: UserId;
|
|
25
24
|
lastUpdateDate: string;
|
|
25
|
+
lastUpdaterId?: UserId;
|
|
26
26
|
localId: string;
|
|
27
27
|
objectAri: string;
|
|
28
28
|
participants?: UserId[];
|
|
@@ -47,8 +47,8 @@ export interface ServiceTaskState {
|
|
|
47
47
|
export interface Decision extends BaseItem<DecisionState> {
|
|
48
48
|
creationDate?: Date;
|
|
49
49
|
creator?: UserId;
|
|
50
|
-
lastUpdater?: UserId;
|
|
51
50
|
lastUpdateDate: Date;
|
|
51
|
+
lastUpdater?: UserId;
|
|
52
52
|
participants?: UserId[];
|
|
53
53
|
status: DecisionStatus;
|
|
54
54
|
type: DecisionType;
|
|
@@ -58,8 +58,8 @@ export type UserId = string;
|
|
|
58
58
|
export interface ServiceTask {
|
|
59
59
|
creationDate?: string;
|
|
60
60
|
creatorId?: UserId;
|
|
61
|
-
lastUpdaterId?: UserId;
|
|
62
61
|
lastUpdateDate: string;
|
|
62
|
+
lastUpdaterId?: UserId;
|
|
63
63
|
localId: string;
|
|
64
64
|
objectAri: string;
|
|
65
65
|
parentLocalId?: string;
|
|
@@ -71,8 +71,8 @@ export interface ServiceTask {
|
|
|
71
71
|
export interface Task extends BaseItem<TaskState> {
|
|
72
72
|
creationDate?: Date;
|
|
73
73
|
creator?: UserId;
|
|
74
|
-
lastUpdater?: UserId;
|
|
75
74
|
lastUpdateDate: Date;
|
|
75
|
+
lastUpdater?: UserId;
|
|
76
76
|
parentLocalId?: string;
|
|
77
77
|
participants?: UserId[];
|
|
78
78
|
position?: number;
|
|
@@ -81,8 +81,8 @@ export interface Task extends BaseItem<TaskState> {
|
|
|
81
81
|
export type Handler = (state: TaskState | DecisionState) => void;
|
|
82
82
|
export type RecentUpdatesId = string;
|
|
83
83
|
export interface RecentUpdateContext {
|
|
84
|
-
objectAri: string;
|
|
85
84
|
localId?: string;
|
|
85
|
+
objectAri: string;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* A subscriber interface that can be called back if there are new decisions/tasks/items
|
|
@@ -104,7 +104,6 @@ export interface RecentUpdatesListener {
|
|
|
104
104
|
recentUpdates(updateContext: RecentUpdateContext): void;
|
|
105
105
|
}
|
|
106
106
|
export interface TaskDecisionResourceConfig extends ServiceConfig {
|
|
107
|
-
pubSubClient?: PubSubClient;
|
|
108
107
|
/**
|
|
109
108
|
* Indicates if initial state for an action or decision is should be cached,
|
|
110
109
|
* from the content, i.e. was originally hydrated from the service initially,
|
|
@@ -116,20 +115,21 @@ export interface TaskDecisionResourceConfig extends ServiceConfig {
|
|
|
116
115
|
* If false the state will always be hydrated from the service on first view.
|
|
117
116
|
*/
|
|
118
117
|
disableServiceHydration?: boolean;
|
|
118
|
+
pubSubClient?: PubSubClient;
|
|
119
119
|
}
|
|
120
120
|
export interface TaskDecisionProvider {
|
|
121
|
-
unsubscribeRecentUpdates(id: RecentUpdatesId): void;
|
|
122
121
|
notifyRecentUpdates(updateContext: RecentUpdateContext): void;
|
|
123
|
-
toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
|
|
124
122
|
subscribe(objectKey: ObjectKey, handler: Handler, item?: BaseItem<TaskState | DecisionState>): void;
|
|
123
|
+
toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
|
|
125
124
|
unsubscribe(objectKey: ObjectKey, handler: Handler): void;
|
|
125
|
+
unsubscribeRecentUpdates(id: RecentUpdatesId): void;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Same as RendererContext in editor-core (don't want an direct dep though)
|
|
129
129
|
*/
|
|
130
130
|
export interface RendererContext {
|
|
131
|
-
objectAri: string;
|
|
132
131
|
containerAri?: string;
|
|
132
|
+
objectAri: string;
|
|
133
133
|
}
|
|
134
134
|
export interface RenderDocument {
|
|
135
135
|
(document: any, rendererContext?: RendererContext): JSX.Element;
|
|
@@ -147,10 +147,10 @@ export interface PubSubOnEvent<T = any> {
|
|
|
147
147
|
(event: string, data: T): void;
|
|
148
148
|
}
|
|
149
149
|
export interface PubSubClient {
|
|
150
|
-
on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
151
|
-
off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
152
150
|
join(aris: ARI[]): Promise<PubSubClient>;
|
|
153
151
|
leave(aris: ARI[]): Promise<PubSubClient>;
|
|
152
|
+
off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
153
|
+
on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
154
154
|
}
|
|
155
155
|
export declare enum PubSubSpecialEventType {
|
|
156
156
|
ERROR = "ERROR",
|