@elliemae/ds-chat-system-message 3.6.0-next.0

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.
@@ -0,0 +1,36 @@
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 ChatSystemMessageDataTestIds_exports = {};
26
+ __export(ChatSystemMessageDataTestIds_exports, {
27
+ ChatSystemMessageDataTestIds: () => ChatSystemMessageDataTestIds
28
+ });
29
+ module.exports = __toCommonJS(ChatSystemMessageDataTestIds_exports);
30
+ var React = __toESM(require("react"));
31
+ const ChatSystemMessageDataTestIds = {
32
+ SYSTEM_MSG_TITLE: "chat-system-message-title",
33
+ SYSTEM_MSG_BODY: "chat-system-message-body",
34
+ SYSTEM_MSG_TIME: "chat-system-message-time"
35
+ };
36
+ //# sourceMappingURL=ChatSystemMessageDataTestIds.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/ChatSystemMessageDataTestIds.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const ChatSystemMessageDataTestIds = {\n SYSTEM_MSG_TITLE: 'chat-system-message-title',\n SYSTEM_MSG_BODY: 'chat-system-message-body',\n SYSTEM_MSG_TIME: 'chat-system-message-time',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,+BAA+B;AAAA,EAC1C,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,69 @@
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 SystemMessage_exports = {};
26
+ __export(SystemMessage_exports, {
27
+ SystemMessage: () => SystemMessage,
28
+ SystemMessageWithSchema: () => SystemMessageWithSchema
29
+ });
30
+ module.exports = __toCommonJS(SystemMessage_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_ds_utilities = require("@elliemae/ds-utilities");
34
+ var import_style = require("./style");
35
+ var import_react_desc_prop_types = require("./react-desc-prop-types");
36
+ var import_ChatSystemMessageDataTestIds = require("./ChatSystemMessageDataTestIds");
37
+ const SystemMessage = (props) => {
38
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
39
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.systemMessageProps);
40
+ const { title, time, body } = propsWithDefault;
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.Wrapper, {
42
+ rows: ["auto", "auto"],
43
+ children: [
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.Header, {
45
+ cols: ["1fr", "auto", "1fr"],
46
+ children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {}),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Title, {
49
+ "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE,
50
+ children: title
51
+ }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Time, {
53
+ "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME,
54
+ children: time
55
+ })
56
+ ]
57
+ }),
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Message, {
59
+ "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY,
60
+ children: body
61
+ })
62
+ ]
63
+ });
64
+ };
65
+ SystemMessage.propTypes = import_react_desc_prop_types.systemMessageProps;
66
+ SystemMessage.displayName = "SystemMessage";
67
+ const SystemMessageWithSchema = (0, import_ds_utilities.describe)(SystemMessage);
68
+ SystemMessageWithSchema.propTypes = import_react_desc_prop_types.systemMessageProps;
69
+ //# sourceMappingURL=SystemMessage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/SystemMessage.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { Wrapper, Header, Title, Time, Message } from './style';\nimport { DSChatSystemMessageT, systemMessageProps, defaultProps } from './react-desc-prop-types';\nimport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds';\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps);\n\n const { title, time, body } = propsWithDefault;\n return (\n <Wrapper rows={['auto', 'auto']}>\n <Header cols={['1fr', 'auto', '1fr']}>\n <span />\n <Title data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE}>{title}</Title>\n <Time data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME}>{time}</Time>\n </Header>\n <Message data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY}>{body}</Message>\n </Wrapper>\n );\n};\n\nSystemMessage.propTypes = systemMessageProps as WeakValidationMap<unknown>;\nSystemMessage.displayName = 'SystemMessage';\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps as WeakValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,mBAAsD;AACtD,mCAAuE;AACvE,0CAA6C;AAC7C,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,uBAAmB,kDAA6B,OAAO,yCAAY;AACzE,0DAA+B,kBAAkB,+CAAkB;AAEnE,QAAM,EAAE,OAAO,MAAM,KAAK,IAAI;AAC9B,SACE,6CAAC;AAAA,IAAQ,MAAM,CAAC,QAAQ,MAAM;AAAA,IAC5B;AAAA,mDAAC;AAAA,QAAO,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,QACjC;AAAA,sDAAC,UAAK;AAAA,UACN,4CAAC;AAAA,YAAM,eAAa,iEAA6B;AAAA,YAAmB;AAAA,WAAM;AAAA,UAC1E,4CAAC;AAAA,YAAK,eAAa,iEAA6B;AAAA,YAAkB;AAAA,WAAK;AAAA;AAAA,OACzE;AAAA,MACA,4CAAC;AAAA,QAAQ,eAAa,iEAA6B;AAAA,QAAkB;AAAA,OAAK;AAAA;AAAA,GAC5E;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
+ var src_exports = {};
27
+ __export(src_exports, {
28
+ ChatSystemMessageDataTestIds: () => import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds,
29
+ DSChatSystemMessageT: () => import_react_desc_prop_types.DSChatSystemMessageT,
30
+ SystemMessage: () => import_SystemMessage.SystemMessage,
31
+ SystemMessageWithSchema: () => import_SystemMessage.SystemMessageWithSchema
32
+ });
33
+ module.exports = __toCommonJS(src_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_SystemMessage = require("./SystemMessage");
36
+ var import_ChatSystemMessageDataTestIds = require("./ChatSystemMessageDataTestIds");
37
+ __reExport(src_exports, require("./style"), module.exports);
38
+ var import_react_desc_prop_types = require("./react-desc-prop-types");
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { SystemMessage, SystemMessageWithSchema } from './SystemMessage';\nexport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds';\nexport * from './style';\nexport { DSChatSystemMessageT } from './react-desc-prop-types';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAuD;AACvD,0CAA6C;AAC7C,wBAAc,oBAFd;AAGA,mCAAqC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
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 react_desc_prop_types_exports = {};
26
+ __export(react_desc_prop_types_exports, {
27
+ defaultProps: () => defaultProps,
28
+ systemMessageProps: () => systemMessageProps
29
+ });
30
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_ds_utilities = require("@elliemae/ds-utilities");
33
+ const defaultProps = {
34
+ title: "System Message",
35
+ time: "",
36
+ body: ""
37
+ };
38
+ const systemMessageProps = {
39
+ title: import_ds_utilities.PropTypes.string.description("Message title").defaultValue("System Message"),
40
+ time: import_ds_utilities.PropTypes.string.description("data of the message, ie: hour"),
41
+ body: import_ds_utilities.PropTypes.string.isRequired.description("message")
42
+ };
43
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSChatSystemMessageT {\n export interface Props {\n title: string;\n body: string;\n time: string;\n }\n}\n\nexport const defaultProps: DSChatSystemMessageT.Props = {\n title: 'System Message',\n time: '',\n body: '',\n};\n\nexport const systemMessageProps = {\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n body: PropTypes.string.isRequired.description('message'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAUnB,MAAM,eAA2C;AAAA,EACtD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,qBAAqB;AAAA,EAChC,OAAO,8BAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,8BAAU,OAAO,YAAY,+BAA+B;AAAA,EAClE,MAAM,8BAAU,OAAO,WAAW,YAAY,SAAS;AACzD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,72 @@
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 style_exports = {};
26
+ __export(style_exports, {
27
+ Header: () => Header,
28
+ Message: () => Message,
29
+ Time: () => Time,
30
+ Title: () => Title,
31
+ Wrapper: () => Wrapper
32
+ });
33
+ module.exports = __toCommonJS(style_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_system = require("@elliemae/ds-system");
36
+ var import_ds_grid = require("@elliemae/ds-grid");
37
+ const Wrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
38
+ align-items: center;
39
+ justify-content: center;
40
+ max-width: 100%;
41
+ padding: 0 8px 8px;
42
+ border: 1px solid ${(props) => props.theme.colors.neutral["100"]};
43
+ border-radius: 10px;
44
+ background-color: ${(props) => props.theme.colors.neutral["080"]};
45
+ box-shadow: none;
46
+ `;
47
+ const Header = (0, import_ds_system.styled)(import_ds_grid.Grid)`
48
+ align-items: center;
49
+ height: 36px;
50
+ `;
51
+ const Title = import_ds_system.styled.p`
52
+ font-size: 14px;
53
+ font-weight: ${(props) => props.theme.fontWeights.semibold};
54
+ color: ${(props) => props.theme.colors.neutral["700"]};
55
+ margin: 0;
56
+ `;
57
+ const Time = import_ds_system.styled.p`
58
+ font-size: 12px;
59
+ font-weight: ${(props) => props.theme.fontWeights.regular};
60
+ color: ${(props) => props.theme.colors.neutral["700"]};
61
+ margin: 0;
62
+ text-align: right;
63
+ `;
64
+ const Message = import_ds_system.styled.p`
65
+ font-size: 13px;
66
+ font-weight: ${(props) => props.theme.fontWeights.regular};
67
+ color: ${(props) => props.theme.colors.neutral["700"]};
68
+ min-height: 32px;
69
+ text-align: center;
70
+ margin: 0;
71
+ `;
72
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/style.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Wrapper = styled(Grid)`\n align-items: center;\n justify-content: center;\n max-width: 100%;\n padding: 0 8px 8px;\n border: 1px solid ${(props) => props.theme.colors.neutral['100']};\n border-radius: 10px;\n background-color: ${(props) => props.theme.colors.neutral['080']};\n box-shadow: none;\n`;\n\nconst Header = styled(Grid)`\n align-items: center;\n height: 36px;\n`;\n\nconst Title = styled.p`\n font-size: 14px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n`;\n\nconst Time = styled.p`\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n`;\n\nconst Message = styled.p`\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n min-height: 32px;\n text-align: center;\n margin: 0;\n`;\n\nexport { Wrapper, Header, Title, Time, Message };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AAErB,MAAM,cAAU,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKL,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,sBAEtC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI5D,MAAM,aAAS,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAK1B,MAAM,QAAQ,wBAAO;AAAA;AAAA,iBAEJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjD,MAAM,OAAO,wBAAO;AAAA;AAAA,iBAEH,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAKjD,MAAM,UAAU,wBAAO;AAAA;AAAA,iBAEN,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ const ChatSystemMessageDataTestIds = {
3
+ SYSTEM_MSG_TITLE: "chat-system-message-title",
4
+ SYSTEM_MSG_BODY: "chat-system-message-body",
5
+ SYSTEM_MSG_TIME: "chat-system-message-time"
6
+ };
7
+ export {
8
+ ChatSystemMessageDataTestIds
9
+ };
10
+ //# sourceMappingURL=ChatSystemMessageDataTestIds.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ChatSystemMessageDataTestIds.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const ChatSystemMessageDataTestIds = {\n SYSTEM_MSG_TITLE: 'chat-system-message-title',\n SYSTEM_MSG_BODY: 'chat-system-message-body',\n SYSTEM_MSG_TIME: 'chat-system-message-time',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,+BAA+B;AAAA,EAC1C,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
4
+ import { Wrapper, Header, Title, Time, Message } from "./style";
5
+ import { systemMessageProps, defaultProps } from "./react-desc-prop-types";
6
+ import { ChatSystemMessageDataTestIds } from "./ChatSystemMessageDataTestIds";
7
+ const SystemMessage = (props) => {
8
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
9
+ useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps);
10
+ const { title, time, body } = propsWithDefault;
11
+ return /* @__PURE__ */ jsxs(Wrapper, {
12
+ rows: ["auto", "auto"],
13
+ children: [
14
+ /* @__PURE__ */ jsxs(Header, {
15
+ cols: ["1fr", "auto", "1fr"],
16
+ children: [
17
+ /* @__PURE__ */ jsx("span", {}),
18
+ /* @__PURE__ */ jsx(Title, {
19
+ "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE,
20
+ children: title
21
+ }),
22
+ /* @__PURE__ */ jsx(Time, {
23
+ "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME,
24
+ children: time
25
+ })
26
+ ]
27
+ }),
28
+ /* @__PURE__ */ jsx(Message, {
29
+ "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY,
30
+ children: body
31
+ })
32
+ ]
33
+ });
34
+ };
35
+ SystemMessage.propTypes = systemMessageProps;
36
+ SystemMessage.displayName = "SystemMessage";
37
+ const SystemMessageWithSchema = describe(SystemMessage);
38
+ SystemMessageWithSchema.propTypes = systemMessageProps;
39
+ export {
40
+ SystemMessage,
41
+ SystemMessageWithSchema
42
+ };
43
+ //# sourceMappingURL=SystemMessage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/SystemMessage.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { Wrapper, Header, Title, Time, Message } from './style';\nimport { DSChatSystemMessageT, systemMessageProps, defaultProps } from './react-desc-prop-types';\nimport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds';\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps);\n\n const { title, time, body } = propsWithDefault;\n return (\n <Wrapper rows={['auto', 'auto']}>\n <Header cols={['1fr', 'auto', '1fr']}>\n <span />\n <Title data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE}>{title}</Title>\n <Time data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME}>{time}</Time>\n </Header>\n <Message data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY}>{body}</Message>\n </Wrapper>\n );\n};\n\nSystemMessage.propTypes = systemMessageProps as WeakValidationMap<unknown>;\nSystemMessage.displayName = 'SystemMessage';\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps as WeakValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,SAAS,QAAQ,OAAO,MAAM,eAAe;AACtD,SAA+B,oBAAoB,oBAAoB;AACvE,SAAS,oCAAoC;AAC7C,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,kBAAkB;AAEnE,QAAM,EAAE,OAAO,MAAM,KAAK,IAAI;AAC9B,SACE,qBAAC;AAAA,IAAQ,MAAM,CAAC,QAAQ,MAAM;AAAA,IAC5B;AAAA,2BAAC;AAAA,QAAO,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,QACjC;AAAA,8BAAC,UAAK;AAAA,UACN,oBAAC;AAAA,YAAM,eAAa,6BAA6B;AAAA,YAAmB;AAAA,WAAM;AAAA,UAC1E,oBAAC;AAAA,YAAK,eAAa,6BAA6B;AAAA,YAAkB;AAAA,WAAK;AAAA;AAAA,OACzE;AAAA,MACA,oBAAC;AAAA,QAAQ,eAAa,6BAA6B;AAAA,QAAkB;AAAA,OAAK;AAAA;AAAA,GAC5E;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { SystemMessage, SystemMessageWithSchema } from "./SystemMessage";
3
+ import { ChatSystemMessageDataTestIds } from "./ChatSystemMessageDataTestIds";
4
+ export * from "./style";
5
+ import { DSChatSystemMessageT } from "./react-desc-prop-types";
6
+ export {
7
+ ChatSystemMessageDataTestIds,
8
+ DSChatSystemMessageT,
9
+ SystemMessage,
10
+ SystemMessageWithSchema
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { SystemMessage, SystemMessageWithSchema } from './SystemMessage';\nexport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds';\nexport * from './style';\nexport { DSChatSystemMessageT } from './react-desc-prop-types';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe,+BAA+B;AACvD,SAAS,oCAAoC;AAC7C,cAAc;AACd,SAAS,4BAA4B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { PropTypes } from "@elliemae/ds-utilities";
3
+ const defaultProps = {
4
+ title: "System Message",
5
+ time: "",
6
+ body: ""
7
+ };
8
+ const systemMessageProps = {
9
+ title: PropTypes.string.description("Message title").defaultValue("System Message"),
10
+ time: PropTypes.string.description("data of the message, ie: hour"),
11
+ body: PropTypes.string.isRequired.description("message")
12
+ };
13
+ export {
14
+ defaultProps,
15
+ systemMessageProps
16
+ };
17
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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-utilities';\n\nexport declare namespace DSChatSystemMessageT {\n export interface Props {\n title: string;\n body: string;\n time: string;\n }\n}\n\nexport const defaultProps: DSChatSystemMessageT.Props = {\n title: 'System Message',\n time: '',\n body: '',\n};\n\nexport const systemMessageProps = {\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n body: PropTypes.string.isRequired.description('message'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAUnB,MAAM,eAA2C;AAAA,EACtD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,qBAAqB;AAAA,EAChC,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAClE,MAAM,UAAU,OAAO,WAAW,YAAY,SAAS;AACzD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ import { styled } from "@elliemae/ds-system";
3
+ import { Grid } from "@elliemae/ds-grid";
4
+ const Wrapper = styled(Grid)`
5
+ align-items: center;
6
+ justify-content: center;
7
+ max-width: 100%;
8
+ padding: 0 8px 8px;
9
+ border: 1px solid ${(props) => props.theme.colors.neutral["100"]};
10
+ border-radius: 10px;
11
+ background-color: ${(props) => props.theme.colors.neutral["080"]};
12
+ box-shadow: none;
13
+ `;
14
+ const Header = styled(Grid)`
15
+ align-items: center;
16
+ height: 36px;
17
+ `;
18
+ const Title = styled.p`
19
+ font-size: 14px;
20
+ font-weight: ${(props) => props.theme.fontWeights.semibold};
21
+ color: ${(props) => props.theme.colors.neutral["700"]};
22
+ margin: 0;
23
+ `;
24
+ const Time = styled.p`
25
+ font-size: 12px;
26
+ font-weight: ${(props) => props.theme.fontWeights.regular};
27
+ color: ${(props) => props.theme.colors.neutral["700"]};
28
+ margin: 0;
29
+ text-align: right;
30
+ `;
31
+ const Message = styled.p`
32
+ font-size: 13px;
33
+ font-weight: ${(props) => props.theme.fontWeights.regular};
34
+ color: ${(props) => props.theme.colors.neutral["700"]};
35
+ min-height: 32px;
36
+ text-align: center;
37
+ margin: 0;
38
+ `;
39
+ export {
40
+ Header,
41
+ Message,
42
+ Time,
43
+ Title,
44
+ Wrapper
45
+ };
46
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/style.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Wrapper = styled(Grid)`\n align-items: center;\n justify-content: center;\n max-width: 100%;\n padding: 0 8px 8px;\n border: 1px solid ${(props) => props.theme.colors.neutral['100']};\n border-radius: 10px;\n background-color: ${(props) => props.theme.colors.neutral['080']};\n box-shadow: none;\n`;\n\nconst Header = styled(Grid)`\n align-items: center;\n height: 36px;\n`;\n\nconst Title = styled.p`\n font-size: 14px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n`;\n\nconst Time = styled.p`\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n`;\n\nconst Message = styled.p`\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n min-height: 32px;\n text-align: center;\n margin: 0;\n`;\n\nexport { Wrapper, Header, Title, Time, Message };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,UAAU,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKL,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,sBAEtC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI5D,MAAM,SAAS,OAAO,IAAI;AAAA;AAAA;AAAA;AAK1B,MAAM,QAAQ,OAAO;AAAA;AAAA,iBAEJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjD,MAAM,OAAO,OAAO;AAAA;AAAA,iBAEH,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAKjD,MAAM,UAAU,OAAO;AAAA;AAAA,iBAEN,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@elliemae/ds-chat-system-message",
3
+ "version": "3.6.0-next.0",
4
+ "license": "MIT",
5
+ "description": "ICE MT - Dimsum - Chat System Message",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
16
+ },
17
+ "./styled": {
18
+ "import": "./dist/esm/styled.js",
19
+ "require": "./dist/cjs/styled.js"
20
+ },
21
+ "./props": {
22
+ "import": "./dist/esm/props.js",
23
+ "require": "./dist/cjs/props.js"
24
+ },
25
+ "./SystemMessage": {
26
+ "import": "./dist/esm/SystemMessage.js",
27
+ "require": "./dist/cjs/SystemMessage.js"
28
+ }
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://git.elliemae.io/platform-ui/dimsum.git"
33
+ },
34
+ "engines": {
35
+ "pnpm": ">=6",
36
+ "node": ">=16"
37
+ },
38
+ "author": "ICE MT",
39
+ "jestSonar": {
40
+ "sonar56x": true,
41
+ "reportPath": "reports",
42
+ "reportFile": "tests.xml",
43
+ "indent": 4
44
+ },
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "typeSafety": true
48
+ },
49
+ "dependencies": {
50
+ "@elliemae/ds-grid": "3.6.0-next.0",
51
+ "@elliemae/ds-icons": "3.6.0-next.0",
52
+ "@elliemae/ds-system": "3.6.0-next.0",
53
+ "@elliemae/ds-tooltip": "3.6.0-next.0",
54
+ "@elliemae/ds-utilities": "3.6.0-next.0"
55
+ },
56
+ "devDependencies": {
57
+ "@testing-library/dom": "~8.13.0",
58
+ "@testing-library/jest-dom": "~5.16.4",
59
+ "@testing-library/react": "~12.1.3",
60
+ "@testing-library/user-event": "~13.5.0",
61
+ "styled-components": "~5.3.5"
62
+ },
63
+ "peerDependencies": {
64
+ "lodash": "^4.17.21",
65
+ "react": "^17.0.2",
66
+ "react-dom": "^17.0.2",
67
+ "styled-components": "^5.3.5"
68
+ },
69
+ "scripts": {
70
+ "test": "node ../../scripts/testing/test.mjs",
71
+ "lint": "node ../../scripts/lint.mjs",
72
+ "dts": "node ../../scripts/dts.mjs",
73
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
74
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
75
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
76
+ }
77
+ }