@social-mail/social-mail-client 1.2.714 → 1.2.716

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.
Files changed (62) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +535 -56
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +12 -6
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/model/model.d.ts +63 -12
  6. package/dist/model/model.d.ts.map +1 -1
  7. package/dist/model/model.js +296 -50
  8. package/dist/model/model.js.map +1 -1
  9. package/dist/public/channel/ChannelView.pack.js +296 -50
  10. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  11. package/dist/public/channel/ChannelView.pack.min.js +1 -1
  12. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  13. package/dist/public/preview/zip/DownloadZip.pack.js +296 -50
  14. package/dist/public/preview/zip/DownloadZip.pack.js.map +1 -1
  15. package/dist/public/preview/zip/DownloadZip.pack.min.js +1 -1
  16. package/dist/public/preview/zip/DownloadZip.pack.min.js.map +1 -1
  17. package/dist/public/store/StoreApp.pack.js +297 -51
  18. package/dist/public/store/StoreApp.pack.js.map +1 -1
  19. package/dist/public/store/StoreApp.pack.min.js +2 -2
  20. package/dist/public/store/StoreApp.pack.min.js.map +1 -1
  21. package/dist/public/store/cart/ShoppingCart.pack.js +296 -50
  22. package/dist/public/store/cart/ShoppingCart.pack.js.map +1 -1
  23. package/dist/public/store/cart/ShoppingCart.pack.min.js +1 -1
  24. package/dist/public/store/cart/ShoppingCart.pack.min.js.map +1 -1
  25. package/dist/public/store/pages/StoreOrderPage.js +1 -1
  26. package/dist/public/store/pages/StoreOrderPage.js.map +1 -1
  27. package/dist/site-editor-app/SiteEditorApp.pack.js +562 -59
  28. package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
  29. package/dist/site-editor-app/SiteEditorApp.pack.min.js +13 -7
  30. package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
  31. package/dist/site-editor-app/pages/store/products/ProductEditor.d.ts.map +1 -1
  32. package/dist/site-editor-app/pages/store/products/ProductEditor.js +27 -3
  33. package/dist/site-editor-app/pages/store/products/ProductEditor.js.map +1 -1
  34. package/dist/site-editor-app/pages/store/web-hooks/WebHookPage.d.ts +10 -0
  35. package/dist/site-editor-app/pages/store/web-hooks/WebHookPage.d.ts.map +1 -0
  36. package/dist/site-editor-app/pages/store/web-hooks/WebHookPage.js +76 -0
  37. package/dist/site-editor-app/pages/store/web-hooks/WebHookPage.js.map +1 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -1
  39. package/dist/web/AppIndex.pack.js +535 -56
  40. package/dist/web/AppIndex.pack.js.map +1 -1
  41. package/dist/web/AppIndex.pack.min.js +12 -6
  42. package/dist/web/AppIndex.pack.min.js.map +1 -1
  43. package/dist/web/page/mails/ConversationPage.d.ts +1 -0
  44. package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
  45. package/dist/web/page/mails/ConversationPage.js +20 -2
  46. package/dist/web/page/mails/ConversationPage.js.map +1 -1
  47. package/dist/web/page/mails/MailboxContacts.d.ts +1 -0
  48. package/dist/web/page/mails/MailboxContacts.d.ts.map +1 -1
  49. package/dist/web/page/mails/MailboxContacts.js +25 -3
  50. package/dist/web/page/mails/MailboxContacts.js.map +1 -1
  51. package/dist/web/page/mails/web-hooks/WebHookListPage.d.ts +17 -0
  52. package/dist/web/page/mails/web-hooks/WebHookListPage.d.ts.map +1 -0
  53. package/dist/web/page/mails/web-hooks/WebHookListPage.js +111 -0
  54. package/dist/web/page/mails/web-hooks/WebHookListPage.js.map +1 -0
  55. package/package.json +1 -1
  56. package/src/model/model.ts +85 -26
  57. package/src/public/store/pages/StoreOrderPage.tsx +1 -1
  58. package/src/site-editor-app/pages/store/products/ProductEditor.tsx +20 -1
  59. package/src/site-editor-app/pages/store/web-hooks/WebHookPage.tsx +59 -0
  60. package/src/web/page/mails/ConversationPage.tsx +15 -0
  61. package/src/web/page/mails/MailboxContacts.tsx +15 -0
  62. package/src/web/page/mails/web-hooks/WebHookListPage.tsx +69 -0
