@elliemae/ds-chat-card 3.12.0-rc.2 → 3.12.0-rc.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/dist/cjs/ChatCard.js +12 -31
- package/dist/cjs/ChatCard.js.map +2 -2
- package/dist/cjs/DSChatCardDefinitions.js +32 -0
- package/dist/cjs/DSChatCardDefinitions.js.map +7 -0
- package/dist/esm/ChatCard.js +12 -31
- package/dist/esm/ChatCard.js.map +2 -2
- package/dist/esm/DSChatCardDefinitions.js +6 -0
- package/dist/esm/DSChatCardDefinitions.js.map +7 -0
- package/package.json +5 -5
package/dist/cjs/ChatCard.js
CHANGED
|
@@ -35,41 +35,22 @@ var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-t
|
|
|
35
35
|
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
36
36
|
var import_styled = require("./styled");
|
|
37
37
|
var import_ChatCardDataTestIds = require("./ChatCardDataTestIds");
|
|
38
|
+
var import_DSChatCardDefinitions = require("./DSChatCardDefinitions");
|
|
38
39
|
const ChatCard = (props) => {
|
|
39
|
-
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
40
|
-
(0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propTypes);
|
|
40
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps, import_DSChatCardDefinitions.DSChatCardName);
|
|
41
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propTypes, import_DSChatCardDefinitions.DSChatCardName);
|
|
41
42
|
const { title, content, time, rightAddon } = props;
|
|
42
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Wrapper, {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
children: title
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Content, {
|
|
53
|
-
"data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_CONTENT,
|
|
54
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
|
|
55
|
-
value: content
|
|
56
|
-
})
|
|
57
|
-
}),
|
|
58
|
-
time && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Time, {
|
|
59
|
-
"data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_TIME,
|
|
60
|
-
children: time
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}),
|
|
64
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.RightAddon, {
|
|
65
|
-
"data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_RIGHT_ADDON,
|
|
66
|
-
children: rightAddon
|
|
67
|
-
})
|
|
68
|
-
]
|
|
69
|
-
});
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Wrapper, { cols: ["1fr", "auto"], "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_WRAPPER, children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.MainContent, { children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Title, { "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_TITLE, children: title }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Content, { "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_CONTENT, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: content }) }),
|
|
47
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Time, { "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_TIME, children: time })
|
|
48
|
+
] }),
|
|
49
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.RightAddon, { "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_RIGHT_ADDON, children: rightAddon })
|
|
50
|
+
] });
|
|
70
51
|
};
|
|
71
52
|
ChatCard.propTypes = import_react_desc_prop_types.propTypes;
|
|
72
|
-
ChatCard.displayName =
|
|
53
|
+
ChatCard.displayName = import_DSChatCardDefinitions.DSChatCardName;
|
|
73
54
|
const ChatCardWithSchema = (0, import_ds_utilities.describe)(ChatCard);
|
|
74
55
|
ChatCardWithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
75
56
|
//# sourceMappingURL=ChatCard.js.map
|
package/dist/cjs/ChatCard.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ChatCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAfN,0BAAuF;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSChatCardT } from './react-desc-prop-types';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\nimport { ChatCardDataTestIds } from './ChatCardDataTestIds';\nimport { DSChatCardName } from './DSChatCardDefinitions';\n\nconst ChatCard: React.ComponentType<DSChatCardT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps, DSChatCardName);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes, DSChatCardName);\n\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid={ChatCardDataTestIds.CARD_WRAPPER}>\n <MainContent>\n <Title data-testid={ChatCardDataTestIds.CARD_TITLE}>{title}</Title>\n <Content data-testid={ChatCardDataTestIds.CARD_CONTENT}>\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid={ChatCardDataTestIds.CARD_TIME}>{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid={ChatCardDataTestIds.CARD_RIGHT_ADDON}>{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes as WeakValidationMap<unknown>;\nChatCard.displayName = DSChatCardName;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { ChatCard, ChatCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAfN,0BAAuF;AACvF,uCAA2C;AAE3C,mCAAwC;AACxC,oBAAuE;AACvE,iCAAoC;AACpC,mCAA+B;AAE/B,MAAM,WAAmD,CAAC,UAAU;AAClE,QAAM,uBAAmB,kDAA6B,OAAO,2CAAc,2CAAc;AACzF,0DAA+B,kBAAkB,wCAAW,2CAAc;AAE1E,QAAM,EAAE,OAAO,SAAS,MAAM,WAAW,IAAI;AAC7C,SACE,6CAAC,yBAAQ,MAAM,CAAC,OAAO,MAAM,GAAG,eAAa,+CAAoB,cAC/D;AAAA,iDAAC,6BACC;AAAA,kDAAC,uBAAM,eAAa,+CAAoB,YAAa,iBAAM;AAAA,MAC3D,4CAAC,yBAAQ,eAAa,+CAAoB,cACxC,sDAAC,+DAA2B,OAAO,SAAS,GAC9C;AAAA,MACC,QAAQ,4CAAC,sBAAK,eAAa,+CAAoB,WAAY,gBAAK;AAAA,OACnE;AAAA,IACC,cAAc,4CAAC,4BAAW,eAAa,+CAAoB,kBAAmB,sBAAW;AAAA,KAC5F;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,8BAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var DSChatCardDefinitions_exports = {};
|
|
26
|
+
__export(DSChatCardDefinitions_exports, {
|
|
27
|
+
DSChatCardName: () => DSChatCardName
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(DSChatCardDefinitions_exports);
|
|
30
|
+
var React = __toESM(require("react"));
|
|
31
|
+
const DSChatCardName = "DSChatCard";
|
|
32
|
+
//# sourceMappingURL=DSChatCardDefinitions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSChatCardDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSChatCardName = 'DSChatCard';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/ChatCard.js
CHANGED
|
@@ -5,41 +5,22 @@ import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text"
|
|
|
5
5
|
import { propTypes, defaultProps } from "./react-desc-prop-types";
|
|
6
6
|
import { Wrapper, MainContent, Title, Content, Time, RightAddon } from "./styled";
|
|
7
7
|
import { ChatCardDataTestIds } from "./ChatCardDataTestIds";
|
|
8
|
+
import { DSChatCardName } from "./DSChatCardDefinitions";
|
|
8
9
|
const ChatCard = (props) => {
|
|
9
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
10
|
-
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
10
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps, DSChatCardName);
|
|
11
|
+
useValidateTypescriptPropTypes(propsWithDefault, propTypes, DSChatCardName);
|
|
11
12
|
const { title, content, time, rightAddon } = props;
|
|
12
|
-
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children: title
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ jsx(Content, {
|
|
23
|
-
"data-testid": ChatCardDataTestIds.CARD_CONTENT,
|
|
24
|
-
children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, {
|
|
25
|
-
value: content
|
|
26
|
-
})
|
|
27
|
-
}),
|
|
28
|
-
time && /* @__PURE__ */ jsx(Time, {
|
|
29
|
-
"data-testid": ChatCardDataTestIds.CARD_TIME,
|
|
30
|
-
children: time
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
}),
|
|
34
|
-
rightAddon && /* @__PURE__ */ jsx(RightAddon, {
|
|
35
|
-
"data-testid": ChatCardDataTestIds.CARD_RIGHT_ADDON,
|
|
36
|
-
children: rightAddon
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
});
|
|
13
|
+
return /* @__PURE__ */ jsxs(Wrapper, { cols: ["1fr", "auto"], "data-testid": ChatCardDataTestIds.CARD_WRAPPER, children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(MainContent, { children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Title, { "data-testid": ChatCardDataTestIds.CARD_TITLE, children: title }),
|
|
16
|
+
/* @__PURE__ */ jsx(Content, { "data-testid": ChatCardDataTestIds.CARD_CONTENT, children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: content }) }),
|
|
17
|
+
time && /* @__PURE__ */ jsx(Time, { "data-testid": ChatCardDataTestIds.CARD_TIME, children: time })
|
|
18
|
+
] }),
|
|
19
|
+
rightAddon && /* @__PURE__ */ jsx(RightAddon, { "data-testid": ChatCardDataTestIds.CARD_RIGHT_ADDON, children: rightAddon })
|
|
20
|
+
] });
|
|
40
21
|
};
|
|
41
22
|
ChatCard.propTypes = propTypes;
|
|
42
|
-
ChatCard.displayName =
|
|
23
|
+
ChatCard.displayName = DSChatCardName;
|
|
43
24
|
const ChatCardWithSchema = describe(ChatCard);
|
|
44
25
|
ChatCardWithSchema.propTypes = propTypes;
|
|
45
26
|
export {
|
package/dist/esm/ChatCard.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ChatCard.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiBjB,SACE,KADF;AAfN,SAAS,UAAU,gCAAgC,oCAAoC;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSChatCardT } from './react-desc-prop-types';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\nimport { ChatCardDataTestIds } from './ChatCardDataTestIds';\nimport { DSChatCardName } from './DSChatCardDefinitions';\n\nconst ChatCard: React.ComponentType<DSChatCardT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps, DSChatCardName);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes, DSChatCardName);\n\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid={ChatCardDataTestIds.CARD_WRAPPER}>\n <MainContent>\n <Title data-testid={ChatCardDataTestIds.CARD_TITLE}>{title}</Title>\n <Content data-testid={ChatCardDataTestIds.CARD_CONTENT}>\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid={ChatCardDataTestIds.CARD_TIME}>{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid={ChatCardDataTestIds.CARD_RIGHT_ADDON}>{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes as WeakValidationMap<unknown>;\nChatCard.displayName = DSChatCardName;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { ChatCard, ChatCardWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiBjB,SACE,KADF;AAfN,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,kCAAkC;AAE3C,SAAS,WAAW,oBAAoB;AACxC,SAAS,SAAS,aAAa,OAAO,SAAS,MAAM,kBAAkB;AACvE,SAAS,2BAA2B;AACpC,SAAS,sBAAsB;AAE/B,MAAM,WAAmD,CAAC,UAAU;AAClE,QAAM,mBAAmB,6BAA6B,OAAO,cAAc,cAAc;AACzF,iCAA+B,kBAAkB,WAAW,cAAc;AAE1E,QAAM,EAAE,OAAO,SAAS,MAAM,WAAW,IAAI;AAC7C,SACE,qBAAC,WAAQ,MAAM,CAAC,OAAO,MAAM,GAAG,eAAa,oBAAoB,cAC/D;AAAA,yBAAC,eACC;AAAA,0BAAC,SAAM,eAAa,oBAAoB,YAAa,iBAAM;AAAA,MAC3D,oBAAC,WAAQ,eAAa,oBAAoB,cACxC,8BAAC,8BAA2B,OAAO,SAAS,GAC9C;AAAA,MACC,QAAQ,oBAAC,QAAK,eAAa,oBAAoB,WAAY,gBAAK;AAAA,OACnE;AAAA,IACC,cAAc,oBAAC,cAAW,eAAa,oBAAoB,kBAAmB,sBAAW;AAAA,KAC5F;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSChatCardDefinitions.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSChatCardName = 'DSChatCard';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,iBAAiB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-card",
|
|
3
|
-
"version": "3.12.0-rc.
|
|
3
|
+
"version": "3.12.0-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Card",
|
|
6
6
|
"files": [
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"typeSafety": false
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-grid": "3.12.0-rc.
|
|
51
|
-
"@elliemae/ds-system": "3.12.0-rc.
|
|
52
|
-
"@elliemae/ds-truncated-tooltip-text": "3.12.0-rc.
|
|
53
|
-
"@elliemae/ds-utilities": "3.12.0-rc.
|
|
50
|
+
"@elliemae/ds-grid": "3.12.0-rc.3",
|
|
51
|
+
"@elliemae/ds-system": "3.12.0-rc.3",
|
|
52
|
+
"@elliemae/ds-truncated-tooltip-text": "3.12.0-rc.3",
|
|
53
|
+
"@elliemae/ds-utilities": "3.12.0-rc.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"styled-components": "~5.3.6"
|