@axelor/aos-mobile-message 8.4.0

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 (118) hide show
  1. package/README.md +42 -0
  2. package/lib/api/index.d.ts +1 -0
  3. package/lib/api/index.js +19 -0
  4. package/lib/api/index.js.map +1 -0
  5. package/lib/api/mail-message-api.d.ts +53 -0
  6. package/lib/api/mail-message-api.js +133 -0
  7. package/lib/api/mail-message-api.js.map +1 -0
  8. package/lib/components/atoms/AuthorText/AuthorText.d.ts +8 -0
  9. package/lib/components/atoms/AuthorText/AuthorText.js +41 -0
  10. package/lib/components/atoms/AuthorText/AuthorText.js.map +1 -0
  11. package/lib/components/atoms/Avatar/Avatar.d.ts +9 -0
  12. package/lib/components/atoms/Avatar/Avatar.js +49 -0
  13. package/lib/components/atoms/Avatar/Avatar.js.map +1 -0
  14. package/lib/components/atoms/ExpandableText/ExpandableText.d.ts +7 -0
  15. package/lib/components/atoms/ExpandableText/ExpandableText.js +68 -0
  16. package/lib/components/atoms/ExpandableText/ExpandableText.js.map +1 -0
  17. package/lib/components/atoms/MessageBox/MessageBox.d.ts +12 -0
  18. package/lib/components/atoms/MessageBox/MessageBox.js +63 -0
  19. package/lib/components/atoms/MessageBox/MessageBox.js.map +1 -0
  20. package/lib/components/atoms/MessageFlags/MessageFlags.d.ts +9 -0
  21. package/lib/components/atoms/MessageFlags/MessageFlags.js +74 -0
  22. package/lib/components/atoms/MessageFlags/MessageFlags.js.map +1 -0
  23. package/lib/components/atoms/TrackItem/TrackItem.d.ts +10 -0
  24. package/lib/components/atoms/TrackItem/TrackItem.js +59 -0
  25. package/lib/components/atoms/TrackItem/TrackItem.js.map +1 -0
  26. package/lib/components/atoms/index.d.ts +6 -0
  27. package/lib/components/atoms/index.js +24 -0
  28. package/lib/components/atoms/index.js.map +1 -0
  29. package/lib/components/index.d.ts +4 -0
  30. package/lib/components/index.js +22 -0
  31. package/lib/components/index.js.map +1 -0
  32. package/lib/components/molecules/CommentCard/CommentCard.d.ts +14 -0
  33. package/lib/components/molecules/CommentCard/CommentCard.js +60 -0
  34. package/lib/components/molecules/CommentCard/CommentCard.js.map +1 -0
  35. package/lib/components/molecules/NotificationCard/NotificationCard.d.ts +19 -0
  36. package/lib/components/molecules/NotificationCard/NotificationCard.js +59 -0
  37. package/lib/components/molecules/NotificationCard/NotificationCard.js.map +1 -0
  38. package/lib/components/molecules/SendMessageBox/SendMessageBox.d.ts +13 -0
  39. package/lib/components/molecules/SendMessageBox/SendMessageBox.js +62 -0
  40. package/lib/components/molecules/SendMessageBox/SendMessageBox.js.map +1 -0
  41. package/lib/components/molecules/UnsubscribeIcon/UnsubscribeIcon.d.ts +3 -0
  42. package/lib/components/molecules/UnsubscribeIcon/UnsubscribeIcon.js +47 -0
  43. package/lib/components/molecules/UnsubscribeIcon/UnsubscribeIcon.js.map +1 -0
  44. package/lib/components/molecules/index.d.ts +4 -0
  45. package/lib/components/molecules/index.js +22 -0
  46. package/lib/components/molecules/index.js.map +1 -0
  47. package/lib/components/organisms/MailMessageCard/MailMessageCard.d.ts +22 -0
  48. package/lib/components/organisms/MailMessageCard/MailMessageCard.js +148 -0
  49. package/lib/components/organisms/MailMessageCard/MailMessageCard.js.map +1 -0
  50. package/lib/components/organisms/index.d.ts +1 -0
  51. package/lib/components/organisms/index.js +19 -0
  52. package/lib/components/organisms/index.js.map +1 -0
  53. package/lib/components/templates/MailMessageView/MailMessageView.d.ts +9 -0
  54. package/lib/components/templates/MailMessageView/MailMessageView.js +69 -0
  55. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -0
  56. package/lib/components/templates/index.d.ts +1 -0
  57. package/lib/components/templates/index.js +19 -0
  58. package/lib/components/templates/index.js.map +1 -0
  59. package/lib/features/asyncFunctions-index.d.ts +1 -0
  60. package/lib/features/asyncFunctions-index.js +19 -0
  61. package/lib/features/asyncFunctions-index.js.map +1 -0
  62. package/lib/features/index.d.ts +1 -0
  63. package/lib/features/index.js +19 -0
  64. package/lib/features/index.js.map +1 -0
  65. package/lib/features/mailMessageSlice.d.ts +110 -0
  66. package/lib/features/mailMessageSlice.js +180 -0
  67. package/lib/features/mailMessageSlice.js.map +1 -0
  68. package/lib/hooks/index.d.ts +1 -0
  69. package/lib/hooks/index.js +19 -0
  70. package/lib/hooks/index.js.map +1 -0
  71. package/lib/hooks/use-is-subscribed.d.ts +1 -0
  72. package/lib/hooks/use-is-subscribed.js +25 -0
  73. package/lib/hooks/use-is-subscribed.js.map +1 -0
  74. package/lib/hooks/use-message-header-actions.d.ts +1 -0
  75. package/lib/hooks/use-message-header-actions.js +162 -0
  76. package/lib/hooks/use-message-header-actions.js.map +1 -0
  77. package/lib/i18n/en.json +32 -0
  78. package/lib/i18n/fr.json +32 -0
  79. package/lib/index.d.ts +8 -0
  80. package/lib/index.js +48 -0
  81. package/lib/index.js.map +1 -0
  82. package/lib/screens/InboxScreen.d.ts +3 -0
  83. package/lib/screens/InboxScreen.js +35 -0
  84. package/lib/screens/InboxScreen.js.map +1 -0
  85. package/lib/screens/MailMessageAttachedFilesScreen.d.ts +5 -0
  86. package/lib/screens/MailMessageAttachedFilesScreen.js +37 -0
  87. package/lib/screens/MailMessageAttachedFilesScreen.js.map +1 -0
  88. package/lib/screens/MailMessageLinkFilesScreen.d.ts +5 -0
  89. package/lib/screens/MailMessageLinkFilesScreen.js +88 -0
  90. package/lib/screens/MailMessageLinkFilesScreen.js.map +1 -0
  91. package/lib/screens/MailMessageScreen.d.ts +5 -0
  92. package/lib/screens/MailMessageScreen.js +32 -0
  93. package/lib/screens/MailMessageScreen.js.map +1 -0
  94. package/lib/screens/index.d.ts +43 -0
  95. package/lib/screens/index.js +53 -0
  96. package/lib/screens/index.js.map +1 -0
  97. package/lib/types/inbox-type.d.ts +5 -0
  98. package/lib/types/inbox-type.js +24 -0
  99. package/lib/types/inbox-type.js.map +1 -0
  100. package/lib/types/index.d.ts +3 -0
  101. package/lib/types/index.js +21 -0
  102. package/lib/types/index.js.map +1 -0
  103. package/lib/types/mail-message-notification-type.d.ts +13 -0
  104. package/lib/types/mail-message-notification-type.js +48 -0
  105. package/lib/types/mail-message-notification-type.js.map +1 -0
  106. package/lib/types/mail-message-type.d.ts +17 -0
  107. package/lib/types/mail-message-type.js +55 -0
  108. package/lib/types/mail-message-type.js.map +1 -0
  109. package/lib/utils/date.d.ts +2 -0
  110. package/lib/utils/date.js +24 -0
  111. package/lib/utils/date.js.map +1 -0
  112. package/lib/utils/index.d.ts +2 -0
  113. package/lib/utils/index.js +20 -0
  114. package/lib/utils/index.js.map +1 -0
  115. package/lib/utils/mailMessagesGenericAction.d.ts +24 -0
  116. package/lib/utils/mailMessagesGenericAction.js +53 -0
  117. package/lib/utils/mailMessagesGenericAction.js.map +1 -0
  118. package/package.json +48 -0
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ import MailMessageScreen from './MailMessageScreen';
3
+ import InboxScreen from './InboxScreen';
4
+ import MailMessageAttachedFilesScreen from './MailMessageAttachedFilesScreen';
5
+ import MailMessageLinkFilesScreen from './MailMessageLinkFilesScreen';
6
+ declare const _default: {
7
+ MailMessageScreen: {
8
+ title: string;
9
+ component: ({ route }: {
10
+ route: any;
11
+ }) => import("react").JSX.Element;
12
+ actionID: string;
13
+ };
14
+ InboxScreen: {
15
+ title: string;
16
+ component: ({}: {}) => import("react").JSX.Element;
17
+ actionID: string;
18
+ };
19
+ MailMessageAttachedFilesScreen: {
20
+ title: string;
21
+ component: ({ route }: {
22
+ route: any;
23
+ }) => import("react").JSX.Element;
24
+ options: {
25
+ shadedHeader: boolean;
26
+ };
27
+ };
28
+ MailMessageLinkFilesScreen: {
29
+ title: string;
30
+ component: ({ navigation }: {
31
+ navigation: any;
32
+ }) => import("react").JSX.Element;
33
+ acionID: string;
34
+ options: {
35
+ shadedHeader: boolean;
36
+ };
37
+ };
38
+ };
39
+ export default _default;
40
+ export { MailMessageScreen };
41
+ export { InboxScreen };
42
+ export { MailMessageAttachedFilesScreen };
43
+ export { MailMessageLinkFilesScreen };
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import MailMessageScreen from './MailMessageScreen';
19
+ import InboxScreen from './InboxScreen';
20
+ import MailMessageAttachedFilesScreen from './MailMessageAttachedFilesScreen';
21
+ import MailMessageLinkFilesScreen from './MailMessageLinkFilesScreen';
22
+ export default {
23
+ MailMessageScreen: {
24
+ title: 'Message_MailMessages',
25
+ component: MailMessageScreen,
26
+ actionID: 'message_mailMessage_details',
27
+ },
28
+ InboxScreen: {
29
+ title: 'Message_Inbox',
30
+ component: InboxScreen,
31
+ actionID: 'message_mailMessage_inbox',
32
+ },
33
+ MailMessageAttachedFilesScreen: {
34
+ title: 'Dms_AttachedFiles',
35
+ component: MailMessageAttachedFilesScreen,
36
+ options: {
37
+ shadedHeader: false,
38
+ },
39
+ },
40
+ MailMessageLinkFilesScreen: {
41
+ title: 'Message_LinkFiles',
42
+ component: MailMessageLinkFilesScreen,
43
+ acionID: 'dms_all_documents',
44
+ options: {
45
+ shadedHeader: false,
46
+ },
47
+ },
48
+ };
49
+ export { MailMessageScreen };
50
+ export { InboxScreen };
51
+ export { MailMessageAttachedFilesScreen };
52
+ export { MailMessageLinkFilesScreen };
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE,eAAe;IACb,iBAAiB,EAAE;QACjB,KAAK,EAAE,sBAAsB;QAC7B,SAAS,EAAE,iBAAiB;QAC5B,QAAQ,EAAE,6BAA6B;KACxC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,WAAW;QACtB,QAAQ,EAAE,2BAA2B;KACtC;IACD,8BAA8B,EAAE;QAC9B,KAAK,EAAE,mBAAmB;QAC1B,SAAS,EAAE,8BAA8B;QACzC,OAAO,EAAE;YACP,YAAY,EAAE,KAAK;SACpB;KACF;IACD,0BAA0B,EAAE;QAC1B,KAAK,EAAE,mBAAmB;QAC1B,SAAS,EAAE,0BAA0B;QACrC,OAAO,EAAE,mBAAmB;QAC5B,OAAO,EAAE;YACP,YAAY,EAAE,KAAK;SACpB;KACF;CACF,CAAC;AAEF,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAC3B,OAAO,EAAC,WAAW,EAAC,CAAC;AACrB,OAAO,EAAC,8BAA8B,EAAC,CAAC;AACxC,OAAO,EAAC,0BAA0B,EAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare enum InboxFolder {
2
+ Inbox = "inbox",
3
+ Important = "important",
4
+ Archive = "archive"
5
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export var InboxFolder;
19
+ (function (InboxFolder) {
20
+ InboxFolder["Inbox"] = "inbox";
21
+ InboxFolder["Important"] = "important";
22
+ InboxFolder["Archive"] = "archive";
23
+ })(InboxFolder || (InboxFolder = {}));
24
+ //# sourceMappingURL=inbox-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox-type.js","sourceRoot":"","sources":["../../src/types/inbox-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
@@ -0,0 +1,3 @@
1
+ export { InboxFolder } from './inbox-type';
2
+ export { default as MailMessageNotificationType } from './mail-message-notification-type';
3
+ export { default as MailMessageType } from './mail-message-type';
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export { InboxFolder } from './inbox-type';
19
+ export { default as MailMessageNotificationType } from './mail-message-notification-type';
20
+ export { default as MailMessageType } from './mail-message-type';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ThemeColors } from '@axelor/aos-mobile-ui';
2
+ declare class MailMessageNotificationType {
3
+ static style: {
4
+ Default: string;
5
+ Important: string;
6
+ Success: string;
7
+ Warning: string;
8
+ Inverse: string;
9
+ Info: string;
10
+ };
11
+ static getTagColor: (style: string, Colors: ThemeColors) => import("@axelor/aos-mobile-ui").Color;
12
+ }
13
+ export default MailMessageNotificationType;
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ class MailMessageNotificationType {
19
+ static style = {
20
+ Default: 'default',
21
+ Important: 'important',
22
+ Success: 'success',
23
+ Warning: 'warning',
24
+ Inverse: 'inverse',
25
+ Info: 'info',
26
+ };
27
+ static getTagColor = (style, Colors) => {
28
+ switch (style) {
29
+ case this.style.Default:
30
+ return Colors.defaultColor;
31
+ case this.style.Important:
32
+ return Colors.importantColor;
33
+ case this.style.Success:
34
+ return Colors.successColor;
35
+ case this.style.Warning:
36
+ return Colors.warningColor;
37
+ case this.style.Inverse:
38
+ return Colors.inverseColor;
39
+ case this.style.Info:
40
+ return Colors.infoColor;
41
+ default:
42
+ console.warn(`Style provided with value ${style} is not supported by Mail Message Tag`);
43
+ return null;
44
+ }
45
+ };
46
+ }
47
+ export default MailMessageNotificationType;
48
+ //# sourceMappingURL=mail-message-notification-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail-message-notification-type.js","sourceRoot":"","sources":["../../src/types/mail-message-notification-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,2BAA2B;IAC/B,MAAM,CAAC,KAAK,GAAG;QACb,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,WAAW;QACtB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,MAAM;KACb,CAAC;IAEF,MAAM,CAAC,WAAW,GAAG,CAAC,KAAa,EAAE,MAAmB,EAAE,EAAE;QAC1D,QAAQ,KAAK,EAAE;YACb,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO;gBACrB,OAAO,MAAM,CAAC,YAAY,CAAC;YAC7B,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBACvB,OAAO,MAAM,CAAC,cAAc,CAAC;YAC/B,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO;gBACrB,OAAO,MAAM,CAAC,YAAY,CAAC;YAC7B,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO;gBACrB,OAAO,MAAM,CAAC,YAAY,CAAC;YAC7B,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO;gBACrB,OAAO,MAAM,CAAC,YAAY,CAAC;YAC7B,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI;gBAClB,OAAO,MAAM,CAAC,SAAS,CAAC;YAC1B;gBACE,OAAO,CAAC,IAAI,CACV,6BAA6B,KAAK,uCAAuC,CAC1E,CAAC;gBACF,OAAO,IAAI,CAAC;SACf;IACH,CAAC,CAAC;;AAGJ,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ThemeColors } from '@axelor/aos-mobile-ui';
2
+ import { TranslatorProps } from '@axelor/aos-mobile-core';
3
+ declare class MailMessageType {
4
+ static status: {
5
+ all: string;
6
+ comment: string;
7
+ notification: string;
8
+ };
9
+ static isTypeSelected: (selectedStatus: any[], typeValue: string) => boolean;
10
+ static getSelectionItems: (I18n: TranslatorProps, Colors: ThemeColors, selectedStatus: any[]) => {
11
+ title: string;
12
+ color: import("@axelor/aos-mobile-ui").Color;
13
+ isActive: boolean;
14
+ key: string;
15
+ }[];
16
+ }
17
+ export default MailMessageType;
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ class MailMessageType {
19
+ static status = {
20
+ all: 'all',
21
+ comment: 'comment',
22
+ notification: 'notification',
23
+ };
24
+ static isTypeSelected = (selectedStatus, typeValue) => {
25
+ if (Array.isArray(selectedStatus) && selectedStatus.length > 0) {
26
+ return selectedStatus.find(_i => _i.key === typeValue);
27
+ }
28
+ return false;
29
+ };
30
+ static getSelectionItems = (I18n, Colors, selectedStatus) => {
31
+ return [
32
+ {
33
+ title: I18n.t('Base_All'),
34
+ color: Colors.primaryColor,
35
+ isActive: selectedStatus.length === 0 ||
36
+ this.isTypeSelected(selectedStatus, this.status.all),
37
+ key: this.status.all,
38
+ },
39
+ {
40
+ title: I18n.t('Base_Comments'),
41
+ color: Colors.primaryColor,
42
+ isActive: this.isTypeSelected(selectedStatus, this.status.comment),
43
+ key: this.status.comment,
44
+ },
45
+ {
46
+ title: I18n.t('Message_Notifications'),
47
+ color: Colors.primaryColor,
48
+ isActive: this.isTypeSelected(selectedStatus, this.status.notification),
49
+ key: this.status.notification,
50
+ },
51
+ ];
52
+ };
53
+ }
54
+ export default MailMessageType;
55
+ //# sourceMappingURL=mail-message-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail-message-type.js","sourceRoot":"","sources":["../../src/types/mail-message-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAM,GAAG;QACd,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,CAAC,cAAc,GAAG,CACtB,cAAqB,EACrB,SAAiB,EACR,EAAE;QACX,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;SACxD;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,MAAM,CAAC,iBAAiB,GAAG,CACzB,IAAqB,EACrB,MAAmB,EACnB,cAAqB,EACrB,EAAE;QACF,OAAO;YACL;gBACE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;gBACzB,KAAK,EAAE,MAAM,CAAC,YAAY;gBAC1B,QAAQ,EACN,cAAc,CAAC,MAAM,KAAK,CAAC;oBAC3B,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;gBACtD,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;aACrB;YACD;gBACE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;gBAC9B,KAAK,EAAE,MAAM,CAAC,YAAY;gBAC1B,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;gBAClE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;aACzB;YACD;gBACE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC;gBACtC,KAAK,EAAE,MAAM,CAAC,YAAY;gBAC1B,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;gBACvE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY;aAC9B;SACF,CAAC;IACJ,CAAC,CAAC;;AAGJ,eAAe,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { TranslatorProps } from '@axelor/aos-mobile-core';
2
+ export declare const formatDateItem: (date: string, I18n: TranslatorProps) => any;
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { formatDate, formatDateTime, isDateTime, } from '@axelor/aos-mobile-core';
19
+ export const formatDateItem = (date, I18n) => {
20
+ return isDateTime(date)
21
+ ? formatDateTime(date, I18n.t('Base_DateTimeFormat'))
22
+ : formatDate(date, I18n.t('Base_DateFormat'));
23
+ };
24
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,UAAU,EACV,cAAc,EACd,UAAU,GAEX,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,IAAqB,EAAE,EAAE;IACpE,OAAO,UAAU,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './date';
2
+ export * from './mailMessagesGenericAction';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export * from './date';
19
+ export * from './mailMessagesGenericAction';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,24 @@
1
+ export declare const getAction: ({ model, modelId, navigation, hideIf, translator, }: {
2
+ model: string;
3
+ modelId: number;
4
+ navigation: any;
5
+ hideIf: boolean;
6
+ translator: (key: string) => string;
7
+ }) => Promise<{
8
+ key: string;
9
+ order: number;
10
+ iconName: string;
11
+ title: string;
12
+ showInHeader: boolean;
13
+ hideIf: boolean;
14
+ onPress: () => void;
15
+ } | {
16
+ indicator: any;
17
+ onPress: () => any;
18
+ hideIf: boolean;
19
+ key: string;
20
+ order: number;
21
+ iconName: string;
22
+ title: string;
23
+ showInHeader: boolean;
24
+ }>;
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2025 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { handlerApiCall } from '@axelor/aos-mobile-core';
19
+ import { countUnreadMessages } from '../api/mail-message-api';
20
+ export const getAction = async ({ model, modelId, navigation, hideIf, translator, }) => {
21
+ const _defaultAction = {
22
+ key: 'mailMessages',
23
+ order: 20,
24
+ iconName: 'bell-fill',
25
+ title: translator('Message_MailMessages'),
26
+ showInHeader: true,
27
+ hideIf: true,
28
+ onPress: () => { },
29
+ };
30
+ if (modelId == null || model == null)
31
+ return _defaultAction;
32
+ const numberUnreadMessages = await handlerApiCall({
33
+ fetchFunction: countUnreadMessages,
34
+ data: { model, modelId },
35
+ action: 'Message_SliceAction_CountUnreadMailMessages',
36
+ getState: () => { },
37
+ responseOptions: { returnTotal: true },
38
+ errorOptions: {
39
+ errorTracing: false,
40
+ showErrorToast: false,
41
+ },
42
+ });
43
+ return {
44
+ ..._defaultAction,
45
+ indicator: numberUnreadMessages,
46
+ onPress: () => navigation.navigate('MailMessageScreen', {
47
+ model,
48
+ modelId,
49
+ }),
50
+ hideIf,
51
+ };
52
+ };
53
+ //# sourceMappingURL=mailMessagesGenericAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailMessagesGenericAction.js","sourceRoot":"","sources":["../../src/utils/mailMessagesGenericAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,EAC9B,KAAK,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAU,GAOX,EAAE,EAAE;IACH,MAAM,cAAc,GAAG;QACrB,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,WAAW;QACrB,KAAK,EAAE,UAAU,CAAC,sBAAsB,CAAC;QACzC,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;KAClB,CAAC;IAEF,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI;QAAE,OAAO,cAAc,CAAC;IAE5D,MAAM,oBAAoB,GAAG,MAAM,cAAc,CAAC;QAChD,aAAa,EAAE,mBAAmB;QAClC,IAAI,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC;QACtB,MAAM,EAAE,6CAA6C;QACrD,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;QAClB,eAAe,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;QACpC,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK;YACnB,cAAc,EAAE,KAAK;SACtB;KACF,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,cAAc;QACjB,SAAS,EAAE,oBAAoB;QAC/B,OAAO,EAAE,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,mBAAmB,EAAE;YACvC,KAAK;YACL,OAAO;SACR,CAAC;QACJ,MAAM;KACP,CAAC;AACJ,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@axelor/aos-mobile-message",
3
+ "version": "8.4.0",
4
+ "author": "Axelor",
5
+ "license": "AGPL-3.0-only",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "main": "lib/index.js",
10
+ "types": "lib/index.d.js",
11
+ "files": [
12
+ "lib"
13
+ ],
14
+ "scripts": {
15
+ "clean": "rm -rf lib/",
16
+ "compile": "tsc -p tsconfig.build.json",
17
+ "dev": "npm run compile -- --watch",
18
+ "build": "npm run clean && npm run compile",
19
+ "npm-publish": "npm publish",
20
+ "lint": "eslint .",
21
+ "format": "prettier --write src/",
22
+ "format:check": "prettier --check src/",
23
+ "license:add": "npx add-copyright-header --generate --dir 'src'"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "18.3.1",
27
+ "react-native": "0.75.5"
28
+ },
29
+ "dependencies": {
30
+ "@axelor/aos-mobile-core": "8.4.0",
31
+ "@axelor/aos-mobile-dms": "8.4.0",
32
+ "@axelor/aos-mobile-ui": "8.4.0",
33
+ "@reduxjs/toolkit": "^2.2.7"
34
+ },
35
+ "devDependencies": {
36
+ "@babel/runtime": "^7.20.0",
37
+ "@react-native/babel-preset": "0.75.5",
38
+ "@react-native/eslint-config": "0.75.5",
39
+ "@types/react": "^18.3.20",
40
+ "eslint": "8.57.0",
41
+ "prettier": "^3.3.3",
42
+ "react": "18.3.1",
43
+ "react-native": "0.75.5"
44
+ },
45
+ "resolutions": {
46
+ "@types/react": "^18.3.20"
47
+ }
48
+ }