@sprucelabs/spruce-calendar-components 24.3.2 → 24.3.3
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/esm/toolBelt/states/AbstractCalendarEventToolBeltState.js +0 -7
- package/build/esm/tools/EventRepeatingTool.vc.js +0 -2
- package/build/esm/viewControllers/RepeatingControlsList.vc.js +0 -1
- package/build/toolBelt/states/AbstractCalendarEventToolBeltState.js +0 -7
- package/build/tools/EventRepeatingTool.vc.js +0 -2
- package/build/viewControllers/RepeatingControlsList.vc.js +0 -1
- package/package.json +1 -1
|
@@ -21,7 +21,6 @@ export default class AbstractCalendarEventToolBeltState {
|
|
|
21
21
|
this.sm = sm;
|
|
22
22
|
this.toolBeltVc = sm.getToolBeltVc();
|
|
23
23
|
this.isLoaded = true;
|
|
24
|
-
console.log('load in abstract in calendar skill');
|
|
25
24
|
this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.sm.getContext().cancelEvent }));
|
|
26
25
|
this.events = sm.getContext().events;
|
|
27
26
|
this.events.setUpdateContextHandler((updates) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -67,10 +66,8 @@ export default class AbstractCalendarEventToolBeltState {
|
|
|
67
66
|
}
|
|
68
67
|
handleDidUpdateContext(skipToolWithId) {
|
|
69
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
console.log('didUpdate skipping', skipToolWithId);
|
|
71
69
|
yield Promise.all(this.vcs.map(({ vc, toolId }) => __awaiter(this, void 0, void 0, function* () {
|
|
72
70
|
if (toolId !== skipToolWithId) {
|
|
73
|
-
console.log('sending to', toolId);
|
|
74
71
|
yield vc.handleUpdateContext(this.getContext());
|
|
75
72
|
}
|
|
76
73
|
})));
|
|
@@ -145,10 +142,8 @@ export default class AbstractCalendarEventToolBeltState {
|
|
|
145
142
|
}
|
|
146
143
|
handleUpdateContextFromTool(updates, fromToolId, options) {
|
|
147
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
console.log('handleUpdateContextFromTool', updates);
|
|
149
145
|
const pendingUpdates = Object.assign(Object.assign({}, this.pendingContextUpdates), updates);
|
|
150
146
|
if (compare(this.pendingContextUpdates, pendingUpdates)) {
|
|
151
|
-
console.log('no changes!?');
|
|
152
147
|
return false;
|
|
153
148
|
}
|
|
154
149
|
this.pendingContextUpdates = pendingUpdates;
|
|
@@ -156,11 +151,9 @@ export default class AbstractCalendarEventToolBeltState {
|
|
|
156
151
|
const shouldPersistChanges = (vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
|
|
157
152
|
(options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately);
|
|
158
153
|
if (shouldPersistChanges) {
|
|
159
|
-
console.log('updating context right away');
|
|
160
154
|
return this.sm.updateContext(Object.assign({}, updates));
|
|
161
155
|
}
|
|
162
156
|
else {
|
|
163
|
-
console.log('saving as pending');
|
|
164
157
|
yield this.handleDidUpdateContext(fromToolId);
|
|
165
158
|
}
|
|
166
159
|
return false;
|
|
@@ -43,7 +43,6 @@ class EventRepeatingToolViewController extends AbstractViewController {
|
|
|
43
43
|
}
|
|
44
44
|
handleDidChangeRepeating(value) {
|
|
45
45
|
var _a;
|
|
46
|
-
console.log('handleDidChangeRepeating from repeating tool', value);
|
|
47
46
|
const cleaned = this.removeExtraRepeatingFields(value);
|
|
48
47
|
const updates = Object.assign({ repeats: undefined, interval: undefined, repeatsUntil: undefined, occurrences: undefined, daysOfWeek: undefined, daysOfMonth: undefined }, cleaned);
|
|
49
48
|
const keyedUpdates = {};
|
|
@@ -51,7 +50,6 @@ class EventRepeatingToolViewController extends AbstractViewController {
|
|
|
51
50
|
//@ts-ignore
|
|
52
51
|
keyedUpdates[`event.${k}`] = updates[k];
|
|
53
52
|
});
|
|
54
|
-
console.log('calling updateContextHandler in repeating tool');
|
|
55
53
|
const pass = (_a = this.updateContextHandler) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign({}, keyedUpdates));
|
|
56
54
|
return pass;
|
|
57
55
|
}
|
|
@@ -13,7 +13,6 @@ class RepeatingControlsListViewController extends AbstractViewController {
|
|
|
13
13
|
var _a;
|
|
14
14
|
super(options);
|
|
15
15
|
this.repeating = {};
|
|
16
|
-
console.log('repating controls constructor');
|
|
17
16
|
this.repeating = (_a = options.repeating) !== null && _a !== void 0 ? _a : {};
|
|
18
17
|
this.didChangeRepeating = options.didChangeRepeating;
|
|
19
18
|
this.calendarVc = this.CalendarVc();
|
|
@@ -16,7 +16,6 @@ class AbstractCalendarEventToolBeltState {
|
|
|
16
16
|
this.sm = sm;
|
|
17
17
|
this.toolBeltVc = sm.getToolBeltVc();
|
|
18
18
|
this.isLoaded = true;
|
|
19
|
-
console.log('load in abstract in calendar skill');
|
|
20
19
|
this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.sm.getContext().cancelEvent }));
|
|
21
20
|
this.events = sm.getContext().events;
|
|
22
21
|
this.events.setUpdateContextHandler(async (updates) => {
|
|
@@ -54,10 +53,8 @@ class AbstractCalendarEventToolBeltState {
|
|
|
54
53
|
await events.deselectEvent();
|
|
55
54
|
}
|
|
56
55
|
async handleDidUpdateContext(skipToolWithId) {
|
|
57
|
-
console.log('didUpdate skipping', skipToolWithId);
|
|
58
56
|
await Promise.all(this.vcs.map(async ({ vc, toolId }) => {
|
|
59
57
|
if (toolId !== skipToolWithId) {
|
|
60
|
-
console.log('sending to', toolId);
|
|
61
58
|
await vc.handleUpdateContext(this.getContext());
|
|
62
59
|
}
|
|
63
60
|
}));
|
|
@@ -122,10 +119,8 @@ class AbstractCalendarEventToolBeltState {
|
|
|
122
119
|
return null;
|
|
123
120
|
}
|
|
124
121
|
async handleUpdateContextFromTool(updates, fromToolId, options) {
|
|
125
|
-
console.log('handleUpdateContextFromTool', updates);
|
|
126
122
|
const pendingUpdates = Object.assign(Object.assign({}, this.pendingContextUpdates), updates);
|
|
127
123
|
if ((0, just_compare_1.default)(this.pendingContextUpdates, pendingUpdates)) {
|
|
128
|
-
console.log('no changes!?');
|
|
129
124
|
return false;
|
|
130
125
|
}
|
|
131
126
|
this.pendingContextUpdates = pendingUpdates;
|
|
@@ -133,11 +128,9 @@ class AbstractCalendarEventToolBeltState {
|
|
|
133
128
|
const shouldPersistChanges = (vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
|
|
134
129
|
(options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately);
|
|
135
130
|
if (shouldPersistChanges) {
|
|
136
|
-
console.log('updating context right away');
|
|
137
131
|
return this.sm.updateContext(Object.assign({}, updates));
|
|
138
132
|
}
|
|
139
133
|
else {
|
|
140
|
-
console.log('saving as pending');
|
|
141
134
|
await this.handleDidUpdateContext(fromToolId);
|
|
142
135
|
}
|
|
143
136
|
return false;
|
|
@@ -36,7 +36,6 @@ class EventRepeatingToolViewController extends heartwood_view_controllers_1.Abst
|
|
|
36
36
|
}
|
|
37
37
|
handleDidChangeRepeating(value) {
|
|
38
38
|
var _a;
|
|
39
|
-
console.log('handleDidChangeRepeating from repeating tool', value);
|
|
40
39
|
const cleaned = this.removeExtraRepeatingFields(value);
|
|
41
40
|
const updates = Object.assign({ repeats: undefined, interval: undefined, repeatsUntil: undefined, occurrences: undefined, daysOfWeek: undefined, daysOfMonth: undefined }, cleaned);
|
|
42
41
|
const keyedUpdates = {};
|
|
@@ -44,7 +43,6 @@ class EventRepeatingToolViewController extends heartwood_view_controllers_1.Abst
|
|
|
44
43
|
//@ts-ignore
|
|
45
44
|
keyedUpdates[`event.${k}`] = updates[k];
|
|
46
45
|
});
|
|
47
|
-
console.log('calling updateContextHandler in repeating tool');
|
|
48
46
|
const pass = (_a = this.updateContextHandler) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign({}, keyedUpdates));
|
|
49
47
|
return pass;
|
|
50
48
|
}
|
|
@@ -6,7 +6,6 @@ class RepeatingControlsListViewController extends heartwood_view_controllers_1.A
|
|
|
6
6
|
var _a;
|
|
7
7
|
super(options);
|
|
8
8
|
this.repeating = {};
|
|
9
|
-
console.log('repating controls constructor');
|
|
10
9
|
this.repeating = (_a = options.repeating) !== null && _a !== void 0 ? _a : {};
|
|
11
10
|
this.didChangeRepeating = options.didChangeRepeating;
|
|
12
11
|
this.calendarVc = this.CalendarVc();
|