awing-library 2.1.2-dev.580 → 2.1.2-dev.582
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/AWING/Chart/BarLine/constants.d.ts.map +1 -1
- package/dist/AWING/Chart/BarLine/constants.js +2 -0
- package/dist/AWING/DataGridGroups/Container.d.ts.map +1 -1
- package/dist/AWING/DataGridGroups/Container.js +20 -13
- package/dist/Commons/Constant.d.ts +1 -1
- package/dist/Commons/Constant.js +1 -1
- package/dist/Commons/Types.d.ts +1 -1
- package/dist/Commons/Types.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/Enum.d.ts +279 -0
- package/dist/Features/COMMON/Notifications/Enum.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/Enum.js +149 -1
- package/dist/Features/COMMON/Notifications/NotificationDetail/NotificationList/Container.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/NotificationDetail/NotificationList/Container.js +14 -1
- package/dist/Features/COMMON/Notifications/NotificationDetail/NotificationList/NotificationItem.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/NotificationDetail/NotificationList/NotificationItem.js +7 -9
- package/dist/Features/COMMON/Notifications/Types.d.ts +2 -3
- package/dist/Features/COMMON/Notifications/Types.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/components/Message/PlaceTransaction.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/components/Message/PlaceTransaction.js +14 -14
- package/dist/Features/COMMON/Notifications/components/Message/WorkspaceAction.d.ts +6 -0
- package/dist/Features/COMMON/Notifications/components/Message/WorkspaceAction.d.ts.map +1 -0
- package/dist/Features/COMMON/Notifications/components/Message/{DomainAction.js → WorkspaceAction.js} +5 -5
- package/dist/Features/COMMON/Notifications/components/Message/WorkspaceTransaction.d.ts +30 -0
- package/dist/Features/COMMON/Notifications/components/Message/WorkspaceTransaction.d.ts.map +1 -0
- package/dist/Features/COMMON/Notifications/components/Message/{DomainTransaction.js → WorkspaceTransaction.js} +26 -26
- package/dist/Features/COMMON/Notifications/components/Message/index.d.ts +3 -2
- package/dist/Features/COMMON/Notifications/components/Message/index.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/components/Message/index.js +34 -35
- package/dist/Features/COMMON/Notifications/components/Message/index.test.js +30 -65
- package/dist/Features/COMMON/Notifications/components/NotificationContent.d.ts.map +1 -1
- package/dist/Features/COMMON/Notifications/components/NotificationContent.js +3 -6
- package/package.json +1 -1
- package/dist/Features/COMMON/Notifications/components/Message/DomainAction.d.ts +0 -6
- package/dist/Features/COMMON/Notifications/components/Message/DomainAction.d.ts.map +0 -1
- package/dist/Features/COMMON/Notifications/components/Message/DomainTransaction.d.ts +0 -30
- package/dist/Features/COMMON/Notifications/components/Message/DomainTransaction.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SagaTransactionType } from "../../Enum.js";
|
|
2
2
|
import { getFullDescription } from "./index.js";
|
|
3
3
|
describe("getFullDescription", ()=>{
|
|
4
4
|
const mockFields = [
|
|
@@ -11,123 +11,88 @@ describe("getFullDescription", ()=>{
|
|
|
11
11
|
value: 'https://test.com'
|
|
12
12
|
}
|
|
13
13
|
];
|
|
14
|
-
const mockTransactionType = {
|
|
15
|
-
CampaignCreate: 1,
|
|
16
|
-
CampaignUpdate: 2,
|
|
17
|
-
CampaignDelete: 3,
|
|
18
|
-
PageCreate: 4,
|
|
19
|
-
PageUpdate: 5,
|
|
20
|
-
PageDelete: 6,
|
|
21
|
-
DomainUpdate: 7,
|
|
22
|
-
DomainJoinRequest: 8,
|
|
23
|
-
DomainJoinApprove: 9,
|
|
24
|
-
DomainJoinReject: 10,
|
|
25
|
-
DomainUnjoinRequest: 11,
|
|
26
|
-
DomainUnjoinApprove: 12,
|
|
27
|
-
DomainUnjoinReject: 13,
|
|
28
|
-
DomainJoinDelete: 14,
|
|
29
|
-
PlaceUpdate: 15,
|
|
30
|
-
PlaceJoinRequest: 16,
|
|
31
|
-
PlaceJoinApprove: 17,
|
|
32
|
-
PlaceJoinReject: 18,
|
|
33
|
-
PlaceUnjoinRequest: 19,
|
|
34
|
-
PlaceUnjoinApprove: 20,
|
|
35
|
-
PlaceUnjoinReject: 21,
|
|
36
|
-
PlaceStatusUpdate: 22
|
|
37
|
-
};
|
|
38
|
-
it('should return default result for unknown type', ()=>{
|
|
39
|
-
const result = getFullDescription(999, mockFields, mockTransactionType);
|
|
40
|
-
expect(result).toEqual({
|
|
41
|
-
title: /*#__PURE__*/ jsx(Fragment, {}),
|
|
42
|
-
url: ''
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
14
|
it('should handle CampaignCreate type', ()=>{
|
|
46
|
-
const result = getFullDescription(
|
|
15
|
+
const result = getFullDescription(SagaTransactionType.CampaignCreate, mockFields);
|
|
47
16
|
expect(result).toBeDefined();
|
|
48
17
|
});
|
|
49
18
|
it('should handle CampaignUpdate type', ()=>{
|
|
50
|
-
const result = getFullDescription(
|
|
19
|
+
const result = getFullDescription(SagaTransactionType.CampaignUpdate, mockFields);
|
|
51
20
|
expect(result).toBeDefined();
|
|
52
21
|
});
|
|
53
22
|
it('should handle CampaignDelete type', ()=>{
|
|
54
|
-
const result = getFullDescription(
|
|
23
|
+
const result = getFullDescription(SagaTransactionType.CampaignDelete, mockFields);
|
|
55
24
|
expect(result).toBeDefined();
|
|
56
25
|
});
|
|
57
26
|
it('should handle PageCreate type', ()=>{
|
|
58
|
-
const result = getFullDescription(
|
|
27
|
+
const result = getFullDescription(SagaTransactionType.PageCreate, mockFields);
|
|
59
28
|
expect(result).toBeDefined();
|
|
60
29
|
});
|
|
61
30
|
it('should handle PageUpdate type', ()=>{
|
|
62
|
-
const result = getFullDescription(
|
|
31
|
+
const result = getFullDescription(SagaTransactionType.PageUpdate, mockFields);
|
|
63
32
|
expect(result).toBeDefined();
|
|
64
33
|
});
|
|
65
34
|
it('should handle PageDelete type', ()=>{
|
|
66
|
-
const result = getFullDescription(
|
|
35
|
+
const result = getFullDescription(SagaTransactionType.PageDelete, mockFields);
|
|
67
36
|
expect(result).toBeDefined();
|
|
68
37
|
});
|
|
69
|
-
it('should handle
|
|
70
|
-
const result = getFullDescription(
|
|
38
|
+
it('should handle WorkspaceUpdate type', ()=>{
|
|
39
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceUpdate, mockFields);
|
|
71
40
|
expect(result).toBeDefined();
|
|
72
41
|
});
|
|
73
|
-
it('should handle
|
|
74
|
-
const result = getFullDescription(
|
|
42
|
+
it('should handle WorkspaceJoinRequest type', ()=>{
|
|
43
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceJoinRequest, mockFields);
|
|
75
44
|
expect(result).toBeDefined();
|
|
76
45
|
});
|
|
77
|
-
it('should handle
|
|
78
|
-
const result = getFullDescription(
|
|
46
|
+
it('should handle WorkspaceJoinApprove type', ()=>{
|
|
47
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceJoinApprove, mockFields);
|
|
79
48
|
expect(result).toBeDefined();
|
|
80
49
|
});
|
|
81
|
-
it('should handle
|
|
82
|
-
const result = getFullDescription(
|
|
50
|
+
it('should handle WorkspaceJoinReject type', ()=>{
|
|
51
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceJoinReject, mockFields);
|
|
83
52
|
expect(result).toBeDefined();
|
|
84
53
|
});
|
|
85
|
-
it('should handle
|
|
86
|
-
const result = getFullDescription(
|
|
54
|
+
it('should handle WorkspaceUnjoinRequest type', ()=>{
|
|
55
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceUnjoinRequest, mockFields);
|
|
87
56
|
expect(result).toBeDefined();
|
|
88
57
|
});
|
|
89
|
-
it('should handle
|
|
90
|
-
const result = getFullDescription(
|
|
58
|
+
it('should handle WorkspaceUnjoinApprove type', ()=>{
|
|
59
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceUnjoinApprove, mockFields);
|
|
91
60
|
expect(result).toBeDefined();
|
|
92
61
|
});
|
|
93
|
-
it('should handle
|
|
94
|
-
const result = getFullDescription(
|
|
62
|
+
it('should handle WorkspaceUnjoinReject type', ()=>{
|
|
63
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceUnjoinReject, mockFields);
|
|
95
64
|
expect(result).toBeDefined();
|
|
96
65
|
});
|
|
97
|
-
it('should handle
|
|
98
|
-
const result = getFullDescription(
|
|
66
|
+
it('should handle WorkspaceJoinDelete type', ()=>{
|
|
67
|
+
const result = getFullDescription(SagaTransactionType.WorkspaceJoinDelete, mockFields);
|
|
99
68
|
expect(result).toBeDefined();
|
|
100
69
|
});
|
|
101
70
|
it('should handle PlaceUpdate type', ()=>{
|
|
102
|
-
const result = getFullDescription(
|
|
71
|
+
const result = getFullDescription(SagaTransactionType.PlaceUpdate, mockFields);
|
|
103
72
|
expect(result).toBeDefined();
|
|
104
73
|
});
|
|
105
74
|
it('should handle PlaceJoinRequest type', ()=>{
|
|
106
|
-
const result = getFullDescription(
|
|
75
|
+
const result = getFullDescription(SagaTransactionType.PlaceJoinRequest, mockFields);
|
|
107
76
|
expect(result).toBeDefined();
|
|
108
77
|
});
|
|
109
78
|
it('should handle PlaceJoinApprove type', ()=>{
|
|
110
|
-
const result = getFullDescription(
|
|
79
|
+
const result = getFullDescription(SagaTransactionType.PlaceJoinApprove, mockFields);
|
|
111
80
|
expect(result).toBeDefined();
|
|
112
81
|
});
|
|
113
82
|
it('should handle PlaceJoinReject type', ()=>{
|
|
114
|
-
const result = getFullDescription(
|
|
83
|
+
const result = getFullDescription(SagaTransactionType.PlaceJoinReject, mockFields);
|
|
115
84
|
expect(result).toBeDefined();
|
|
116
85
|
});
|
|
117
86
|
it('should handle PlaceUnjoinRequest type', ()=>{
|
|
118
|
-
const result = getFullDescription(
|
|
87
|
+
const result = getFullDescription(SagaTransactionType.PlaceUnjoinRequest, mockFields);
|
|
119
88
|
expect(result).toBeDefined();
|
|
120
89
|
});
|
|
121
90
|
it('should handle PlaceUnjoinApprove type', ()=>{
|
|
122
|
-
const result = getFullDescription(
|
|
91
|
+
const result = getFullDescription(SagaTransactionType.PlaceUnjoinApprove, mockFields);
|
|
123
92
|
expect(result).toBeDefined();
|
|
124
93
|
});
|
|
125
94
|
it('should handle PlaceUnjoinReject type', ()=>{
|
|
126
|
-
const result = getFullDescription(
|
|
127
|
-
expect(result).toBeDefined();
|
|
128
|
-
});
|
|
129
|
-
it('should handle PlaceStatusUpdate type', ()=>{
|
|
130
|
-
const result = getFullDescription(mockTransactionType.PlaceStatusUpdate, mockFields, mockTransactionType);
|
|
95
|
+
const result = getFullDescription(SagaTransactionType.PlaceUnjoinReject, mockFields);
|
|
131
96
|
expect(result).toBeDefined();
|
|
132
97
|
});
|
|
133
98
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationContent.d.ts","sourceRoot":"","sources":["../../../../../src/Features/COMMON/Notifications/components/NotificationContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationContent.d.ts","sourceRoot":"","sources":["../../../../../src/Features/COMMON/Notifications/components/NotificationContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,MAAM,wBAAwB,GAAG;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC7C,CAAC;oEAEkC,wBAAwB;AA+D5D,wBAAyC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Box, Typography } from "@mui/material";
|
|
3
3
|
import moment from "moment";
|
|
4
|
-
import {
|
|
4
|
+
import { memo } from "react";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
import { Box, Typography } from "@mui/material";
|
|
7
6
|
import { getFullDescription } from "./Message/index.js";
|
|
8
|
-
import { useAwing } from "../../../../Context/index.js";
|
|
9
7
|
const NotificationContent_NotificationContent = (props)=>{
|
|
10
8
|
const { notificationMessage, status = false } = props;
|
|
11
|
-
const { transactionType } = useAwing();
|
|
12
9
|
const { t } = useTranslation();
|
|
13
10
|
return /*#__PURE__*/ jsxs(Box, {
|
|
14
11
|
sx: {
|
|
@@ -50,7 +47,7 @@ const NotificationContent_NotificationContent = (props)=>{
|
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
],
|
|
53
|
-
children: notificationMessage && getFullDescription(
|
|
50
|
+
children: notificationMessage && getFullDescription(notificationMessage?.sagaTransactionType, notificationMessage?.fields ?? [])?.title
|
|
54
51
|
}),
|
|
55
52
|
notificationMessage?.createdDate?.seconds && /*#__PURE__*/ jsx(Typography, {
|
|
56
53
|
variant: "caption",
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NotificationMessageField } from '../../Types';
|
|
2
|
-
export declare const DomainActionBuildUpdateDescription: (fields: NotificationMessageField[]) => {
|
|
3
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
url: string;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=DomainAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DomainAction.d.ts","sourceRoot":"","sources":["../../../../../../src/Features/COMMON/Notifications/components/Message/DomainAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,kCAAkC,WAAY,wBAAwB,EAAE;;;CAmBpF,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { NotificationMessageField } from '../../Types';
|
|
2
|
-
export declare const DomainTransactionBuildJoinRequestDescription: (fields: NotificationMessageField[]) => {
|
|
3
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
url: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const DomainTransactionBuildJoinApproveDescription: (fields: NotificationMessageField[]) => {
|
|
7
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
url: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const DomainTransactionBuildJoinRejectDescription: (fields: NotificationMessageField[]) => {
|
|
11
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
url: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const DomainTransactionBuildJoinDeleteDescription: (fields: NotificationMessageField[]) => {
|
|
15
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
url: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const DomainTransactionBuildUnjoinRequestDescription: (fields: NotificationMessageField[]) => {
|
|
19
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
url: string;
|
|
21
|
-
};
|
|
22
|
-
export declare const DomainTransactionBuildUnjoinApproveDescription: (fields: NotificationMessageField[]) => {
|
|
23
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
url: string;
|
|
25
|
-
};
|
|
26
|
-
export declare const DomainTransactionBuildUnjoinRejectDescription: (fields: NotificationMessageField[]) => {
|
|
27
|
-
title: import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
url: string;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=DomainTransaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DomainTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/Features/COMMON/Notifications/components/Message/DomainTransaction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,4CAA4C,WAAY,wBAAwB,EAAE;;;CAqB9F,CAAC;AAEF,eAAO,MAAM,4CAA4C,WAAY,wBAAwB,EAAE;;;CAmB9F,CAAC;AAEF,eAAO,MAAM,2CAA2C,WAAY,wBAAwB,EAAE;;;CAe7F,CAAC;AAEF,eAAO,MAAM,2CAA2C,WAAY,wBAAwB,EAAE;;;CAe7F,CAAC;AAEF,eAAO,MAAM,8CAA8C,WAAY,wBAAwB,EAAE;;;CAsBhG,CAAC;AAEF,eAAO,MAAM,8CAA8C,WAAY,wBAAwB,EAAE;;;CAehG,CAAC;AAEF,eAAO,MAAM,6CAA6C,WAAY,wBAAwB,EAAE;;;CAmB/F,CAAC"}
|