@messenger-box/property-ext-browser 6.5.1-alpha.0 → 7.0.11-alpha.1
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 +6 -2
- package/lib/components/InboxMessage/MessageWidgets/MessageAlert.js +45 -15
- package/lib/components/InboxMessage/MessageWidgets/MessageAlert.js.map +1 -1
- package/lib/components/InboxMessage/MessageWidgets/MessageCard.js +91 -43
- package/lib/components/InboxMessage/MessageWidgets/MessageCard.js.map +1 -1
- package/lib/module.js +7 -10
- package/lib/module.js.map +1 -1
- package/lib/routes.json +1 -0
- package/lib/slot-fill/message-alert-fill.js +10 -6
- package/lib/slot-fill/message-alert-fill.js.map +1 -1
- package/lib/slot-fill/message-card-fill.js +10 -6
- package/lib/slot-fill/message-card-fill.js.map +1 -1
- package/package.json +5 -5
- package/rollup.config.mjs +13 -17
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,12 @@
|
|
|
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
|
-
##
|
|
6
|
+
## [7.0.11-alpha.1](https://github.com/cdmbase/messenger-box/compare/v7.0.11-alpha.0...v7.0.11-alpha.1) (2024-06-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @messenger-box/property-ext-browser
|
|
9
|
+
|
|
10
|
+
## 7.0.11-alpha.0 (2024-06-25)
|
|
7
11
|
|
|
8
12
|
### Features
|
|
9
13
|
|
|
10
|
-
- add proeprty ext module with fills based on property types ([9728317](https://github.com/
|
|
14
|
+
- add proeprty ext module with fills based on property types ([9728317](https://github.com/cdmbase/messenger-box/commit/97283176059dca7e4bd78ad4de7bc26ae0492387))
|
|
@@ -1,16 +1,46 @@
|
|
|
1
|
-
import React from'react';import*as Icons from'@chakra-ui/icons';import parse from'html-react-parser';import {useColorModeValue,Stack,Text,Link}from'@chakra-ui/react';const MessageAlert =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import React from'react';import*as Icons from'@chakra-ui/icons';import parse from'html-react-parser';import {useColorModeValue,Stack,Text,Link}from'@chakra-ui/react';const MessageAlert = props => {
|
|
2
|
+
const {
|
|
3
|
+
message,
|
|
4
|
+
index,
|
|
5
|
+
onMessageClick
|
|
6
|
+
} = props;
|
|
7
|
+
const {
|
|
8
|
+
attachment
|
|
9
|
+
} = message.propsConfiguration.contents;
|
|
10
|
+
const Icon = Icons[attachment.icon];
|
|
11
|
+
const color = useColorModeValue('white', 'gray.800');
|
|
12
|
+
const bgColor = useColorModeValue('gray.800', 'white');
|
|
13
|
+
return React.createElement(Stack, {
|
|
14
|
+
key: `${index}`,
|
|
15
|
+
mt: "4",
|
|
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',
|
|
24
|
+
onClick: () => onMessageClick(message)
|
|
25
|
+
}, React.createElement(Icon, {
|
|
26
|
+
w: 6,
|
|
27
|
+
h: 6,
|
|
28
|
+
color: color
|
|
29
|
+
}), React.createElement(Text, {
|
|
30
|
+
fontSize: "14px",
|
|
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
|
+
},
|
|
41
|
+
href: attachment.callToAction.link,
|
|
42
|
+
isExternal: true
|
|
43
|
+
}, attachment.callToAction.title, " ", React.createElement(Icons.ExternalLinkIcon, {
|
|
44
|
+
mx: "2px"
|
|
45
|
+
})));
|
|
16
46
|
};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":"sKAaa,MAAA,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"MessageAlert.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageAlert.tsx"],"sourcesContent":[null],"names":[],"mappings":"sKAaa,MAAA,YAAY,GAAG,KAAC,IAAsC;QACzD;IACN,OAAM;IAGN,KAAM;IACN,cAAc;MACR,KAAA,CAAA;QAEC;AAcC,IAAA,UAAA;AACA,GAAA,GAAA,OAAA,CAAA,kBAAK,CAAC,QAAA,CAAA;AAGL,EAAA,MAAA,IAAA,GAAA,KAAuB,CAAA,UAAA,CAAA,IACpB,CAAA,CAAA;AAIQ,EAAA,MAAA,KAAA,GAAA,iBAA2B,CAAA,OAAA,EAAA,UAAA,CAAA,CAAA;eAE/B,GAAA,4BAA8B,EAAA,OACpB,CAAA,CAAA;cAEC,CAAA,aAAa,CAAA,KAAA,EAAC;;AAAO,IAAA,EAAA,EAAA,GAAA;AAKpD,IAAE,EAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,44 +1,92 @@
|
|
|
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 =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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 => {
|
|
2
|
+
const {
|
|
3
|
+
message,
|
|
4
|
+
index
|
|
5
|
+
} = props;
|
|
6
|
+
const color = useColorModeValue('gray.800', 'white');
|
|
7
|
+
const {
|
|
8
|
+
attachment
|
|
9
|
+
} = message.propsConfiguration?.contents;
|
|
10
|
+
const {
|
|
11
|
+
property
|
|
12
|
+
} = attachment;
|
|
13
|
+
return React.createElement(Box, {
|
|
14
|
+
_hover: {
|
|
15
|
+
cursor: 'pointer'
|
|
16
|
+
},
|
|
17
|
+
margin: 5,
|
|
18
|
+
maxW: "xs",
|
|
19
|
+
borderWidth: "1px",
|
|
20
|
+
borderRadius: "lg",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
key: `${index}`
|
|
23
|
+
}, React.createElement(Image, {
|
|
24
|
+
width: "100%",
|
|
25
|
+
src: attachment.image,
|
|
26
|
+
alt: attachment.title
|
|
27
|
+
}), React.createElement(Box, {
|
|
28
|
+
marginTop: 4,
|
|
29
|
+
margin: 2,
|
|
30
|
+
m: "3"
|
|
31
|
+
}, React.createElement(Box, {
|
|
32
|
+
mt: "3",
|
|
33
|
+
lineHeight: "tight",
|
|
34
|
+
noOfLines: 1
|
|
35
|
+
}, React.createElement(Heading, {
|
|
36
|
+
color: color,
|
|
37
|
+
fontSize: "14px",
|
|
38
|
+
fontWeight: "semibold",
|
|
39
|
+
as: "h3"
|
|
40
|
+
}, attachment.isTitleHtml ? parse(attachment.title) : attachment.title)), property && React.createElement(Box, {
|
|
41
|
+
mt: "3",
|
|
42
|
+
display: "flex"
|
|
43
|
+
}, property?.type && React.createElement(Box, null, React.createElement(Badge, {
|
|
44
|
+
borderRadius: "full",
|
|
45
|
+
px: "2",
|
|
46
|
+
colorScheme: "teal"
|
|
47
|
+
}, startCase(property.type))), React.createElement(Spacer, null), property?.maxPeople && React.createElement(Box, {
|
|
48
|
+
color: "gray.500",
|
|
49
|
+
fontWeight: "semibold",
|
|
50
|
+
letterSpacing: "wide",
|
|
51
|
+
fontSize: "xs",
|
|
52
|
+
textTransform: "uppercase",
|
|
53
|
+
ml: "2"
|
|
54
|
+
}, property.maxPeople, " Max People")), React.createElement(Box, {
|
|
55
|
+
display: "flex",
|
|
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, {
|
|
78
|
+
key: i,
|
|
79
|
+
color: i < property.totalStar ? 'teal.500' : 'gray.300'
|
|
80
|
+
})))), attachment.callToAction && React.createElement(Link, {
|
|
81
|
+
href: attachment.callToAction.link,
|
|
82
|
+
style: {
|
|
83
|
+
cursor: 'pointer'
|
|
84
|
+
},
|
|
85
|
+
_hover: {
|
|
86
|
+
cursor: 'pointer'
|
|
87
|
+
},
|
|
88
|
+
isExternal: true
|
|
89
|
+
}, attachment.callToAction.title, " ", React.createElement(ExternalLinkIcon, {
|
|
90
|
+
mx: "2px"
|
|
91
|
+
}))));
|
|
44
92
|
};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":"mPAaa,MAAA,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"MessageCard.js","sources":["../../../../src/components/InboxMessage/MessageWidgets/MessageCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"mPAaa,MAAA,WAAW,GAAG,KAAC,IAA6B;AACrD,EAAA,MAAA;IACA,OAAM;IACN,KAAM;AAIN,GAAA,GAAA,KAAQ,CAAA;AACR,EAAA,MAAA,KACI,GAAA,iBAAI,CAAA,YACQ,OAAA,CAAA,CAAA;AACJ,EAAA,MAAA;cAEJ;AAOA,GAAA,GAAA,OAAA,CAAA,oBAAO,QAAK,CAAC;AACb,EAAA,MAAA;AACI,IAAA,QAAA;AACI,GAAA,GAAA,UAAA,CAAA;cAIK,CAAA,aACL,CAAA,GAAA,EAAA;AACK,IAAA,MAAA,EAAA;uBAEQ;AAKT,KAAA;AACC,IAAA,MAAA,EAAA,CAAA;AASQ,IAAA,IAAA,EAAA,IAAA;AACC,IAAA,WAAA,EAAA,KAAA;gBAIjB,EAAA,IAAA;YAOA,EAAQ,QAAA;iBAEQ,CAAA,CAAA;AAEA,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAc,EAAA;AACf,IAAA,KAAA,EAAA,MAAA;;AACa,IAAA,GAAA,EAAA,UAAA,CAAA,KAAA;AAIrB,GAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA;gBACA;;AAGa,IAAA,CAAA,EAAA,GAAA;;AAGR,IAAA,EAAA,EAAA,GAAA;;;AAGQ,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,OAAG,EAAE;AAMzB,IAAA,KAAA,EAAA,KAAA;AAIW,IAAA,QAAA,EAAA,MAAA;AACH,IAAA,UAAA,EAAA,UACO;AACJ,IAAA,EAAA,EAAA,IAAA;AACH,GAAA,EAAA,UAAA,CAAA,WACS,GAAA,KAAA,CAAA,UAAA,CAAA,KAAA,CAAA,GAAA,UAAA,CAAA,KAAA,CAAA,CAAA,EAAA,QAAA,IAAA,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA;;;mBAEuB,IAAA,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,IAAgB,EAAC,KAAG,CAAA,aAKxE,CAAC,KAAA,EAAA;AACN,IAAE,YAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/module.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {Feature}from'@common-stack/client-react';import {IPostTypeEnum}from'@messenger-box/property-ext-core';import {MessageAlertFill}from'./slot-fill/message-alert-fill.js';import {MessageCardFill}from'./slot-fill/message-card-fill.js';const feature = new Feature({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
render: MessageCardFill,
|
|
10
|
-
},
|
|
11
|
-
],
|
|
2
|
+
componentFillPlugins: [{
|
|
3
|
+
name: IPostTypeEnum.Alert.toLowerCase(),
|
|
4
|
+
render: MessageAlertFill
|
|
5
|
+
}, {
|
|
6
|
+
name: IPostTypeEnum.Card.toLowerCase(),
|
|
7
|
+
render: MessageCardFill
|
|
8
|
+
}]
|
|
12
9
|
});export{feature};//# sourceMappingURL=module.js.map
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"8OAIa,MAAA,OAAO,GAAG,IAAI,OAAO,CAAC;AAC/B,
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.ts"],"sourcesContent":[null],"names":[],"mappings":"8OAIa,MAAA,OAAO,GAAG,IAAI,OAAO,CAAC;AAC/B,EAAA,oBAAA,EAAoB,CAAE;AAClB,IAAA,IAAA,EAAA,aAAA,CAAA,KAAA,CAAA,WAAA,EAAA;AACI,IAAA,MAAA,EAAA,gBAAmB;AACnB,GAAA,EAAA;AACH,IAAA,IAAA,EAAA,aAAA,CAAA,IAAA,CAAA,WAAA,EAAA;AACD,IAAA,MAAA,EAAA,eAAA;AACI,GAAA,CAAA;AACA,CAAA"}
|
package/lib/routes.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -1,8 +1,12 @@
|
|
|
1
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
return React.createElement(Fill, {
|
|
3
|
+
name: IPostTypeEnum.Alert.toLowerCase()
|
|
4
|
+
}, props => {
|
|
5
|
+
if (props.active) {
|
|
6
|
+
return React.createElement(MessageAlert, {
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
});
|
|
8
12
|
};export{MessageAlertFill};//# sourceMappingURL=message-alert-fill.js.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAAA,OAAA,KACK,CAAA,aAAA,CAAA,IAAA,EAAA;QAGW,EAAI,aAAM,CAAM,KAAE,CAAA,WAAA,EAAA;AACd,GAAA,EAAA,KAAA,IAAA;AACH,IAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,YAAA,EAAA;QAI3B,GAAA,KAAA;AACL,OAAC,CAAA,CAAA;;;;"}
|
|
@@ -1,8 +1,12 @@
|
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
return React.createElement(Fill, {
|
|
3
|
+
name: IPostTypeEnum.Card.toLowerCase()
|
|
4
|
+
}, props => {
|
|
5
|
+
if (props.active) {
|
|
6
|
+
return React.createElement(MessageCard, {
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
});
|
|
8
12
|
};export{MessageCardFill};//# sourceMappingURL=message-card-fill.js.map
|
|
@@ -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,
|
|
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,EAAA,OAAA,KACK,CAAA,aAAA,CAAA,IAAA,EAAA;QAGW,EAAI,aAAM,CAAM,IAAE,CAAA,WAAA,EAAA;AACd,GAAA,EAAA,KAAA,IAAA;AACH,IAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,WAAA,EAAA;QAI3B,GAAA,KAAA;AACL,OAAC,CAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/property-ext-browser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.11-alpha.1",
|
|
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": "
|
|
27
|
-
"@messenger-box/core": "
|
|
28
|
-
"@messenger-box/property-ext-core": "
|
|
26
|
+
"@messenger-box/chakra-ui-inbox": "7.0.11-alpha.1",
|
|
27
|
+
"@messenger-box/core": "7.0.11-alpha.0",
|
|
28
|
+
"@messenger-box/property-ext-core": "7.0.11-alpha.0",
|
|
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": "
|
|
61
|
+
"gitHead": "e5257797b74cb5a99aa69733636849a9587f0728"
|
|
62
62
|
}
|
package/rollup.config.mjs
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import graphql from '@rollup/plugin-graphql';
|
|
3
|
-
import image from '@rollup/plugin-image';
|
|
4
|
-
import typescript from '@rollup/plugin-typescript';
|
|
5
|
-
|
|
6
|
-
const isDev = process.env.NODE_ENV === 'development';
|
|
7
|
-
const bundle = (config) => ({
|
|
8
|
-
...config,
|
|
9
|
-
input: 'src/index.ts',
|
|
10
|
-
// marking all node modules as external
|
|
11
|
-
external: (id) => !/^[./]/.test(id),
|
|
12
|
-
});
|
|
13
|
-
const globals = { react: 'React' };
|
|
1
|
+
import { createRollupConfig } from '../../../rollup.config.base.mjs';
|
|
14
2
|
|
|
3
|
+
const additionalPlugins = [];
|
|
4
|
+
// Use the createRollupConfig function to merge the base and specific configurations
|
|
15
5
|
export default [
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
createRollupConfig({
|
|
7
|
+
input: [
|
|
8
|
+
'src/index.ts',
|
|
9
|
+
],
|
|
10
|
+
plugins: [
|
|
11
|
+
// Spread in additional plugins specific to this config
|
|
12
|
+
...additionalPlugins,
|
|
13
|
+
],
|
|
18
14
|
output: [
|
|
19
15
|
{
|
|
20
16
|
dir: 'lib',
|
|
21
17
|
format: 'es',
|
|
22
|
-
name: '
|
|
18
|
+
name: 'property-ext-browser',
|
|
23
19
|
compact: true,
|
|
24
20
|
exports: 'named',
|
|
25
21
|
sourcemap: true,
|
|
26
22
|
preserveModules: true,
|
|
27
23
|
chunkFileNames: '[name]-[hash].[format].js',
|
|
28
|
-
globals,
|
|
24
|
+
globals: { react: 'React' },
|
|
29
25
|
},
|
|
30
26
|
],
|
|
31
27
|
}),
|