@social-mail/social-mail-client 1.2.563 → 1.2.565
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/admin/AdminAppIndex.pack.js +1 -1
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/model/model.d.ts +1 -0
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js.map +1 -1
- package/dist/public/channel/ChannelView.js +1 -0
- package/dist/public/channel/ChannelView.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +15 -17
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +3 -3
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/public/channel/PostSummary.d.ts +3 -2
- package/dist/public/channel/PostSummary.d.ts.map +1 -1
- package/dist/public/channel/PostSummary.js +4 -1
- package/dist/public/channel/PostSummary.js.map +1 -1
- package/dist/public/channel/UrlService.d.ts +1 -1
- package/dist/public/channel/UrlService.d.ts.map +1 -1
- package/dist/public/channel/UrlService.js +9 -15
- package/dist/public/channel/UrlService.js.map +1 -1
- package/dist/public/channel/controls/PostList.js +1 -1
- package/dist/public/channel/controls/PostList.js.map +1 -1
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.min.js.map +1 -1
- package/dist/site-editor/editor/webComponentsPath.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +1 -1
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/model/model.ts +1 -0
- package/src/public/channel/ChannelView.tsx +1 -1
- package/src/public/channel/PostSummary.tsx +3 -2
- package/src/public/channel/UrlService.ts +5 -12
- package/src/public/channel/controls/PostList.tsx +1 -1
- package/src/site-editor/editor/webComponentsPath.ts +1 -1
package/package.json
CHANGED
package/src/model/model.ts
CHANGED
|
@@ -95,7 +95,7 @@ export default class ChannelMessage extends AtomControl {
|
|
|
95
95
|
data-items-updated-event="items-updated"
|
|
96
96
|
event-items-updated={() => this.itemsUpdated()}
|
|
97
97
|
data-auto-scroll="false"
|
|
98
|
-
itemRenderer={(x) => <PostSummary mailboxEmail={x} />}
|
|
98
|
+
itemRenderer={(x) => <PostSummary channel={channel} mailboxEmail={x} />}
|
|
99
99
|
items={this.emails}
|
|
100
100
|
{ ... InfiniteRepeater.pagedItems((start) =>
|
|
101
101
|
(c, e, cancelToken) =>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
2
|
-
import { IEmail, IEmailEngagement, IMailboxEmail } from "../../model/model";
|
|
2
|
+
import { IEmail, IEmailEngagement, IMailbox, IMailboxEmail } from "../../model/model";
|
|
3
3
|
import { DateFormats } from "../../common/date/DateFormats";
|
|
4
4
|
import { UMD } from "@web-atoms/core/dist/core/types";
|
|
5
5
|
import { renderMail } from "../../web/page/mails/service/ConversationService";
|
|
@@ -8,6 +8,7 @@ import { UrlService } from "./UrlService";
|
|
|
8
8
|
const commentIcon = "💬";
|
|
9
9
|
|
|
10
10
|
export default function PostSummary ({
|
|
11
|
+
channel = void 0 as IMailbox,
|
|
11
12
|
mailboxEmail = void 0 as IMailboxEmail,
|
|
12
13
|
itemPath = void 0 as string
|
|
13
14
|
}) {
|
|
@@ -22,7 +23,7 @@ export default function PostSummary ({
|
|
|
22
23
|
data-comment={isComment}
|
|
23
24
|
data-item-path={itemPath}>
|
|
24
25
|
<h4 data-element="title">
|
|
25
|
-
<a href={UrlService.toBlogUrl(mailboxEmail)} text={ isComment ? email.senderName : email.subject}/>
|
|
26
|
+
<a href={UrlService.toBlogUrl({ mailbox: channel, ... mailboxEmail })} text={ isComment ? email.senderName : email.subject}/>
|
|
26
27
|
</h4>
|
|
27
28
|
<h6 data-element="date" text={DateFormats.relative.short(email.dateSent)}/>
|
|
28
29
|
{!isComment && <h5 text={email.senderName}/> }
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { AppLocation } from "../../common/TestMode";
|
|
2
|
-
import { IMailboxEmail, IMailboxTag } from "../../model/model";
|
|
2
|
+
import { IMailbox, IMailboxEmail, IMailboxTag } from "../../model/model";
|
|
3
3
|
|
|
4
4
|
export const UrlService = {
|
|
5
5
|
|
|
6
|
-
toBlogUrl ({
|
|
7
|
-
subject ||= "";
|
|
8
|
-
if(subject.length > 400) {
|
|
9
|
-
subject = subject.substring(0, 400);
|
|
10
|
-
}
|
|
11
|
-
subject = subject.replace(/[^\p{L}\p{N}]+/ug, "-");
|
|
12
|
-
subject = encodeURIComponent(subject).replace(/\%20/g, "-");
|
|
6
|
+
toBlogUrl ({ slug, mailbox: { emailAddress: { emailAddress } } }: IMailboxEmail) {
|
|
13
7
|
|
|
14
|
-
const cid =
|
|
15
|
-
const eid = BigInt(emailID).toString(36);
|
|
8
|
+
const cid = "@" + emailAddress.split("@")[0];
|
|
16
9
|
|
|
17
10
|
if (AppLocation.isLocalTesting) {
|
|
18
|
-
return `?detail
|
|
11
|
+
return `?detail=${cid}/${slug}`;
|
|
19
12
|
}
|
|
20
13
|
|
|
21
|
-
return `/
|
|
14
|
+
return `/c/${cid}/${slug}`;
|
|
22
15
|
},
|
|
23
16
|
|
|
24
17
|
toTagUrl ({ mailboxID, tagID, tag: { name } = {} as any }: IMailboxTag) {
|
|
@@ -88,7 +88,7 @@ export default class PostList extends AtomRepeater {
|
|
|
88
88
|
</div>;
|
|
89
89
|
const q = this.entityService.query(MailboxEmail, "channelEmails")
|
|
90
90
|
.where((x) => x.email.parentID === null)
|
|
91
|
-
.include((x) => x.email);
|
|
91
|
+
.include((x) => [x.email, x.mailbox.emailAddress]);
|
|
92
92
|
const posts = await this.query(q as any as Query<IMailboxEmail>);
|
|
93
93
|
this.items = posts.items;
|
|
94
94
|
}
|
|
@@ -26,7 +26,7 @@ const addAttributes = (target, values: (x: any) => IEditableAttribute[]) => {
|
|
|
26
26
|
|
|
27
27
|
export class WebComponents {
|
|
28
28
|
|
|
29
|
-
static path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.
|
|
29
|
+
static path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.119`;
|
|
30
30
|
|
|
31
31
|
static async run2(frame: HTMLIFrameElement, doc: Document) {
|
|
32
32
|
const url = this.path + "/dist/editable.js";
|