@sprucelabs/spruce-calendar-components 20.9.21 → 20.9.22
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/build/.spruce/schemas/schemas.types.d.ts +347 -347
- package/build/esm/.spruce/schemas/schemas.types.d.ts +347 -347
- package/build/esm/stores/RemoteEventStore.js +2 -1
- package/build/esm/toolBelt/CalendarToolRegistrar.d.ts +4 -1
- package/build/esm/toolBelt/CalendarToolRegistrar.js +2 -0
- package/build/stores/RemoteEventStore.js +2 -1
- package/build/toolBelt/CalendarToolRegistrar.d.ts +4 -1
- package/build/toolBelt/CalendarToolRegistrar.js +2 -0
- package/package.json +1 -1
|
@@ -198,8 +198,9 @@ export default class RemoteEventStore {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
deleteEvent(id) {
|
|
201
|
+
var _a;
|
|
201
202
|
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
if (this.pendingEvent) {
|
|
203
|
+
if (((_a = this.pendingEvent) === null || _a === void 0 ? void 0 : _a.id) === id) {
|
|
203
204
|
delete this.pendingEvent;
|
|
204
205
|
}
|
|
205
206
|
else {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { RemoteCalendarTool, CalendarToolBeltStateMachine } from '../types/calendar.types';
|
|
2
|
+
export declare type AddToolHandler = (vc: RemoteCalendarTool & {
|
|
3
|
+
id: string;
|
|
4
|
+
}) => Promise<void> | void;
|
|
2
5
|
export default class CalendarToolRegistrar {
|
|
3
6
|
private sm;
|
|
4
7
|
private addToolHandler?;
|
|
5
|
-
constructor(sm: CalendarToolBeltStateMachine, addToolHandler?:
|
|
8
|
+
constructor(sm: CalendarToolBeltStateMachine, addToolHandler?: AddToolHandler);
|
|
6
9
|
fetchAndAddCards(controllerOptionsHandler?: (vcId: string) => Record<string, any>): Promise<void>;
|
|
7
10
|
private addTool;
|
|
8
11
|
}
|
|
@@ -46,6 +46,7 @@ export default class CalendarToolRegistrar {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
addTool(card) {
|
|
49
|
+
var _a;
|
|
49
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
51
|
const toolBeltVc = this.sm.getToolBeltVc();
|
|
51
52
|
if (this.addToolHandler) {
|
|
@@ -58,6 +59,7 @@ export default class CalendarToolRegistrar {
|
|
|
58
59
|
lineIcon: card.getLineIcon(),
|
|
59
60
|
card: card.render(),
|
|
60
61
|
});
|
|
62
|
+
yield ((_a = card.load) === null || _a === void 0 ? void 0 : _a.call(card));
|
|
61
63
|
}
|
|
62
64
|
});
|
|
63
65
|
}
|
|
@@ -182,7 +182,8 @@ class RemoteEventStore {
|
|
|
182
182
|
await Promise.all(this.promises);
|
|
183
183
|
}
|
|
184
184
|
async deleteEvent(id) {
|
|
185
|
-
|
|
185
|
+
var _a;
|
|
186
|
+
if (((_a = this.pendingEvent) === null || _a === void 0 ? void 0 : _a.id) === id) {
|
|
186
187
|
delete this.pendingEvent;
|
|
187
188
|
}
|
|
188
189
|
else {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { RemoteCalendarTool, CalendarToolBeltStateMachine } from '../types/calendar.types';
|
|
2
|
+
export declare type AddToolHandler = (vc: RemoteCalendarTool & {
|
|
3
|
+
id: string;
|
|
4
|
+
}) => Promise<void> | void;
|
|
2
5
|
export default class CalendarToolRegistrar {
|
|
3
6
|
private sm;
|
|
4
7
|
private addToolHandler?;
|
|
5
|
-
constructor(sm: CalendarToolBeltStateMachine, addToolHandler?:
|
|
8
|
+
constructor(sm: CalendarToolBeltStateMachine, addToolHandler?: AddToolHandler);
|
|
6
9
|
fetchAndAddCards(controllerOptionsHandler?: (vcId: string) => Record<string, any>): Promise<void>;
|
|
7
10
|
private addTool;
|
|
8
11
|
}
|
|
@@ -37,6 +37,7 @@ class CalendarToolRegistrar {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
async addTool(card) {
|
|
40
|
+
var _a;
|
|
40
41
|
const toolBeltVc = this.sm.getToolBeltVc();
|
|
41
42
|
if (this.addToolHandler) {
|
|
42
43
|
await this.addToolHandler(card);
|
|
@@ -48,6 +49,7 @@ class CalendarToolRegistrar {
|
|
|
48
49
|
lineIcon: card.getLineIcon(),
|
|
49
50
|
card: card.render(),
|
|
50
51
|
});
|
|
52
|
+
await ((_a = card.load) === null || _a === void 0 ? void 0 : _a.call(card));
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
}
|