@messenger-box/property-ext-browser 5.0.3-alpha.1 → 5.0.3-alpha.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.0.3-alpha.3](https://github.com/cdmbase/messenger-box/compare/v5.0.3-alpha.2...v5.0.3-alpha.3) (2024-03-22)
7
+
8
+ **Note:** Version bump only for package @messenger-box/property-ext-browser
9
+
10
+ ## [5.0.3-alpha.2](https://github.com/cdmbase/messenger-box/compare/v5.0.3-alpha.1...v5.0.3-alpha.2) (2024-03-09)
11
+
12
+ **Note:** Version bump only for package @messenger-box/property-ext-browser
13
+
6
14
  ## [5.0.3-alpha.1](https://github.com/cdmbase/messenger-box/compare/v5.0.3-alpha.0...v5.0.3-alpha.1) (2024-03-08)
7
15
 
8
16
  **Note:** Version bump only for package @messenger-box/property-ext-browser
@@ -6,7 +6,7 @@ import React from'react';import*as Icons from'@chakra-ui/icons';import parse fro
6
6
  const bgColor = useColorModeValue('gray.800', 'white');
7
7
  return (React.createElement(Stack, { key: `${index}`, mt: "4", mb: "10", bgColor: bgColor, padding: 3, margin: 2, opacity: 0.7, borderRadius: 20, direction: ['column', 'row'] },
8
8
  React.createElement(Icon, { w: 6, h: 6, color: color }),
9
- React.createElement(Text, { fontSize: "14px", mt: "5px", mb: "5px", whiteSpace: 'pre-line', color: color }, attachment.isTitleHtml ? parse(attachment.title) : attachment === null || attachment === void 0 ? void 0 : attachment.title),
9
+ React.createElement(Text, { fontSize: "14px", mt: "5px", mb: "5px", whiteSpace: 'pre-line', color: color }, attachment.isTitleHtml ? parse(attachment.title) : attachment?.title),
10
10
  attachment.callToAction && (React.createElement(Link, { color: color, mr: "2", style: {
11
11
  textDecoration: 'underline'
12
12
  }, href: attachment.callToAction.link, isExternal: true },
@@ -1 +1 @@
1
- {"version":3,"file":"MessageAlert.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"sourcesContent":[null],"names":[],"mappings":"sKAYa,MAAA,YAAY,GAAG,CAAC,KAAkC,KAAI;AAC/D,IAAA,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,QAA4D,CAAC;IAC/G,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,QACI,oBAAC,KAAK,EAAA,EACF,GAAG,EAAE,CAAA,EAAG,KAAK,CAAE,CAAA,EACf,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,GAAG,EACZ,YAAY,EAAE,EAAE,EAChB,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAA;AAE5B,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAG,CAAA;QACjC,KAAC,CAAA,aAAA,CAAA,IAAI,IAAC,QAAQ,EAAC,MAAM,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,EACvE,UAAU,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,KAAV,IAAA,IAAA,UAAU,uBAAV,UAAU,CAAE,KAAK,CAClE;AAEH,QAAA,UAAU,CAAC,YAAY,KACnB,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,KAAK,EAAE,KAAK,EACZ,EAAE,EAAC,GAAG,EACN,KAAK,EAAE;AACH,gBAAA,cAAc,EAAE,WAAW;aAC9B,EACD,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,EAClC,UAAU,EAAA,IAAA,EAAA;YAET,UAAU,CAAC,YAAY,CAAC,KAAK;;AAAE,YAAA,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAgB,EAAA,EAAC,EAAE,EAAC,KAAK,EAAA,CAAE,CAC/D,CACV,CAED,EACX;AACL"}
1
+ {"version":3,"file":"MessageAlert.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"sourcesContent":[null],"names":[],"mappings":"sKAYa,MAAA,YAAY,GAAG,CAAC,KAAkC,KAAI;AAC/D,IAAA,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,QAA4D,CAAC;IAC/G,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,QACI,oBAAC,KAAK,EAAA,EACF,GAAG,EAAE,CAAA,EAAG,KAAK,CAAE,CAAA,EACf,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,GAAG,EACZ,YAAY,EAAE,EAAE,EAChB,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAA;AAE5B,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAG,CAAA;AACjC,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,QAAQ,EAAC,MAAM,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,EACvE,UAAU,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,EAAE,KAAK,CAClE;AAEH,QAAA,UAAU,CAAC,YAAY,KACnB,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,KAAK,EAAE,KAAK,EACZ,EAAE,EAAC,GAAG,EACN,KAAK,EAAE;AACH,gBAAA,cAAc,EAAE,WAAW;aAC9B,EACD,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,EAClC,UAAU,EAAA,IAAA,EAAA;YAET,UAAU,CAAC,YAAY,CAAC,KAAK;;AAAE,YAAA,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAgB,EAAA,EAAC,EAAE,EAAC,KAAK,EAAA,CAAE,CAC/D,CACV,CAED,EACX;AACL"}
@@ -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,qBAAqB,CAAC;AAG5C,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,KAAK,CAAA;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,UAAW,kBAAkB,sBA8HpD,CAAA"}
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,qBAAqB,CAAC;AAG5C,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,UAAW,kBAAkB,sBAqGpD,CAAC"}
@@ -1,42 +1,42 @@
1
- import React from'react';import {startCase}from'lodash';import parse from'html-react-parser';import {useColorModeValue,Box,Image,Heading,Badge,Spacer,Text,Link}from'@chakra-ui/react';import {StarIcon,ExternalLinkIcon}from'@chakra-ui/icons';const MessageCard = (props) => {
2
- var _a;
1
+ import React from'react';import {startCase}from'lodash-es';import parse from'html-react-parser';import {useColorModeValue,Box,Image,Heading,Badge,Spacer,Text,Link}from'@chakra-ui/react';import {StarIcon,ExternalLinkIcon}from'@chakra-ui/icons';const MessageCard = (props) => {
3
2
  const { message, index } = props;
4
3
  const color = useColorModeValue('gray.800', 'white');
5
- const { attachment, } = (_a = message.propsConfiguration) === null || _a === void 0 ? void 0 : _a.contents;
4
+ const { attachment } = message.propsConfiguration?.contents;
6
5
  const { property } = attachment;
7
6
  return (React.createElement(Box, { _hover: {
8
- cursor: 'pointer'
7
+ cursor: 'pointer',
9
8
  }, margin: 5, maxW: "xs", borderWidth: "1px", borderRadius: "lg", overflow: "hidden", key: `${index}` },
10
9
  React.createElement(Image, { width: "100%", src: attachment.image, alt: attachment.title }),
11
10
  React.createElement(Box, { marginTop: 4, margin: 2, m: "3" },
12
11
  React.createElement(Box, { mt: "3", lineHeight: "tight", noOfLines: 1 },
13
12
  React.createElement(Heading, { color: color, fontSize: "14px", fontWeight: "semibold", as: "h3" }, attachment.isTitleHtml ? parse(attachment.title) : attachment.title)),
14
13
  property && (React.createElement(Box, { mt: "3", display: "flex" },
15
- (property === null || property === void 0 ? void 0 : property.type) && (React.createElement(Box, null,
14
+ property?.type && (React.createElement(Box, null,
16
15
  React.createElement(Badge, { borderRadius: "full", px: "2", colorScheme: "teal" }, startCase(property.type)))),
17
16
  React.createElement(Spacer, null),
18
- (property === null || property === void 0 ? void 0 : property.maxPeople) && (React.createElement(Box, { color: "gray.500", fontWeight: "semibold", letterSpacing: "wide", fontSize: "xs", textTransform: "uppercase", ml: "2" },
17
+ property?.maxPeople && (React.createElement(Box, { color: "gray.500", fontWeight: "semibold", letterSpacing: "wide", fontSize: "xs", textTransform: "uppercase", ml: "2" },
19
18
  property.maxPeople,
20
19
  " Max People")))),
21
- React.createElement(Box, { display: "flex", mt: "4", mb: "3", alignItems: "center" }, attachment.isDescriptionHtml ? parse(attachment.description) : (React.createElement(Text, null, attachment.description))),
20
+ React.createElement(Box, { display: "flex", mt: "4", mb: "3", alignItems: "center" }, attachment.isDescriptionHtml ? (parse(attachment.description)) : (React.createElement(Text, null, attachment.description))),
22
21
  property && (React.createElement(Box, { display: "flex", mb: "4" },
23
- (property === null || property === void 0 ? void 0 : property.price) && (React.createElement(Box, { mt: 2 },
22
+ property?.price && (React.createElement(Box, { mt: 2 },
24
23
  property.price,
25
24
  React.createElement(Box, { as: "span", color: "gray.600", fontSize: "sm" },
26
25
  "\u00A0/ ",
27
26
  startCase(property.priceType)))),
28
27
  React.createElement(Spacer, null),
29
28
  React.createElement(Box, { mt: "2", alignItems: "center" },
30
- (property === null || property === void 0 ? void 0 : property.totalReview) && (React.createElement(Box, { as: "span", ml: "2", color: "gray.600", fontSize: "sm", mr: "2" },
29
+ property?.totalReview && (React.createElement(Box, { as: "span", ml: "2", color: "gray.600", fontSize: "sm", mr: "2" },
31
30
  property.totalReview,
32
31
  " reviews")),
33
- (property === null || property === void 0 ? void 0 : property.totalStar) && Array(5)
34
- .fill('')
35
- .map((_, i) => (React.createElement(StarIcon, { key: i, color: i < property.totalStar ? 'teal.500' : 'gray.300' })))))),
32
+ property?.totalStar &&
33
+ Array(5)
34
+ .fill('')
35
+ .map((_, i) => (React.createElement(StarIcon, { key: i, color: i < property.totalStar ? 'teal.500' : 'gray.300' })))))),
36
36
  attachment.callToAction && (React.createElement(Link, { href: attachment.callToAction.link, style: {
37
- cursor: 'pointer'
37
+ cursor: 'pointer',
38
38
  }, _hover: {
39
- cursor: 'pointer'
39
+ cursor: 'pointer',
40
40
  }, isExternal: true },
41
41
  attachment.callToAction.title,
42
42
  " ",
@@ -1 +1 @@
1
- {"version":3,"file":"MessageCard.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"gPAaa,MAAA,WAAW,GAAG,CAAC,KAAyB,KAAI;;AACrD,IAAA,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,KAAK,GAAG,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACrD,MAAM,EACF,UAAU,GACb,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,kBAAkB,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAA0E,CAAC;AAC3G,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;AAChC,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EACA,MAAM,EAAE;AACJ,YAAA,MAAM,EAAE,SAAS;SACpB,EACD,MAAM,EAAE,CAAC,EACT,IAAI,EAAC,IAAI,EACT,WAAW,EAAC,KAAK,EACjB,YAAY,EAAC,IAAI,EACjB,QAAQ,EAAC,QAAQ,EACjB,GAAG,EAAE,CAAG,EAAA,KAAK,CAAE,CAAA,EAAA;AAEf,QAAA,KAAA,CAAA,aAAA,CAAC,KAAK,EACF,EAAA,KAAK,EAAC,MAAM,EACZ,GAAG,EAAE,UAAU,CAAC,KAAK,EACrB,GAAG,EAAE,UAAU,CAAC,KAAK,EACvB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EAAC,SAAS,EAAE,CAAC,EAAE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E,EAAC,GAAG,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAA;AACtD,wBAAA,QAAQ,CAAC,WAAW;mCACnB,CACT;oBAEJ,CAAA,QAAQ,KAAR,IAAA,IAAA,QAAQ,KAAR,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,QAAQ,CAAE,SAAS,KAAI,KAAK,CAAC,CAAC,CAAC;yBAC3B,IAAI,CAAC,EAAE,CAAC;AACR,yBAAA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MACN,KAAA,CAAA,aAAA,CAAC,QAAQ,EACL,EAAA,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,SAAS,GAAG,UAAU,GAAG,UAAU,EACzD,CAAA,CACL,CAAC,CACJ,CACJ,CACT;AAGD,YAAA,UAAU,CAAC,YAAY,KACnB,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,EAClC,KAAK,EAAE;AACH,oBAAA,MAAM,EAAE,SAAS;AACpB,iBAAA,EACD,MAAM,EAAE;AACJ,oBAAA,MAAM,EAAE,SAAS;AACpB,iBAAA,EACD,UAAU,EAAA,IAAA,EAAA;gBAET,UAAU,CAAC,YAAY,CAAC,KAAK;;gBAAE,KAAC,CAAA,aAAA,CAAA,gBAAgB,EAAC,EAAA,EAAE,EAAC,KAAK,EAAE,CAAA,CACzD,CACV,CAEH,CACJ,EACT;AACL"}
1
+ {"version":3,"file":"MessageCard.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"mPAaa,MAAA,WAAW,GAAG,CAAC,KAAyB,KAAI;AACrD,IAAA,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,KAAK,GAAG,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,C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um}from'@messenger-box/property-ext-core';import'lodash';import'html-react-parser';import'@chakra-ui/react';import'@chakra-ui/icons';import {MessageAlert}from'../components/InboxMessage/MessageWidgets/MessageAlert.js';const MessageAlertFill = () => {
1
+ import React from'react';import {Fill}from'@common-stack/components-pro';import {IPostTypeEnum}from'@messenger-box/property-ext-core';import'lodash-es';import'html-react-parser';import'@chakra-ui/react';import'@chakra-ui/icons';import {MessageAlert}from'../components/InboxMessage/MessageWidgets/MessageAlert.js';const MessageAlertFill = () => {
2
2
  return (React.createElement(Fill, { name: IPostTypeEnum.Alert.toLowerCase() }, (props) => {
3
3
  if (props.active) {
4
- return (React.createElement(MessageAlert, Object.assign({}, props)));
4
+ return (React.createElement(MessageAlert, { ...props }));
5
5
  }
6
6
  return null;
7
7
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"message-alert-fill.js","sources":["../../src/slot-fill/message-alert-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"sTAMO,MAAM,gBAAgB,GAAG,MAAK;AACjC,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,EAAA,EAErC,CAAC,KAAwD,KAAI;QACzD,IAAI,KAAK,CAAC,MAAM,EAAE;AACd,YAAA,QAAQ,KAAC,CAAA,aAAA,CAAA,YAAY,oBAAK,KAAK,CAAA,CAAG,EAAE;AACvC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf,CAEF,EACV;AACL"}
1
+ {"version":3,"file":"message-alert-fill.js","sources":["../../src/slot-fill/message-alert-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"yTAMO,MAAM,gBAAgB,GAAG,MAAK;AACjC,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,EAAA,EAErC,CAAC,KAAwD,KAAI;QACzD,IAAI,KAAK,CAAC,MAAM,EAAE;AACd,YAAA,QAAQ,KAAC,CAAA,aAAA,CAAA,YAAY,OAAK,KAAK,EAAA,CAAG,EAAE;AACvC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf,CAEF,EACV;AACL"}
@@ -1,7 +1,7 @@
1
1
  import React from'react';import {Fill}from'@common-stack/components-pro';import {MessageCard}from'../components/InboxMessage/MessageWidgets/MessageCard.js';import'@chakra-ui/icons';import'html-react-parser';import'@chakra-ui/react';import {IPostTypeEnum}from'@messenger-box/property-ext-core';const MessageCardFill = () => {
2
2
  return (React.createElement(Fill, { name: IPostTypeEnum.Card.toLowerCase() }, (props) => {
3
3
  if (props.active) {
4
- return (React.createElement(MessageCard, Object.assign({}, props)));
4
+ return (React.createElement(MessageCard, { ...props }));
5
5
  }
6
6
  return null;
7
7
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"message-card-fill.js","sources":["../../src/slot-fill/message-card-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"qSAMO,MAAM,eAAe,GAAG,MAAK;AAChC,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAA,EAEpC,CAAC,KAA+C,KAAI;QAChD,IAAI,KAAK,CAAC,MAAM,EAAE;AACd,YAAA,QAAQ,KAAC,CAAA,aAAA,CAAA,WAAW,oBAAK,KAAK,CAAA,CAAG,EAAE;AACtC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf,CAEF,EACV;AACL"}
1
+ {"version":3,"file":"message-card-fill.js","sources":["../../src/slot-fill/message-card-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"qSAMO,MAAM,eAAe,GAAG,MAAK;AAChC,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAA,EAEpC,CAAC,KAA+C,KAAI;QAChD,IAAI,KAAK,CAAC,MAAM,EAAE;AACd,YAAA,QAAQ,KAAC,CAAA,aAAA,CAAA,WAAW,OAAK,KAAK,EAAA,CAAG,EAAE;AACtC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf,CAEF,EACV;AACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messenger-box/property-ext-browser",
3
- "version": "5.0.3-alpha.1",
3
+ "version": "5.0.3-alpha.3",
4
4
  "description": "Extention to Messenger to support property on browser",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -23,9 +23,9 @@
23
23
  "dependencies": {
24
24
  "@emotion/react": "^11",
25
25
  "@emotion/styled": "^11",
26
- "@messenger-box/chakra-ui-inbox": "5.0.3-alpha.1",
27
- "@messenger-box/core": "5.0.3-alpha.1",
28
- "@messenger-box/property-ext-core": "5.0.3-alpha.0",
26
+ "@messenger-box/chakra-ui-inbox": "5.0.3-alpha.3",
27
+ "@messenger-box/core": "5.0.3-alpha.3",
28
+ "@messenger-box/property-ext-core": "5.0.3-alpha.3",
29
29
  "date-fns": "^2.28.0",
30
30
  "date-fns-tz": "^1.3.3",
31
31
  "emoji-mart": "^3.0.1",
@@ -58,5 +58,5 @@
58
58
  "typescript": {
59
59
  "definition": "lib/index.d.ts"
60
60
  },
61
- "gitHead": "b6a215fb3a3d7aa338b09e1018d80258ae4feda5"
61
+ "gitHead": "b1f5eab27a5dbe2c269502d93d719a40debfdbab"
62
62
  }
@@ -1,27 +1,28 @@
1
1
  import React from 'react';
2
- import { startCase } from 'lodash';
2
+ import { startCase } from 'lodash-es';
3
3
  import parse from 'html-react-parser';
4
4
  import { Badge, Box, Heading, Image, Link, Spacer, Text, useColorModeValue } from '@chakra-ui/react';
5
- import { ExternalLinkIcon, StarIcon } from '@chakra-ui/icons'
5
+ import { ExternalLinkIcon, StarIcon } from '@chakra-ui/icons';
6
6
  import { IPost } from '@messenger-box/core';
7
7
  import { CardMessageAttachmentsInterface } from '../../../interfaces';
8
8
 
9
9
  export interface IPropertyCardProps {
10
- message: IPost
10
+ message: IPost;
11
11
  index: number;
12
12
  }
13
13
 
14
14
  export const MessageCard = (props: IPropertyCardProps) => {
15
15
  const { message, index } = props;
16
16
  const color = useColorModeValue('gray.800', 'white');
17
- const {
18
- attachment,
19
- } = message.propsConfiguration?.contents as { attachment: CardMessageAttachmentsInterface, refId: string };
17
+ const { attachment } = message.propsConfiguration?.contents as {
18
+ attachment: CardMessageAttachmentsInterface;
19
+ refId: string;
20
+ };
20
21
  const { property } = attachment;
21
22
  return (
22
23
  <Box
23
24
  _hover={{
24
- cursor: 'pointer'
25
+ cursor: 'pointer',
25
26
  }}
26
27
  margin={5}
27
28
  maxW="xs"
@@ -30,111 +31,85 @@ export const MessageCard = (props: IPropertyCardProps) => {
30
31
  overflow="hidden"
31
32
  key={`${index}`}
32
33
  >
33
- <Image
34
- width="100%"
35
- src={attachment.image}
36
- alt={attachment.title}
37
- />
34
+ <Image width="100%" src={attachment.image} alt={attachment.title} />
38
35
  <Box marginTop={4} margin={2} m="3">
39
- <Box
40
- mt="3"
41
- lineHeight="tight"
42
- noOfLines={1}
43
- >
44
- <Heading
45
- color={color}
46
- fontSize="14px"
47
- fontWeight="semibold"
48
- as="h3"
49
- >
36
+ <Box mt="3" lineHeight="tight" noOfLines={1}>
37
+ <Heading color={color} fontSize="14px" fontWeight="semibold" as="h3">
50
38
  {attachment.isTitleHtml ? parse(attachment.title) : attachment.title}
51
39
  </Heading>
52
40
  </Box>
53
- {
54
- property && (
55
- <Box mt="3" display="flex">
56
- {
57
- property?.type && (
58
- <Box>
59
- <Badge borderRadius="full" px="2" colorScheme="teal">
60
- {startCase(property.type)}
61
- </Badge>
62
- </Box>
63
- )
64
- }
65
- <Spacer/>
66
- {
67
- property?.maxPeople && (
68
- <Box
69
- color="gray.500"
70
- fontWeight="semibold"
71
- letterSpacing="wide"
72
- fontSize="xs"
73
- textTransform="uppercase"
74
- ml="2"
75
- >
76
- {property.maxPeople} Max People
77
- </Box>
78
- )
79
- }
80
- </Box>
81
- )
82
- }
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
+ )}
83
65
  <Box display="flex" mt="4" mb="3" alignItems="center">
84
- {attachment.isDescriptionHtml ? parse(attachment.description) : (
85
- <Text>{attachment.description}</Text>)}
66
+ {attachment.isDescriptionHtml ? (
67
+ parse(attachment.description)
68
+ ) : (
69
+ <Text>{attachment.description}</Text>
70
+ )}
86
71
  </Box>
87
- {
88
- property && (
89
- <Box display="flex" mb="4">
90
- {
91
- property?.price && (
92
- <Box mt={2}>
93
- {property.price}
94
- <Box as="span" color="gray.600" fontSize="sm">
95
- &nbsp;/ {startCase(property.priceType)}
96
- </Box>
97
- </Box>
98
- )
99
- }
100
- <Spacer/>
101
- <Box mt="2" alignItems="center">
102
- {
103
- property?.totalReview && (
104
- <Box as="span" ml="2" color="gray.600" fontSize="sm" mr="2">
105
- {property.totalReview} reviews
106
- </Box>
107
- )
108
- }
109
- {property?.totalStar && Array(5)
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
+ &nbsp;/ {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)
110
91
  .fill('')
111
92
  .map((_, i) => (
112
- <StarIcon
113
- key={i}
114
- color={i < property.totalStar ? 'teal.500' : 'gray.300'}
115
- />
93
+ <StarIcon key={i} color={i < property.totalStar ? 'teal.500' : 'gray.300'} />
116
94
  ))}
117
- </Box>
118
95
  </Box>
119
- )
120
- }
121
- {
122
- attachment.callToAction && (
123
- <Link
124
- href={attachment.callToAction.link}
125
- style={{
126
- cursor: 'pointer'
127
- }}
128
- _hover={{
129
- cursor: 'pointer'
130
- }}
131
- isExternal
132
- >
133
- {attachment.callToAction.title} <ExternalLinkIcon mx="2px"/>
134
- </Link>
135
- )
136
- }
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
+ )}
137
112
  </Box>
138
113
  </Box>
139
- )
140
- }
114
+ );
115
+ };
package/tsconfig.json CHANGED
@@ -1,26 +1,14 @@
1
1
  {
2
2
  "extends": "../../../tsconfig.json",
3
3
  "compilerOptions": {
4
- "allowSyntheticDefaultImports": true,
5
- "experimentalDecorators": true,
6
- "esModuleInterop": true,
7
- "skipLibCheck": true,
8
4
  "rootDir": "./src",
9
5
  "outDir": "lib",
10
6
  "declarationDir": "lib",
11
7
  "declaration": true,
12
- "declarationMap": true
8
+ "declarationMap": true,
9
+ "skipLibCheck": true,
10
+ "types": ["@types/node", "@types/jest","../../../typings"]
13
11
  },
14
- "exclude": [
15
- "../../../node_modules",
16
- "node_modules",
17
- "lib",
18
- "dist",
19
- "webpack.config.js",
20
- "rollup.config.mjs"
21
- ],
22
- "include": [
23
- "src",
24
- "./typings/*.d.ts"
25
- ]
26
- }
12
+ "exclude": ["../../../node_modules", "node_modules", "lib", "dist", "webpack.config.js", "rollup.config.mjs"],
13
+ "include": ["src", "./typings/*.d.ts", "type.d.ts"]
14
+ }