@elliemae/ds-chat-card 3.16.0-next.2 → 3.16.0-next.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 +4 -4
- package/dist/cjs/ChatCard.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +5 -5
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/ChatCard.js +1 -1
- package/dist/esm/ChatCard.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +1 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/types/ChatCard.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +4 -4
- package/package.json +7 -6
package/dist/cjs/ChatCard.js
CHANGED
|
@@ -30,15 +30,15 @@ __export(ChatCard_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(ChatCard_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
-
var
|
|
33
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
34
34
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
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
38
|
var import_DSChatCardDefinitions = require("./DSChatCardDefinitions");
|
|
39
39
|
const ChatCard = (props) => {
|
|
40
|
-
const propsWithDefault = (0,
|
|
41
|
-
(0,
|
|
40
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
41
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propTypes, import_DSChatCardDefinitions.DSChatCardName);
|
|
42
42
|
const { title, content, time, rightAddon } = props;
|
|
43
43
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Wrapper, { cols: ["1fr", "auto"], "data-testid": import_ChatCardDataTestIds.ChatCardDataTestIds.CARD_WRAPPER, children: [
|
|
44
44
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.MainContent, { children: [
|
|
@@ -51,6 +51,6 @@ const ChatCard = (props) => {
|
|
|
51
51
|
};
|
|
52
52
|
ChatCard.propTypes = import_react_desc_prop_types.propTypes;
|
|
53
53
|
ChatCard.displayName = import_DSChatCardDefinitions.DSChatCardName;
|
|
54
|
-
const ChatCardWithSchema = (0,
|
|
54
|
+
const ChatCardWithSchema = (0, import_ds_props_helpers.describe)(ChatCard);
|
|
55
55
|
ChatCardWithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
56
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-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAfN,
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\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);\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,8BAAuF;AACvF,uCAA2C;AAE3C,mCAAwC;AACxC,oBAAuE;AACvE,iCAAoC;AACpC,mCAA+B;AAE/B,MAAM,WAAmD,CAAC,UAAU;AAClE,QAAM,uBAAmB,sDAA6B,OAAO,yCAAY;AACzE,8DAA+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,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,15 +29,15 @@ __export(react_desc_prop_types_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
|
-
var
|
|
32
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
33
33
|
const defaultProps = {
|
|
34
34
|
content: "",
|
|
35
35
|
time: ""
|
|
36
36
|
};
|
|
37
37
|
const propTypes = {
|
|
38
|
-
title:
|
|
39
|
-
content:
|
|
40
|
-
time:
|
|
41
|
-
rightAddon:
|
|
38
|
+
title: import_ds_props_helpers.PropTypes.string.isRequired.description(`Card's title`),
|
|
39
|
+
content: import_ds_props_helpers.PropTypes.string.description(`Card's content`),
|
|
40
|
+
time: import_ds_props_helpers.PropTypes.string.description("Time"),
|
|
41
|
+
rightAddon: import_ds_props_helpers.PropTypes.element.description("Right addon, badge or icon")
|
|
42
42
|
};
|
|
43
43
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatCardT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n content: string;\n time: string;\n }\n\n export interface OptionalProps {\n rightAddon?: JSX.Element;\n }\n\n export interface Props extends DefaultProps, RequiredProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatCardT.DefaultProps = {\n content: '',\n time: '',\n};\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAmBnB,MAAM,eAAyC;AAAA,EACpD,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,YAAY;AAAA,EACvB,OAAO,kCAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,SAAS,kCAAU,OAAO,YAAY,gBAAgB;AAAA,EACtD,MAAM,kCAAU,OAAO,YAAY,MAAM;AAAA,EACzC,YAAY,kCAAU,QAAQ,YAAY,4BAA4B;AACxE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/ChatCard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-
|
|
3
|
+
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
4
4
|
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";
|
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-
|
|
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-props-helpers';\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);\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
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,YAAY;AACzE,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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatCardT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n content: string;\n time: string;\n }\n\n export interface OptionalProps {\n rightAddon?: JSX.Element;\n }\n\n export interface Props extends DefaultProps, RequiredProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatCardT.DefaultProps = {\n content: '',\n time: '',\n};\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAmBnB,MAAM,eAAyC;AAAA,EACpD,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,YAAY;AAAA,EACvB,OAAO,UAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,SAAS,UAAU,OAAO,YAAY,gBAAgB;AAAA,EACtD,MAAM,UAAU,OAAO,YAAY,MAAM;AAAA,EACzC,YAAY,UAAU,QAAQ,YAAY,4BAA4B;AACxE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/ChatCard.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DSChatCardT } from './react-desc-prop-types';
|
|
3
3
|
declare const ChatCard: React.ComponentType<DSChatCardT.Props>;
|
|
4
|
-
declare const ChatCardWithSchema: import("@elliemae/ds-
|
|
4
|
+
declare const ChatCardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSChatCardT.Props>;
|
|
5
5
|
export { ChatCard, ChatCardWithSchema };
|
|
@@ -14,8 +14,8 @@ export declare namespace DSChatCardT {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const defaultProps: DSChatCardT.DefaultProps;
|
|
16
16
|
export declare const propTypes: {
|
|
17
|
-
title: import("@elliemae/ds-
|
|
18
|
-
content: import("@elliemae/ds-
|
|
19
|
-
time: import("@elliemae/ds-
|
|
20
|
-
rightAddon: import("@elliemae/ds-
|
|
17
|
+
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
|
+
content: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
19
|
+
time: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
+
rightAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-card",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Card",
|
|
6
6
|
"files": [
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"typeSafety": false
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-grid": "3.16.0-next.
|
|
51
|
-
"@elliemae/ds-
|
|
52
|
-
"@elliemae/ds-
|
|
53
|
-
"@elliemae/ds-
|
|
50
|
+
"@elliemae/ds-grid": "3.16.0-next.3",
|
|
51
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.3",
|
|
52
|
+
"@elliemae/ds-system": "3.16.0-next.3",
|
|
53
|
+
"@elliemae/ds-truncated-tooltip-text": "3.16.0-next.3",
|
|
54
|
+
"@elliemae/ds-utilities": "3.16.0-next.3"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"styled-components": "~5.3.6"
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"dts": "node ../../scripts/dts.mjs",
|
|
69
70
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
70
71
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
71
|
-
"dev:build": "pnpm --filter {.}... build
|
|
72
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
72
73
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
73
74
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
74
75
|
}
|