@sprucelabs/spruce-calendar-components 20.5.5 → 20.5.8
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.
|
@@ -153,6 +153,7 @@ export default class RemoteEventStore {
|
|
|
153
153
|
return target;
|
|
154
154
|
}
|
|
155
155
|
cleanPayload(payload) {
|
|
156
|
+
const dateToUpdate = payload.dateToUpdate;
|
|
156
157
|
const normalized = normalizeSchemaValues(calendarEventSchema, payload, {
|
|
157
158
|
shouldValidate: false,
|
|
158
159
|
});
|
|
@@ -171,6 +172,10 @@ export default class RemoteEventStore {
|
|
|
171
172
|
//@ts-ignore
|
|
172
173
|
delete normalized[key];
|
|
173
174
|
}
|
|
175
|
+
if (dateToUpdate) {
|
|
176
|
+
;
|
|
177
|
+
normalized.dateToUpdate = dateToUpdate;
|
|
178
|
+
}
|
|
174
179
|
return normalized;
|
|
175
180
|
}
|
|
176
181
|
setCalendarId(id) {
|
|
@@ -38,6 +38,7 @@ export default class EventDateTimeToolViewController extends AbstractViewControl
|
|
|
38
38
|
let shouldBail = false;
|
|
39
39
|
const formattedDestination = dateUtil.format(dateTimeMs, 'MMM do');
|
|
40
40
|
const dlg = this.renderInDialog({
|
|
41
|
+
shouldShowCloseButton: false,
|
|
41
42
|
header: {
|
|
42
43
|
title: 'Which would you like to do?',
|
|
43
44
|
},
|
|
@@ -47,14 +48,14 @@ export default class EventDateTimeToolViewController extends AbstractViewControl
|
|
|
47
48
|
buttons: [
|
|
48
49
|
{
|
|
49
50
|
id: 'move',
|
|
50
|
-
label: `Move this event to ${formattedDestination}
|
|
51
|
+
label: `Move this event to ${formattedDestination}.`,
|
|
51
52
|
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
52
53
|
yield dlg.hide();
|
|
53
54
|
}),
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
id: 'navigate',
|
|
57
|
-
label: `Deselect event and navigate to ${formattedDestination}
|
|
58
|
+
label: `Deselect event and navigate to ${formattedDestination}.`,
|
|
58
59
|
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
59
60
|
shouldBail = true;
|
|
60
61
|
const { calendarVc } = this.getContext();
|
|
@@ -139,6 +139,7 @@ class RemoteEventStore {
|
|
|
139
139
|
return target;
|
|
140
140
|
}
|
|
141
141
|
cleanPayload(payload) {
|
|
142
|
+
const dateToUpdate = payload.dateToUpdate;
|
|
142
143
|
const normalized = (0, schema_1.normalizeSchemaValues)(calendar_utils_1.calendarEventSchema, payload, {
|
|
143
144
|
shouldValidate: false,
|
|
144
145
|
});
|
|
@@ -157,6 +158,10 @@ class RemoteEventStore {
|
|
|
157
158
|
//@ts-ignore
|
|
158
159
|
delete normalized[key];
|
|
159
160
|
}
|
|
161
|
+
if (dateToUpdate) {
|
|
162
|
+
;
|
|
163
|
+
normalized.dateToUpdate = dateToUpdate;
|
|
164
|
+
}
|
|
160
165
|
return normalized;
|
|
161
166
|
}
|
|
162
167
|
setCalendarId(id) {
|
|
@@ -30,6 +30,7 @@ class EventDateTimeToolViewController extends heartwood_view_controllers_1.Abstr
|
|
|
30
30
|
let shouldBail = false;
|
|
31
31
|
const formattedDestination = calendar_utils_1.dateUtil.format(dateTimeMs, 'MMM do');
|
|
32
32
|
const dlg = this.renderInDialog({
|
|
33
|
+
shouldShowCloseButton: false,
|
|
33
34
|
header: {
|
|
34
35
|
title: 'Which would you like to do?',
|
|
35
36
|
},
|
|
@@ -39,14 +40,14 @@ class EventDateTimeToolViewController extends heartwood_view_controllers_1.Abstr
|
|
|
39
40
|
buttons: [
|
|
40
41
|
{
|
|
41
42
|
id: 'move',
|
|
42
|
-
label: `Move this event to ${formattedDestination}
|
|
43
|
+
label: `Move this event to ${formattedDestination}.`,
|
|
43
44
|
onClick: async () => {
|
|
44
45
|
await dlg.hide();
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
id: 'navigate',
|
|
49
|
-
label: `Deselect event and navigate to ${formattedDestination}
|
|
50
|
+
label: `Deselect event and navigate to ${formattedDestination}.`,
|
|
50
51
|
onClick: async () => {
|
|
51
52
|
shouldBail = true;
|
|
52
53
|
const { calendarVc } = this.getContext();
|