@@ -0,0 +1,59 @@
1
+ import XNode from "@web-atoms/core/dist/core/XNode";
2
+ import { ContentPage, PopupWindowPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
3
+ import { IWebHook, WebHook, WebHookEventTypeArray } from "../../../../model/model";
4
+ import Form from "@web-atoms/web-controls/dist/basic/Form";
5
+ import FormField from "@web-atoms/web-controls/dist/basic/FormField";
6
+ import Select from "@web-atoms/web-controls/dist/basic/Select";
7
+ import Bind from "@web-atoms/core/dist/core/Bind";
8
+ import { SaveIconTextButton } from "../../../../common/controls/buttons/IconButton";
9
+ import Action from "@web-atoms/core/dist/view-model/Action";
10
+ import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
11
+ import EntityService from "../../../../services/EntityService";
12
+
13
+ export default class WebHookPage extends PopupWindowPage<IWebHook> {
14
+
15
+ model = WebHook.create({});
16
+
17
+ @InjectProperty
18
+ entityService: EntityService;
19
+
20
+ async init() {
21
+
22
+ this.title = "Web Hook";
23
+
24
+ if (this.parameters) {
25
+ this.model = this.parameters;
26
+ }
27
+
28
+ this.renderer = <div>
29
+ <Form>
30
+
31
+ <FormField label="Type">
32
+ <Select
33
+ items={WebHookEventTypeArray}
34
+ value={Bind.twoWaysImmediate(() => this.model.eventType)}
35
+ />
36
+ </FormField>
37
+
38
+ <FormField label="Url">
39
+ <input value={Bind.twoWaysImmediate(() => this.model.url)}/>
40
+ </FormField>
41
+
42
+ <div>
43
+ <SaveIconTextButton
44
+ data-submit-event="save-item"
45
+ />
46
+ </div>
47
+
48
+ </Form>
49
+ </div>;
50
+
51
+ }
52
+
53
+ @Action({ onEvent: "save-item", close: true})
54
+ async saveItem() {
55
+ await this.entityService.save(this.model, (c) => c);
56
+ return this.model;
57
+ }
58
+
59
+ }
@@ -35,6 +35,7 @@ import Loader from "../../../common/controls/Loader";
35
35
  import loaderImage from "@social-mail/social-mail-client/content/images/gif/loader.gif";
36
36
  import ConversationTags from "./ConversationTags";
37
37
  import ConversationTagChips, { ISearchItem } from "./ConversationTagChips";
38
+ import WebHookListPage from "./web-hooks/WebHookListPage";
38
39
 
39
40
 
40
41
  const itemCss = styled.css `
@@ -348,6 +349,10 @@ export default class ConversationPage extends ContentPage {
348
349
  data-layout="vertical-flex"
349
350
  style-width="200px"
350
351
  data-font-size="small">
352
+ <MenuItem
353
+ data-click-event="open-contact-web-hooks"
354
+ label="Web Hooks"
355
+ />
351
356
  <MenuItem
352
357
  data-click-event="close-all-threads"
353
358
  label="Close All Threads"
@@ -382,6 +387,16 @@ export default class ConversationPage extends ContentPage {
382
387
  this.showComposeButton();
383
388
  }
384
389
 
390
+ @Action({ onEvent: "open-contact-web-hooks" })
391
+ async openWebHooks() {
392
+ const title = `Web Hooks for Contact ${this.parameters.emailAddress.emailAddress}`;
393
+ PageNavigator.pushPage(WebHookListPage, {
394
+ mailboxID: this.parameters.mailboxID,
395
+ emailAddressID: this.parameters.emailAddressID,
396
+ title
397
+ });
398
+ }
399
+
385
400
  @Action({ onEvent: "emailSent"})
386
401
  showComposeButton(email = null) {
387
402
 
@@ -29,6 +29,7 @@ import { MailAppEvents } from "../../commands/MailAppEvents";
29
29
  import EntityService from "../../../services/EntityService";
30
30
  import { toSentenceCase } from "../../../common/StringFormat";
31
31
  import MenuService from "../../../common/MenuService";
32
+ import WebHookListPage from "./web-hooks/WebHookListPage";
32
33
 
33
34
  const css = styled.css `
34
35
 
@@ -52,6 +53,12 @@ const css = styled.css `
52
53
  padding-top: 5px;
53
54
  display: flex;
54
55
  justify-content: center;
56
+ align-items: centern;
57
+ gap: 10px;
58
+ & > i {
59
+ color: var(--accent-color);
60
+ cursor: pointer;
61
+ }
55
62
  }
56
63
 
57
64
  & .blocked-bar {
@@ -322,6 +329,9 @@ export default class MailsPage extends MasterDetailPage {
322
329
  <i class="fas fa-plus"/>
323
330
  Contact
324
331
  </button>
332
+ <i
333
+ data-click-event="open-web-hooks"
334
+ class="fas fa-gears"/>
325
335
  </div>
326
336
  </div>
327
337
  </Resizable>
@@ -344,6 +354,11 @@ export default class MailsPage extends MasterDetailPage {
344
354
  this.threadsRepeater.refreshItem(item);
345
355
  }
346
356
 
357
+ @Action({ onEvent: "open-web-hooks" })
358
+ async openWebHooks() {
359
+ PageNavigator.pushPage(WebHookListPage, { mailboxID: this.parameters.id, title: `Web Hooks for Mailbox ${this.title}` });
360
+ }
361
+
347
362
  @Action({ onEvent: "compose-template"})
348
363
  async composeTemplate() {
349
364
  const template = await PageNavigator.pushPageForResult(ChooserTemplatePage);
@@ -0,0 +1,69 @@
1
+ import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
2
+ import { ContentPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
3
+ import EntityService from "../../../../services/EntityService";
4
+ import XNode from "@web-atoms/core/dist/core/XNode";
5
+ import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
6
+ import Bind from "@web-atoms/core/dist/core/Bind";
7
+ import { IWebHook, WebHook } from "../../../../model/model";
8
+ import { DateFormats } from "../../../../common/date/DateFormats";
9
+ import { AddIconTextButton } from "../../../../common/controls/buttons/IconButton";
10
+ import Action from "@web-atoms/core/dist/view-model/Action";
11
+ import WebHookPage from "../../../../site-editor-app/pages/store/web-hooks/WebHookPage";
12
+ import PageNavigator from "@web-atoms/web-controls/dist/PageNavigator";
13
+
14
+ export default class WebHookListPage extends ContentPage<{ mailboxID?, emailAddressID?, title? }> {
15
+
16
+ @InjectProperty
17
+ entityService: EntityService;
18
+
19
+ items: IWebHook[] = [];
20
+
21
+ async init() {
22
+
23
+ this.title = this.parameters.title;
24
+
25
+ this.renderer = <div>
26
+ <AtomRepeater
27
+ data-layout="data-grid"
28
+ items={Bind.oneWayAsync((c, e, cancelToken) => this.load({ cancelToken }))}
29
+ itemRenderer={(x: IWebHook) => <div>
30
+ <label text={x.eventType}/>
31
+ <label text={x.url}/>
32
+ <label text={x.lastEvent}/>
33
+ <label text={DateFormats.relative.short(x.lastEventTime)}/>
34
+ <menu>
35
+ <i
36
+ class="fas fa-times-circle"
37
+ data-color="red"
38
+ data-cursor="pointer"
39
+ />
40
+ </menu>
41
+ </div>}
42
+ />
43
+ </div>;
44
+
45
+ this.footerRenderer = () => <div>
46
+ <AddIconTextButton
47
+ data-click-event="add-item"
48
+ text="Add Web Hook"
49
+ />
50
+ </div>;
51
+ }
52
+
53
+ async load({ cancelToken }) {
54
+ const { mailboxID, emailAddressID } = this.parameters;
55
+ let q = this.entityService.query(WebHook).where({ mailboxID }, (p) => (x) => x.mailboxID === p.mailboxID);
56
+ if (emailAddressID) {
57
+ q = q.where({ emailAddressID }, (p) => (x) => x.emailAddressID === p.emailAddressID);
58
+ }
59
+ return this.items = await q.toArray();
60
+ }
61
+
62
+ @Action({ onEvent: "add-item" })
63
+ async addItem() {
64
+ const { mailboxID, emailAddressID } = this.parameters;
65
+ const item = WebHook.create({ mailboxID , emailAddressID });
66
+ const result = await PageNavigator.pushPageForResult(WebHookPage, item);
67
+ this.items.add(result);
68
+ }
69
+ }