@social-mail/social-mail-client 1.2.698 → 1.2.699
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/dist/public/channel/ChannelCalendarView.d.ts +3 -0
- package/dist/public/channel/ChannelCalendarView.d.ts.map +1 -1
- package/dist/public/channel/ChannelCalendarView.js +23 -17
- package/dist/public/channel/ChannelCalendarView.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +222 -18
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +53 -3
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/channel/ChannelCalendarView.tsx +34 -10
package/package.json
CHANGED
|
@@ -15,6 +15,12 @@ import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
|
|
|
15
15
|
import { UrlService } from "./UrlService";
|
|
16
16
|
import { Mailto } from "../../common/Mailto";
|
|
17
17
|
import { WebComponents } from "../../site-editor/editor/webComponentsPath";
|
|
18
|
+
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
19
|
+
import PopupService from "@web-atoms/core/dist/web/services/PopupService";
|
|
20
|
+
import TimeEditor from "@web-atoms/web-controls/dist/basic/TimeEditor";
|
|
21
|
+
import Form from "@web-atoms/web-controls/dist/basic/Form";
|
|
22
|
+
import FormField from "@web-atoms/web-controls/dist/basic/FormField";
|
|
23
|
+
import TimeSpan from "@web-atoms/date-time/dist/TimeSpan";
|
|
18
24
|
|
|
19
25
|
declare global {
|
|
20
26
|
namespace JSX {
|
|
@@ -195,6 +201,8 @@ export default class ChannelCalendarView extends AtomControl {
|
|
|
195
201
|
|
|
196
202
|
calendarEvents: Map<number,IMailboxContactEvent[]> = new Map();
|
|
197
203
|
|
|
204
|
+
time = TimeSpan.parse("11:00 AM");
|
|
205
|
+
|
|
198
206
|
constructor(app, e) {
|
|
199
207
|
super(app, e);
|
|
200
208
|
this.element.setAttribute("calendar-view", "simple");
|
|
@@ -226,20 +234,36 @@ export default class ChannelCalendarView extends AtomControl {
|
|
|
226
234
|
<calendar-events
|
|
227
235
|
{ ... renderChildren(Bind.source( { self: this }, (s) => this.renderEventItem(s.source.self.calendarEvents, s.source.self.selectedDate) )) }
|
|
228
236
|
/>
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
<details>
|
|
238
|
+
<summary>Create New</summary>
|
|
239
|
+
<div data-layout="row">
|
|
240
|
+
Create Event at
|
|
241
|
+
<TimeEditor time={Bind.twoWaysImmediate(() => this.time)} />
|
|
242
|
+
<share-button
|
|
243
|
+
href={Bind.oneWay(() => this.createEvent(this.selectedDate, this.time) )}>
|
|
244
|
+
Create Event
|
|
245
|
+
</share-button>
|
|
246
|
+
</div>
|
|
247
|
+
</details>
|
|
239
248
|
</vflex-div>
|
|
240
249
|
</div>;
|
|
241
250
|
|
|
242
251
|
}
|
|
252
|
+
|
|
253
|
+
createEvent(date: DateTime, time) {
|
|
254
|
+
let l = "";
|
|
255
|
+
// let l = dateObject.location;
|
|
256
|
+
// if (l) {
|
|
257
|
+
// l = `📍: ${l}`;
|
|
258
|
+
// }
|
|
259
|
+
const d = date.date.add(time);
|
|
260
|
+
const body = `\r\nEvent on: 📅: ${d.toJSON()}\r\n${l}`;
|
|
261
|
+
return Mailto.create({
|
|
262
|
+
to: this.channel.emailAddress.emailAddress,
|
|
263
|
+
body
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
243
267
|
renderEvent(calendarEvents: Map<number, IMailboxContactEvent[]>, date: DateTime) {
|
|
244
268
|
const items = calendarEvents.get(date.date.msSinceEpoch);
|
|
245
269
|
if (!items) {
|