@social-mail/social-mail-client 1.2.698 → 1.2.700
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 +24 -17
- package/dist/public/channel/ChannelCalendarView.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +223 -18
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +54 -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 +35 -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 {
|
|
@@ -62,6 +68,7 @@ declare global {
|
|
|
62
68
|
background-color: #ffe1217d;
|
|
63
69
|
border-radius: 9999px;
|
|
64
70
|
max-height: 20px;
|
|
71
|
+
line-height: 20px;
|
|
65
72
|
padding: 2px;
|
|
66
73
|
padding-left: 5px;
|
|
67
74
|
text-decoration: none;
|
|
@@ -195,6 +202,8 @@ export default class ChannelCalendarView extends AtomControl {
|
|
|
195
202
|
|
|
196
203
|
calendarEvents: Map<number,IMailboxContactEvent[]> = new Map();
|
|
197
204
|
|
|
205
|
+
time = TimeSpan.parse("11:00 AM");
|
|
206
|
+
|
|
198
207
|
constructor(app, e) {
|
|
199
208
|
super(app, e);
|
|
200
209
|
this.element.setAttribute("calendar-view", "simple");
|
|
@@ -226,20 +235,36 @@ export default class ChannelCalendarView extends AtomControl {
|
|
|
226
235
|
<calendar-events
|
|
227
236
|
{ ... renderChildren(Bind.source( { self: this }, (s) => this.renderEventItem(s.source.self.calendarEvents, s.source.self.selectedDate) )) }
|
|
228
237
|
/>
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
<details>
|
|
239
|
+
<summary>Create New</summary>
|
|
240
|
+
<div data-layout="row">
|
|
241
|
+
Create Event at
|
|
242
|
+
<TimeEditor time={Bind.twoWaysImmediate(() => this.time)} />
|
|
243
|
+
<share-button
|
|
244
|
+
href={Bind.oneWay(() => this.createEvent(this.selectedDate, this.time) )}>
|
|
245
|
+
Create Event
|
|
246
|
+
</share-button>
|
|
247
|
+
</div>
|
|
248
|
+
</details>
|
|
239
249
|
</vflex-div>
|
|
240
250
|
</div>;
|
|
241
251
|
|
|
242
252
|
}
|
|
253
|
+
|
|
254
|
+
createEvent(date: DateTime, time) {
|
|
255
|
+
let l = "";
|
|
256
|
+
// let l = dateObject.location;
|
|
257
|
+
// if (l) {
|
|
258
|
+
// l = `📍: ${l}`;
|
|
259
|
+
// }
|
|
260
|
+
const d = date.date.add(time);
|
|
261
|
+
const body = `\r\nEvent on: 📅: ${d.toJSON()}\r\n${l}`;
|
|
262
|
+
return Mailto.create({
|
|
263
|
+
to: this.channel.emailAddress.emailAddress,
|
|
264
|
+
body
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
243
268
|
renderEvent(calendarEvents: Map<number, IMailboxContactEvent[]>, date: DateTime) {
|
|
244
269
|
const items = calendarEvents.get(date.date.msSinceEpoch);
|
|
245
270
|
if (!items) {
|