@messenger-box/property-ext-browser 10.0.3-alpha.2 → 10.0.3-alpha.201
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/lib/components/InboxMessage/MessageWidgets/MessageAlert.d.ts.map +1 -1
- package/lib/components/InboxMessage/MessageWidgets/MessageAlert.js +13 -33
- package/lib/components/InboxMessage/MessageWidgets/MessageAlert.js.map +1 -1
- package/lib/components/InboxMessage/MessageWidgets/MessageCard.d.ts.map +1 -1
- package/lib/components/InboxMessage/MessageWidgets/MessageCard.js +41 -75
- package/lib/components/InboxMessage/MessageWidgets/MessageCard.js.map +1 -1
- package/lib/interfaces/message-widgets.interface.d.ts +2 -2
- package/lib/interfaces/message-widgets.interface.d.ts.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/slot-fill/message-alert-fill.js +1 -1
- package/lib/slot-fill/message-alert-fill.js.map +1 -1
- package/lib/slot-fill/message-card-fill.js +1 -1
- package/lib/slot-fill/message-card-fill.js.map +1 -1
- package/package.json +4 -6
- package/CHANGELOG.md +0 -102
- package/jest.config.js +0 -9
- package/rollup.config.mjs +0 -35
- package/src/components/InboxMessage/MessageWidgets/MessageAlert.tsx +0 -56
- package/src/components/InboxMessage/MessageWidgets/MessageCard.tsx +0 -115
- package/src/components/InboxMessage/MessageWidgets/index.ts +0 -2
- package/src/components/InboxMessage/index.ts +0 -1
- package/src/components/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/interfaces/index.ts +0 -1
- package/src/interfaces/message-widgets.interface.ts +0 -14
- package/src/module.ts +0 -16
- package/src/slot-fill/index.ts +0 -2
- package/src/slot-fill/message-alert-fill.tsx +0 -18
- package/src/slot-fill/message-card-fill.tsx +0 -18
- package/tsconfig.json +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"MessageAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,2BAA2B,sBA4B9D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from'react';import
|
|
1
|
+
import React from'react';import {FiAlertCircle}from'@react-icons/all-files/fi/FiAlertCircle.js';import {FiExternalLink}from'@react-icons/all-files/fi/FiExternalLink.js';import parse from'html-react-parser';const MessageAlert = props => {
|
|
2
2
|
const {
|
|
3
3
|
message,
|
|
4
4
|
index,
|
|
@@ -7,40 +7,20 @@ import React from'react';import*as Icons from'@chakra-ui/icons';import parse fro
|
|
|
7
7
|
const {
|
|
8
8
|
attachment
|
|
9
9
|
} = message.propsConfiguration.contents;
|
|
10
|
-
|
|
11
|
-
const color = useColorModeValue('white', 'gray.800');
|
|
12
|
-
const bgColor = useColorModeValue('gray.800', 'white');
|
|
13
|
-
return React.createElement(Stack, {
|
|
10
|
+
return React.createElement("div", {
|
|
14
11
|
key: `${index}`,
|
|
15
|
-
|
|
16
|
-
mb: "10",
|
|
17
|
-
bgColor: bgColor,
|
|
18
|
-
padding: 3,
|
|
19
|
-
margin: 2,
|
|
20
|
-
opacity: 0.7,
|
|
21
|
-
borderRadius: 20,
|
|
22
|
-
direction: ['column', 'row'],
|
|
23
|
-
cursor: 'pointer',
|
|
12
|
+
className: "mt-4 mb-10 bg-gray-800 dark:bg-white p-3 m-2 opacity-70 rounded-[20px] flex flex-col sm:flex-row cursor-pointer text-white dark:text-gray-800",
|
|
24
13
|
onClick: () => onMessageClick(message)
|
|
25
|
-
}, React.createElement(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}), React.createElement(
|
|
30
|
-
|
|
31
|
-
mt: "5px",
|
|
32
|
-
mb: "5px",
|
|
33
|
-
whiteSpace: 'pre-line',
|
|
34
|
-
color: color
|
|
35
|
-
}, attachment.isTitleHtml ? parse(attachment.title) : attachment?.title), attachment.callToAction && React.createElement(Link, {
|
|
36
|
-
color: color,
|
|
37
|
-
mr: "2",
|
|
38
|
-
style: {
|
|
39
|
-
textDecoration: 'underline'
|
|
40
|
-
},
|
|
14
|
+
}, React.createElement(FiAlertCircle, {
|
|
15
|
+
className: "w-6 h-6 flex-shrink-0"
|
|
16
|
+
}), React.createElement("p", {
|
|
17
|
+
className: "text-sm mt-1.5 mb-1.5 whitespace-pre-line"
|
|
18
|
+
}, attachment.isTitleHtml ? parse(attachment.title) : attachment?.title), attachment.callToAction && React.createElement("a", {
|
|
19
|
+
className: "mr-2 underline hover:opacity-80",
|
|
41
20
|
href: attachment.callToAction.link,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
target: "_blank",
|
|
22
|
+
rel: "noopener noreferrer"
|
|
23
|
+
}, attachment.callToAction.title, " ", React.createElement(FiExternalLink, {
|
|
24
|
+
className: "inline ml-0.5"
|
|
45
25
|
})));
|
|
46
26
|
};export{MessageAlert};//# sourceMappingURL=MessageAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageAlert.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageAlert.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"sourcesContent":[null],"names":[],"mappings":"8MAaO,MAAM,YAAY,GAAG,KAAC,IAAoC;QAC7D;IACA,OAAM;IAIN,KAAA;AAMQ,IAAA;WACA;QAGC;;;cAOuC,CAAA,aAAA,CAAA,KAAC,EAAA;AAKrD,IAAE,GAAA,EAAA,CAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageCard.d.ts","sourceRoot":"","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"MessageCard.d.ts","sourceRoot":"","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,kBAAkB,sBA+EpD,CAAC"}
|
|
@@ -1,92 +1,58 @@
|
|
|
1
|
-
import React from'react';import {startCase}from'lodash-es';import parse from'html-react-parser';import {
|
|
1
|
+
import React from'react';import {startCase}from'lodash-es';import parse from'html-react-parser';import {FiExternalLink}from'@react-icons/all-files/fi/FiExternalLink.js';import {FiStar}from'@react-icons/all-files/fi/FiStar.js';const MessageCard = props => {
|
|
2
2
|
const {
|
|
3
3
|
message,
|
|
4
4
|
index
|
|
5
5
|
} = props;
|
|
6
|
-
const color = useColorModeValue('gray.800', 'white');
|
|
7
6
|
const {
|
|
8
7
|
attachment
|
|
9
8
|
} = message.propsConfiguration?.contents;
|
|
10
9
|
const {
|
|
11
10
|
property
|
|
12
11
|
} = attachment;
|
|
13
|
-
return React.createElement(
|
|
14
|
-
|
|
15
|
-
cursor: 'pointer'
|
|
16
|
-
},
|
|
17
|
-
margin: 5,
|
|
18
|
-
maxW: "xs",
|
|
19
|
-
borderWidth: "1px",
|
|
20
|
-
borderRadius: "lg",
|
|
21
|
-
overflow: "hidden",
|
|
12
|
+
return React.createElement("div", {
|
|
13
|
+
className: "m-5 max-w-xs border border-gray-200 rounded-lg overflow-hidden hover:cursor-pointer",
|
|
22
14
|
key: `${index}`
|
|
23
|
-
}, React.createElement(
|
|
24
|
-
|
|
15
|
+
}, React.createElement("img", {
|
|
16
|
+
className: "w-full",
|
|
25
17
|
src: attachment.image,
|
|
26
18
|
alt: attachment.title
|
|
27
|
-
}), React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, React.createElement(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, React.createElement(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
mt: "4",
|
|
57
|
-
mb: "3",
|
|
58
|
-
alignItems: "center"
|
|
59
|
-
}, attachment.isDescriptionHtml ? parse(attachment.description) : React.createElement(Text, null, attachment.description)), property && React.createElement(Box, {
|
|
60
|
-
display: "flex",
|
|
61
|
-
mb: "4"
|
|
62
|
-
}, property?.price && React.createElement(Box, {
|
|
63
|
-
mt: 2
|
|
64
|
-
}, property.price, React.createElement(Box, {
|
|
65
|
-
as: "span",
|
|
66
|
-
color: "gray.600",
|
|
67
|
-
fontSize: "sm"
|
|
68
|
-
}, "\u00A0/ ", startCase(property.priceType))), React.createElement(Spacer, null), React.createElement(Box, {
|
|
69
|
-
mt: "2",
|
|
70
|
-
alignItems: "center"
|
|
71
|
-
}, property?.totalReview && React.createElement(Box, {
|
|
72
|
-
as: "span",
|
|
73
|
-
ml: "2",
|
|
74
|
-
color: "gray.600",
|
|
75
|
-
fontSize: "sm",
|
|
76
|
-
mr: "2"
|
|
77
|
-
}, property.totalReview, " reviews"), property?.totalStar && Array(5).fill('').map((_, i) => React.createElement(StarIcon, {
|
|
19
|
+
}), React.createElement("div", {
|
|
20
|
+
className: "m-3"
|
|
21
|
+
}, React.createElement("div", {
|
|
22
|
+
className: "mt-3 leading-tight line-clamp-1"
|
|
23
|
+
}, React.createElement("h3", {
|
|
24
|
+
className: "text-gray-800 dark:text-white text-sm font-semibold"
|
|
25
|
+
}, attachment.isTitleHtml ? parse(attachment.title) : attachment.title)), property && React.createElement("div", {
|
|
26
|
+
className: "mt-3 flex"
|
|
27
|
+
}, property?.type && React.createElement("div", null, React.createElement("span", {
|
|
28
|
+
className: "inline-flex items-center rounded-full px-2 py-1 text-xs font-medium bg-teal-100 text-teal-800"
|
|
29
|
+
}, startCase(property.type))), React.createElement("div", {
|
|
30
|
+
className: "flex-1"
|
|
31
|
+
}), property?.maxPeople && React.createElement("div", {
|
|
32
|
+
className: "text-gray-500 font-semibold tracking-wide text-xs uppercase ml-2"
|
|
33
|
+
}, property.maxPeople, " Max People")), React.createElement("div", {
|
|
34
|
+
className: "flex mt-4 mb-3 items-center"
|
|
35
|
+
}, attachment.isDescriptionHtml ? parse(attachment.description) : React.createElement("p", null, attachment.description)), property && React.createElement("div", {
|
|
36
|
+
className: "flex mb-4"
|
|
37
|
+
}, property?.price && React.createElement("div", {
|
|
38
|
+
className: "mt-2"
|
|
39
|
+
}, property.price, React.createElement("span", {
|
|
40
|
+
className: "text-gray-600 text-sm"
|
|
41
|
+
}, "\u00A0/ ", startCase(property.priceType))), React.createElement("div", {
|
|
42
|
+
className: "flex-1"
|
|
43
|
+
}), React.createElement("div", {
|
|
44
|
+
className: "mt-2 items-center"
|
|
45
|
+
}, property?.totalReview && React.createElement("span", {
|
|
46
|
+
className: "ml-2 text-gray-600 text-sm mr-2"
|
|
47
|
+
}, property.totalReview, " reviews"), property?.totalStar && Array(5).fill('').map((_, i) => React.createElement(FiStar, {
|
|
78
48
|
key: i,
|
|
79
|
-
|
|
80
|
-
})))), attachment.callToAction && React.createElement(
|
|
49
|
+
className: `inline ml-px ${i < property.totalStar ? 'text-teal-500' : 'text-gray-400'}`
|
|
50
|
+
})))), attachment.callToAction && React.createElement("a", {
|
|
81
51
|
href: attachment.callToAction.link,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
isExternal: true
|
|
89
|
-
}, attachment.callToAction.title, " ", React.createElement(ExternalLinkIcon, {
|
|
90
|
-
mx: "2px"
|
|
52
|
+
className: "cursor-pointer hover:underline text-blue-600 dark:text-blue-400",
|
|
53
|
+
target: "_blank",
|
|
54
|
+
rel: "noopener noreferrer"
|
|
55
|
+
}, attachment.callToAction.title, " ", React.createElement(FiExternalLink, {
|
|
56
|
+
className: "inline ml-0.5"
|
|
91
57
|
}))));
|
|
92
58
|
};export{MessageCard};//# sourceMappingURL=MessageCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageCard.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageCard.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"kOAaO,MAAM,WAAW,GAAG,KAAC,IAA2B;AACnD,EAAA,MAAA;IACA,OAAM;AAIN,IAAA;MACA,KAAO;AAKC,EAAA,MAAA;;aAEI,CAAA,kBAAA,EAAA,QAAK;;AAKJ,IAAA;gBAEQ;AAEO,EAAA,OAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;oGAKsB;AAC7B,IAAA,GAAA,EAAA,CAAA,EAAA,KAAA,CAAA;AAEQ,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAS,EAAA;AACR,IAAA,SAAA,EAAA,QAAA;mBAIlB,CAAA,KAAA;AAGC,IAAA,GAAA,EAAA,UAAA,CAAQ;AAEA,GAAA,CAAA,EAAA,KAAA,CAAA,cAAU,KAAK,EAAA;AAEP,IAAA,SAAA,EAAA;wBACD,CAAA,KAAA,EAAA;;AAAiD,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;;gBAIzD,WAAA,GAAA,KAAA,CAAA,UAAK,CAAA,KAAA,CAAA,GAAU,UAAA,CAAA,KAAA,CAAA,CAAA,EAAmB,QAAA,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAC7B,IAAA,SAAA,EAAA;AACsD,GAAA,EAAA,QAAA,EAAA,IAAA,IAAA,KAAA,CAAA,aAAS,CAAA,KAAW,EAAA,IAAA,EAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;;AAE1E,GAAA,EAAA,SAAA,CAAA,QAAA,CAAA,IAAQ,EAAE,CAAA,EAAA,KAAA,CAAS,aAAA,CAAA,KAAA,EAAA;;6BAEX,KAAK,cAAG,CAAA,KAAA,EAAA;AACR,IAAA,SAAA,EAAA;aAWpB,CAAA,SAAW,eAAY,CAAI,CACxB,2BACI,EAAA;;;;AAWxB,GAAE,EAAA,QAAA,EAAA,KAAA,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CardMessageAttachmentsInterface as BaseCardMessageAttachmentsInterface } from '@messenger-box/
|
|
2
|
-
export { AlertMessageAttachmentsInterface } from '@messenger-box/
|
|
1
|
+
import { CardMessageAttachmentsInterface as BaseCardMessageAttachmentsInterface } from '@messenger-box/tailwind-ui-inbox';
|
|
2
|
+
export { AlertMessageAttachmentsInterface } from '@messenger-box/tailwind-ui-inbox';
|
|
3
3
|
export interface CardMessageAttachmentsInterface extends BaseCardMessageAttachmentsInterface {
|
|
4
4
|
property: {
|
|
5
5
|
price: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-widgets.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/message-widgets.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,IAAI,mCAAmC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"message-widgets.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/message-widgets.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,IAAI,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAE1H,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF,MAAM,WAAW,+BAAgC,SAAQ,mCAAmC;IACxF,QAAQ,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACvB,CAAC;CACL"}
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"mNAIO,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC;AAC/B,EAAA,oBAAA,EAAoB,CAAA;AAChB,IAAA,IAAA,EAAA,YAAA,CAAA,KAAA,CAAA,WAAA,EAAA;AACI,IAAA,MAAA,EAAA;AACA,GAAA,EAAA;AACH,IAAA,IAAA,EAAA,YAAA,CAAA,IAAA,CAAA,WAAA,EAAA;AACD,IAAA,MAAA,EAAA;AACI,GAAA;AACA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from'react';import {Fill}from'@common-stack/components-pro';import {PostTypeEnum}from'common';import'lodash-es';import'html-react-parser';import'@
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import {PostTypeEnum}from'common';import'lodash-es';import'html-react-parser';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiStar.js';import {MessageAlert}from'../components/InboxMessage/MessageWidgets/MessageAlert.js';const MessageAlertFill = () => {
|
|
2
2
|
return React.createElement(Fill, {
|
|
3
3
|
name: PostTypeEnum.Alert.toLowerCase()
|
|
4
4
|
}, props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-alert-fill.js","sources":["../../src/slot-fill/message-alert-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message-alert-fill.js","sources":["../../src/slot-fill/message-alert-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"4UAMO,MAAM,gBAAgB,GAAG,MAAK;AACjC,EAAA,OAAA,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA,YAAU,CAAA,KAAS,CAAA,WAAA;AACf,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,YAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from'react';import {Fill}from'@common-stack/components-pro';import {PostTypeEnum}from'common';import {MessageCard}from'../components/InboxMessage/MessageWidgets/MessageCard.js';import'@
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import {PostTypeEnum}from'common';import {MessageCard}from'../components/InboxMessage/MessageWidgets/MessageCard.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'html-react-parser';const MessageCardFill = () => {
|
|
2
2
|
return React.createElement(Fill, {
|
|
3
3
|
name: PostTypeEnum.Card.toLowerCase()
|
|
4
4
|
}, props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-card-fill.js","sources":["../../src/slot-fill/message-card-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message-card-fill.js","sources":["../../src/slot-fill/message-card-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"+TAMO,MAAM,eAAe,GAAG,MAAK;AAChC,EAAA,OAAA,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA,YAAU,CAAA,IAAS,CAAA,WAAA;AACf,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,WAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/property-ext-browser",
|
|
3
|
-
"version": "10.0.3-alpha.
|
|
3
|
+
"version": "10.0.3-alpha.201",
|
|
4
4
|
"description": "Extention to Messenger to support property on browser",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"watch": "npm run build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@messenger-box/
|
|
25
|
-
"@messenger-box/core": "10.0.3-alpha.0",
|
|
24
|
+
"@messenger-box/core": "10.0.3-alpha.201",
|
|
26
25
|
"@messenger-box/property-ext-core": "link:../core",
|
|
26
|
+
"@messenger-box/tailwind-ui-inbox": "10.0.3-alpha.201",
|
|
27
27
|
"date-fns": "^4.1.0",
|
|
28
28
|
"date-fns-tz": "^3.2.0",
|
|
29
29
|
"emoji-mart": "^3.0.1",
|
|
@@ -35,10 +35,8 @@
|
|
|
35
35
|
"@adminide-stack/core": "*",
|
|
36
36
|
"@adminide-stack/user-auth0-browser": "*",
|
|
37
37
|
"@cdm-logger/client": "*",
|
|
38
|
-
"@chakra-ui/react": "*",
|
|
39
38
|
"@common-stack/client-react": "*",
|
|
40
39
|
"@workbench-stack/components": "*",
|
|
41
|
-
"antd": ">=5.1.0",
|
|
42
40
|
"lodash": "*",
|
|
43
41
|
"moment": "*",
|
|
44
42
|
"react": ">=16.14.0",
|
|
@@ -55,5 +53,5 @@
|
|
|
55
53
|
"typescript": {
|
|
56
54
|
"definition": "lib/index.d.ts"
|
|
57
55
|
},
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "1be5725604232d5f432d47a63a712031da4d96c0"
|
|
59
57
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [10.0.3-alpha.2](https://github.com/cdmbase/messenger-box/compare/v10.0.3-alpha.1...v10.0.3-alpha.2) (2025-02-24)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
9
|
-
|
|
10
|
-
## [10.0.3-alpha.0](https://github.com/cdmbase/messenger-box/compare/v10.0.2-alpha.6...v10.0.3-alpha.0) (2025-02-24)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
13
|
-
|
|
14
|
-
## [10.0.2-alpha.5](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.4...v10.0.2-alpha.5) (2025-02-24)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
17
|
-
|
|
18
|
-
## [10.0.2-alpha.4](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.3...v10.0.2-alpha.4) (2025-02-10)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
21
|
-
|
|
22
|
-
## [10.0.2-alpha.3](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.2...v10.0.2-alpha.3) (2025-02-10)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
25
|
-
|
|
26
|
-
## [10.0.2-alpha.2](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.1...v10.0.2-alpha.2) (2025-02-10)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
29
|
-
|
|
30
|
-
## [10.0.2-alpha.0](https://github.com/cdmbase/messenger-box/compare/v9.0.4-alpha.23...v10.0.2-alpha.0) (2025-02-04)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
33
|
-
|
|
34
|
-
## [10.0.1-alpha.0](https://github.com/cdmbase/messenger-box/compare/v9.0.4-alpha.23...v10.0.1-alpha.0) (2025-02-04)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
37
|
-
|
|
38
|
-
## [9.0.4-alpha.22](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.21...v9.0.4-alpha.22) (2025-01-31)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
41
|
-
|
|
42
|
-
## [9.0.4-alpha.17](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.16...v9.0.4-alpha.17) (2024-10-17)
|
|
43
|
-
|
|
44
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
45
|
-
|
|
46
|
-
## [9.0.4-alpha.16](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.15...v9.0.4-alpha.16) (2024-10-08)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
49
|
-
|
|
50
|
-
## [9.0.4-alpha.15](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.14...v9.0.4-alpha.15) (2024-09-30)
|
|
51
|
-
|
|
52
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
53
|
-
|
|
54
|
-
## [9.0.4-alpha.7](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.6...v9.0.4-alpha.7) (2024-09-20)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
57
|
-
|
|
58
|
-
## [9.0.4-alpha.1](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.0...v9.0.4-alpha.1) (2024-09-12)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
61
|
-
|
|
62
|
-
## [9.0.2-alpha.0](https://github.com/CDEBase/messenger-box/compare/v7.2.6-alpha.10...v9.0.2-alpha.0) (2024-09-06)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
65
|
-
|
|
66
|
-
## [7.2.6-alpha.10](https://github.com/CDEBase/messenger-box/compare/v7.2.6-alpha.9...v7.2.6-alpha.10) (2024-08-13)
|
|
67
|
-
|
|
68
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
69
|
-
|
|
70
|
-
## [7.2.6-alpha.4](https://github.com/CDEBase/messenger-box/compare/v7.2.6-alpha.3...v7.2.6-alpha.4) (2024-08-12)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
73
|
-
|
|
74
|
-
## 7.2.6-alpha.0 (2024-08-11)
|
|
75
|
-
|
|
76
|
-
### Features
|
|
77
|
-
|
|
78
|
-
- add proeprty ext module with fills based on property types ([9728317](https://github.com/CDEBase/messenger-box/commit/97283176059dca7e4bd78ad4de7bc26ae0492387))
|
|
79
|
-
|
|
80
|
-
## 7.2.4-alpha.0 (2024-07-19)
|
|
81
|
-
|
|
82
|
-
### Features
|
|
83
|
-
|
|
84
|
-
- add proeprty ext module with fills based on property types ([9728317](https://github.com/CDEBase/messenger-box/commit/97283176059dca7e4bd78ad4de7bc26ae0492387))
|
|
85
|
-
|
|
86
|
-
## [7.2.1-alpha.4](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.3...v7.2.1-alpha.4) (2024-07-16)
|
|
87
|
-
|
|
88
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
89
|
-
|
|
90
|
-
## [7.2.1-alpha.2](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.1...v7.2.1-alpha.2) (2024-07-16)
|
|
91
|
-
|
|
92
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
93
|
-
|
|
94
|
-
## [7.2.1-alpha.1](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.0...v7.2.1-alpha.1) (2024-07-16)
|
|
95
|
-
|
|
96
|
-
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
97
|
-
|
|
98
|
-
## 7.2.1-alpha.0 (2024-07-15)
|
|
99
|
-
|
|
100
|
-
### Features
|
|
101
|
-
|
|
102
|
-
- add proeprty ext module with fills based on property types ([9728317](https://github.com/CDEBase/messenger-box/commit/97283176059dca7e4bd78ad4de7bc26ae0492387))
|
package/jest.config.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const base = require('../../../jest.config.base');
|
|
2
|
-
const packageJson = require('./package');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
...base,
|
|
6
|
-
testEnvironment: 'jsdom', // This is overriden, from the base testEnvironment
|
|
7
|
-
name: packageJson.name,
|
|
8
|
-
displayName: packageJson.name,
|
|
9
|
-
};
|
package/rollup.config.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createRollupConfig } from '../../../rollup.config.base.mjs';
|
|
2
|
-
|
|
3
|
-
const additionalPlugins = [];
|
|
4
|
-
// Use the createRollupConfig function to merge the base and specific configurations
|
|
5
|
-
export default (commandLineArgs) => {
|
|
6
|
-
const isWatchMode = commandLineArgs.watch;
|
|
7
|
-
return [
|
|
8
|
-
createRollupConfig(
|
|
9
|
-
{
|
|
10
|
-
input: ['src/index.ts'],
|
|
11
|
-
plugins: [
|
|
12
|
-
// Spread in additional plugins specific to this config
|
|
13
|
-
...additionalPlugins,
|
|
14
|
-
],
|
|
15
|
-
output: [
|
|
16
|
-
{
|
|
17
|
-
dir: 'lib',
|
|
18
|
-
format: 'es',
|
|
19
|
-
name: 'property-ext-browser',
|
|
20
|
-
compact: true,
|
|
21
|
-
exports: 'named',
|
|
22
|
-
sourcemap: true,
|
|
23
|
-
preserveModules: true,
|
|
24
|
-
chunkFileNames: '[name]-[hash].[format].js',
|
|
25
|
-
globals: { react: 'React' },
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
isWatchMode,
|
|
31
|
-
generateRoutesJSON: true,
|
|
32
|
-
},
|
|
33
|
-
),
|
|
34
|
-
];
|
|
35
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as Icons from '@chakra-ui/icons';
|
|
3
|
-
import parse from 'html-react-parser';
|
|
4
|
-
import { Link, Stack, Text, useColorModeValue } from '@chakra-ui/react';
|
|
5
|
-
import { IPost } from 'common';
|
|
6
|
-
import { AlertMessageAttachmentsInterface } from '../../../interfaces';
|
|
7
|
-
|
|
8
|
-
export interface IPropertyMessageWidgetProps {
|
|
9
|
-
message: IPost;
|
|
10
|
-
index: number;
|
|
11
|
-
onMessageClick: (ref: IPost) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const MessageAlert = (props: IPropertyMessageWidgetProps) => {
|
|
15
|
-
const { message, index, onMessageClick } = props;
|
|
16
|
-
const { attachment } = message.propsConfiguration.contents as {
|
|
17
|
-
attachment: AlertMessageAttachmentsInterface;
|
|
18
|
-
};
|
|
19
|
-
const Icon = Icons[attachment.icon];
|
|
20
|
-
const color = useColorModeValue('white', 'gray.800');
|
|
21
|
-
const bgColor = useColorModeValue('gray.800', 'white');
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Stack
|
|
25
|
-
key={`${index}`}
|
|
26
|
-
mt="4"
|
|
27
|
-
mb="10"
|
|
28
|
-
bgColor={bgColor}
|
|
29
|
-
padding={3}
|
|
30
|
-
margin={2}
|
|
31
|
-
opacity={0.7}
|
|
32
|
-
borderRadius={20}
|
|
33
|
-
direction={['column', 'row']}
|
|
34
|
-
cursor={'pointer'}
|
|
35
|
-
onClick={() => onMessageClick(message)}
|
|
36
|
-
>
|
|
37
|
-
<Icon w={6} h={6} color={color} />
|
|
38
|
-
<Text fontSize="14px" mt="5px" mb="5px" whiteSpace={'pre-line'} color={color}>
|
|
39
|
-
{attachment.isTitleHtml ? parse(attachment.title) : attachment?.title}
|
|
40
|
-
</Text>
|
|
41
|
-
{attachment.callToAction && (
|
|
42
|
-
<Link
|
|
43
|
-
color={color}
|
|
44
|
-
mr="2"
|
|
45
|
-
style={{
|
|
46
|
-
textDecoration: 'underline',
|
|
47
|
-
}}
|
|
48
|
-
href={attachment.callToAction.link}
|
|
49
|
-
isExternal
|
|
50
|
-
>
|
|
51
|
-
{attachment.callToAction.title} <Icons.ExternalLinkIcon mx="2px" />
|
|
52
|
-
</Link>
|
|
53
|
-
)}
|
|
54
|
-
</Stack>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { startCase } from 'lodash-es';
|
|
3
|
-
import parse from 'html-react-parser';
|
|
4
|
-
import { Badge, Box, Heading, Image, Link, Spacer, Text, useColorModeValue } from '@chakra-ui/react';
|
|
5
|
-
import { ExternalLinkIcon, StarIcon } from '@chakra-ui/icons';
|
|
6
|
-
import { IPost } from 'common';
|
|
7
|
-
import { CardMessageAttachmentsInterface } from '../../../interfaces';
|
|
8
|
-
|
|
9
|
-
export interface IPropertyCardProps {
|
|
10
|
-
message: IPost;
|
|
11
|
-
index: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const MessageCard = (props: IPropertyCardProps) => {
|
|
15
|
-
const { message, index } = props;
|
|
16
|
-
const color = useColorModeValue('gray.800', 'white');
|
|
17
|
-
const { attachment } = message.propsConfiguration?.contents as {
|
|
18
|
-
attachment: CardMessageAttachmentsInterface;
|
|
19
|
-
refId: string;
|
|
20
|
-
};
|
|
21
|
-
const { property } = attachment;
|
|
22
|
-
return (
|
|
23
|
-
<Box
|
|
24
|
-
_hover={{
|
|
25
|
-
cursor: 'pointer',
|
|
26
|
-
}}
|
|
27
|
-
margin={5}
|
|
28
|
-
maxW="xs"
|
|
29
|
-
borderWidth="1px"
|
|
30
|
-
borderRadius="lg"
|
|
31
|
-
overflow="hidden"
|
|
32
|
-
key={`${index}`}
|
|
33
|
-
>
|
|
34
|
-
<Image width="100%" src={attachment.image} alt={attachment.title} />
|
|
35
|
-
<Box marginTop={4} margin={2} m="3">
|
|
36
|
-
<Box mt="3" lineHeight="tight" noOfLines={1}>
|
|
37
|
-
<Heading color={color} fontSize="14px" fontWeight="semibold" as="h3">
|
|
38
|
-
{attachment.isTitleHtml ? parse(attachment.title) : attachment.title}
|
|
39
|
-
</Heading>
|
|
40
|
-
</Box>
|
|
41
|
-
{property && (
|
|
42
|
-
<Box mt="3" display="flex">
|
|
43
|
-
{property?.type && (
|
|
44
|
-
<Box>
|
|
45
|
-
<Badge borderRadius="full" px="2" colorScheme="teal">
|
|
46
|
-
{startCase(property.type)}
|
|
47
|
-
</Badge>
|
|
48
|
-
</Box>
|
|
49
|
-
)}
|
|
50
|
-
<Spacer />
|
|
51
|
-
{property?.maxPeople && (
|
|
52
|
-
<Box
|
|
53
|
-
color="gray.500"
|
|
54
|
-
fontWeight="semibold"
|
|
55
|
-
letterSpacing="wide"
|
|
56
|
-
fontSize="xs"
|
|
57
|
-
textTransform="uppercase"
|
|
58
|
-
ml="2"
|
|
59
|
-
>
|
|
60
|
-
{property.maxPeople} Max People
|
|
61
|
-
</Box>
|
|
62
|
-
)}
|
|
63
|
-
</Box>
|
|
64
|
-
)}
|
|
65
|
-
<Box display="flex" mt="4" mb="3" alignItems="center">
|
|
66
|
-
{attachment.isDescriptionHtml ? (
|
|
67
|
-
parse(attachment.description)
|
|
68
|
-
) : (
|
|
69
|
-
<Text>{attachment.description}</Text>
|
|
70
|
-
)}
|
|
71
|
-
</Box>
|
|
72
|
-
{property && (
|
|
73
|
-
<Box display="flex" mb="4">
|
|
74
|
-
{property?.price && (
|
|
75
|
-
<Box mt={2}>
|
|
76
|
-
{property.price}
|
|
77
|
-
<Box as="span" color="gray.600" fontSize="sm">
|
|
78
|
-
/ {startCase(property.priceType)}
|
|
79
|
-
</Box>
|
|
80
|
-
</Box>
|
|
81
|
-
)}
|
|
82
|
-
<Spacer />
|
|
83
|
-
<Box mt="2" alignItems="center">
|
|
84
|
-
{property?.totalReview && (
|
|
85
|
-
<Box as="span" ml="2" color="gray.600" fontSize="sm" mr="2">
|
|
86
|
-
{property.totalReview} reviews
|
|
87
|
-
</Box>
|
|
88
|
-
)}
|
|
89
|
-
{property?.totalStar &&
|
|
90
|
-
Array(5)
|
|
91
|
-
.fill('')
|
|
92
|
-
.map((_, i) => (
|
|
93
|
-
<StarIcon key={i} color={i < property.totalStar ? 'teal.500' : 'gray.300'} />
|
|
94
|
-
))}
|
|
95
|
-
</Box>
|
|
96
|
-
</Box>
|
|
97
|
-
)}
|
|
98
|
-
{attachment.callToAction && (
|
|
99
|
-
<Link
|
|
100
|
-
href={attachment.callToAction.link}
|
|
101
|
-
style={{
|
|
102
|
-
cursor: 'pointer',
|
|
103
|
-
}}
|
|
104
|
-
_hover={{
|
|
105
|
-
cursor: 'pointer',
|
|
106
|
-
}}
|
|
107
|
-
isExternal
|
|
108
|
-
>
|
|
109
|
-
{attachment.callToAction.title} <ExternalLinkIcon mx="2px" />
|
|
110
|
-
</Link>
|
|
111
|
-
)}
|
|
112
|
-
</Box>
|
|
113
|
-
</Box>
|
|
114
|
-
);
|
|
115
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MessageAlert, MessageCard } from './MessageWidgets';
|
package/src/components/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MessageCard, MessageAlert } from './InboxMessage';
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { feature as default } from './module';
|
package/src/interfaces/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CardMessageAttachmentsInterface, AlertMessageAttachmentsInterface } from './message-widgets.interface';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CardMessageAttachmentsInterface as BaseCardMessageAttachmentsInterface } from '@messenger-box/chakra-ui-inbox';
|
|
2
|
-
|
|
3
|
-
export { AlertMessageAttachmentsInterface } from '@messenger-box/chakra-ui-inbox';
|
|
4
|
-
|
|
5
|
-
export interface CardMessageAttachmentsInterface extends BaseCardMessageAttachmentsInterface {
|
|
6
|
-
property: {
|
|
7
|
-
price: number;
|
|
8
|
-
priceType: string;
|
|
9
|
-
type: string;
|
|
10
|
-
totalStar: number;
|
|
11
|
-
maxPeople: number;
|
|
12
|
-
totalReview: number;
|
|
13
|
-
};
|
|
14
|
-
}
|
package/src/module.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Feature } from '@common-stack/client-react';
|
|
2
|
-
import { PostTypeEnum } from 'common';
|
|
3
|
-
import { MessageAlertFill, MessageCardFill } from './slot-fill';
|
|
4
|
-
|
|
5
|
-
export const feature = new Feature({
|
|
6
|
-
componentFillPlugins: [
|
|
7
|
-
{
|
|
8
|
-
name: PostTypeEnum.Alert.toLowerCase(),
|
|
9
|
-
render: MessageAlertFill,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: PostTypeEnum.Card.toLowerCase(),
|
|
13
|
-
render: MessageCardFill,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
});
|
package/src/slot-fill/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Fill } from '@common-stack/components-pro';
|
|
3
|
-
import { PostTypeEnum } from 'common';
|
|
4
|
-
import { MessageAlert } from '../components';
|
|
5
|
-
import { IPropertyMessageWidgetProps } from '../components/InboxMessage/MessageWidgets/MessageAlert';
|
|
6
|
-
|
|
7
|
-
export const MessageAlertFill = () => {
|
|
8
|
-
return (
|
|
9
|
-
<Fill name={PostTypeEnum.Alert.toLowerCase()}>
|
|
10
|
-
{(props: IPropertyMessageWidgetProps & { active: boolean }) => {
|
|
11
|
-
if (props.active) {
|
|
12
|
-
return <MessageAlert {...props} />;
|
|
13
|
-
}
|
|
14
|
-
return null;
|
|
15
|
-
}}
|
|
16
|
-
</Fill>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Fill } from '@common-stack/components-pro';
|
|
3
|
-
import { PostTypeEnum } from 'common';
|
|
4
|
-
import { MessageCard } from '../components';
|
|
5
|
-
import { IPropertyCardProps } from '../components/InboxMessage/MessageWidgets/MessageCard';
|
|
6
|
-
|
|
7
|
-
export const MessageCardFill = () => {
|
|
8
|
-
return (
|
|
9
|
-
<Fill name={PostTypeEnum.Card.toLowerCase()}>
|
|
10
|
-
{(props: IPropertyCardProps & { active: boolean }) => {
|
|
11
|
-
if (props.active) {
|
|
12
|
-
return <MessageCard {...props} />;
|
|
13
|
-
}
|
|
14
|
-
return null;
|
|
15
|
-
}}
|
|
16
|
-
</Fill>
|
|
17
|
-
);
|
|
18
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "./src",
|
|
5
|
-
"outDir": "lib",
|
|
6
|
-
"declarationDir": "lib",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"types": ["@types/node", "@types/jest","../../../typings"]
|
|
11
|
-
},
|
|
12
|
-
"exclude": ["../../../node_modules", "node_modules", "lib", "dist", "webpack.config.js", "rollup.config.mjs"],
|
|
13
|
-
"include": ["src", "./typings/*.d.ts", "type.d.ts"]
|
|
14
|
-
}
|