@elliemae/ds-chat-system-message 3.70.0-next.3 → 3.70.0-next.31

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.
Files changed (45) hide show
  1. package/dist/cjs/SystemMessage.js +45 -13
  2. package/dist/cjs/SystemMessage.js.map +2 -2
  3. package/dist/cjs/{DSChatSystemMessageDefinitions.js → constants/index.js} +37 -4
  4. package/dist/cjs/constants/index.js.map +7 -0
  5. package/dist/cjs/index.js +14 -5
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs/react-desc-prop-types.js +9 -3
  8. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  9. package/dist/cjs/style.js +25 -6
  10. package/dist/cjs/style.js.map +2 -2
  11. package/dist/cjs/{ChatSystemMessageDataTestIds.js → typescript-testing/slot-props.js} +17 -16
  12. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  13. package/dist/esm/SystemMessage.js +47 -14
  14. package/dist/esm/SystemMessage.js.map +2 -2
  15. package/dist/esm/constants/index.js +39 -0
  16. package/dist/esm/constants/index.js.map +7 -0
  17. package/dist/esm/index.js +18 -3
  18. package/dist/esm/index.js.map +2 -2
  19. package/dist/esm/react-desc-prop-types.js +15 -4
  20. package/dist/esm/react-desc-prop-types.js.map +2 -2
  21. package/dist/esm/style.js +25 -6
  22. package/dist/esm/style.js.map +2 -2
  23. package/dist/esm/typescript-testing/slot-props.js +19 -0
  24. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  25. package/dist/types/constants/index.d.ts +23 -0
  26. package/dist/types/index.d.ts +3 -2
  27. package/dist/types/react-desc-prop-types.d.ts +16 -8
  28. package/dist/types/tests/DSChatSystemMessage.data-testid.test.d.ts +1 -0
  29. package/dist/types/tests/DSChatSystemMessage.events.test.d.ts +0 -0
  30. package/dist/types/tests/DSChatSystemMessage.exports.test.d.ts +1 -0
  31. package/dist/types/tests/DSChatSystemMessage.get-owner-props-arguments.test.d.ts +1 -0
  32. package/dist/types/tests/DSChatSystemMessage.keyboard.test.d.ts +0 -0
  33. package/dist/types/tests/DSChatSystemMessage.proptype-schema.test.d.ts +1 -0
  34. package/dist/types/typescript-testing/slot-props.d.ts +1 -0
  35. package/package.json +7 -7
  36. package/dist/cjs/ChatSystemMessageDataTestIds.js.map +0 -7
  37. package/dist/cjs/DSChatSystemMessageDefinitions.js.map +0 -7
  38. package/dist/esm/ChatSystemMessageDataTestIds.js +0 -11
  39. package/dist/esm/ChatSystemMessageDataTestIds.js.map +0 -7
  40. package/dist/esm/DSChatSystemMessageDefinitions.js +0 -6
  41. package/dist/esm/DSChatSystemMessageDefinitions.js.map +0 -7
  42. package/dist/types/ChatSystemMessageDataTestIds.d.ts +0 -6
  43. package/dist/types/DSChatSystemMessageDefinitions.d.ts +0 -1
  44. /package/dist/types/tests/{DSChatSystemMessage.axe.test.d.ts → DSChatSystemMessage.a11y.test.d.ts} +0 -0
  45. /package/dist/types/tests/{DSChatSystemMessage.test.d.ts → DSChatSystemMessage.api.test.d.ts} +0 -0
@@ -37,27 +37,59 @@ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_style = require("./style.js");
39
39
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
40
- var import_ChatSystemMessageDataTestIds = require("./ChatSystemMessageDataTestIds.js");
41
- var import_DSChatSystemMessageDefinitions = require("./DSChatSystemMessageDefinitions.js");
40
+ var import_constants = require("./constants/index.js");
42
41
  const SystemMessage = (props) => {
43
42
  const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
44
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.systemMessageProps, import_DSChatSystemMessageDefinitions.DSChatSystemMessageName);
43
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSChatSystemMessagePropTypes, import_constants.DSChatSystemMessageName);
44
+ const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
45
45
  const {
46
46
  title,
47
47
  time = null,
48
48
  // undefined is technically not a valid React node, it should be null instead
49
49
  body
50
50
  } = propsWithDefault;
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.Wrapper, { "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_ROOT, children: [
52
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.Header, { children: [
53
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.EmptyDiv, {}),
54
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Title, { "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE, children: title }),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Time, { "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME, children: time })
56
- ] }),
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.Message, { "data-testid": import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY, children: body })
58
- ] });
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
52
+ import_style.Wrapper,
53
+ {
54
+ "data-testid": import_constants.CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,
55
+ getOwnerProps,
56
+ getOwnerPropsArguments,
57
+ children: [
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.Header, { getOwnerProps, getOwnerPropsArguments, children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.EmptyDiv, { getOwnerProps, getOwnerPropsArguments }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ import_style.Title,
62
+ {
63
+ "data-testid": import_constants.CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,
64
+ getOwnerProps,
65
+ getOwnerPropsArguments,
66
+ children: title
67
+ }
68
+ ),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
+ import_style.Time,
71
+ {
72
+ "data-testid": import_constants.CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,
73
+ getOwnerProps,
74
+ getOwnerPropsArguments,
75
+ children: time
76
+ }
77
+ )
78
+ ] }),
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
+ import_style.Message,
81
+ {
82
+ "data-testid": import_constants.CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY,
83
+ getOwnerProps,
84
+ getOwnerPropsArguments,
85
+ children: body
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ );
59
91
  };
60
- SystemMessage.displayName = import_DSChatSystemMessageDefinitions.DSChatSystemMessageName;
92
+ SystemMessage.displayName = import_constants.DSChatSystemMessageName;
61
93
  const SystemMessageWithSchema = (0, import_ds_props_helpers.describe)(SystemMessage);
62
- SystemMessageWithSchema.propTypes = import_react_desc_prop_types.systemMessageProps;
94
+ SystemMessageWithSchema.propTypes = import_react_desc_prop_types.DSChatSystemMessagePropTypes;
63
95
  //# sourceMappingURL=SystemMessage.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SystemMessage.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Wrapper, Header, Title, Time, Message, EmptyDiv } from './style.js';\nimport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nimport { systemMessageProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds.js';\nimport { DSChatSystemMessageName } from './DSChatSystemMessageDefinitions.js';\n\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSystemMessageT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps, DSChatSystemMessageName);\n\n const {\n title,\n time = null, // undefined is technically not a valid React node, it should be null instead\n body,\n } = propsWithDefault;\n return (\n <Wrapper data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_ROOT}>\n <Header>\n <EmptyDiv />\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.displayName = DSChatSystemMessageName;\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps as ValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBjB;AAvBN,8BAKO;AACP,mBAAgE;AAEhE,mCAAiD;AACjD,0CAA6C;AAC7C,4CAAwC;AAExC,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,uBAAmB,sDAAiE,OAAO,yCAAY;AAC7G,8DAA+B,kBAAkB,iDAAoB,6DAAuB;AAE5F,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA;AAAA,IACP;AAAA,EACF,IAAI;AACJ,SACE,6CAAC,wBAAQ,eAAa,iEAA6B,iBACjD;AAAA,iDAAC,uBACC;AAAA,kDAAC,yBAAS;AAAA,MACV,4CAAC,sBAAM,eAAa,iEAA6B,kBAAmB,iBAAM;AAAA,MAC1E,4CAAC,qBAAK,eAAa,iEAA6B,iBAAkB,gBAAK;AAAA,OACzE;AAAA,IACA,4CAAC,wBAAQ,eAAa,iEAA6B,iBAAkB,gBAAK;AAAA,KAC5E;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Wrapper, Header, Title, Time, Message, EmptyDiv } from './style.js';\nimport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nimport { DSChatSystemMessagePropTypes, defaultProps } from './react-desc-prop-types.js';\nimport { CHAT_SYSTEM_MESSAGE_DATA_TESTID, DSChatSystemMessageName } from './constants/index.js';\n\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSystemMessageT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSChatSystemMessagePropTypes, DSChatSystemMessageName);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatSystemMessageT.Props>(propsWithDefault);\n\n const {\n title,\n time = null, // undefined is technically not a valid React node, it should be null instead\n body,\n } = propsWithDefault;\n return (\n <Wrapper\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Header getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <EmptyDiv getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n <Title\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </Title>\n <Time\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {time}\n </Time>\n </Header>\n <Message\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {body}\n </Message>\n </Wrapper>\n );\n};\n\nSystemMessage.displayName = DSChatSystemMessageName;\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = DSChatSystemMessagePropTypes as ValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BjB;AA7BN,8BAMO;AACP,mBAAgE;AAEhE,mCAA2D;AAC3D,uBAAyE;AAEzE,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,uBAAmB,sDAAiE,OAAO,yCAAY;AAC7G,8DAA+B,kBAAkB,2DAA8B,wCAAuB;AACtG,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAA0C,gBAAgB;AAE5G,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA;AAAA,IACP;AAAA,EACF,IAAI;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,eAAa,iDAAgC;AAAA,MAC7C;AAAA,MACA;AAAA,MAEA;AAAA,qDAAC,uBAAO,eAA8B,wBACpC;AAAA,sDAAC,yBAAS,eAA8B,wBAAgD;AAAA,UACxF;AAAA,YAAC;AAAA;AAAA,cAEC,eAAa,iDAAgC;AAAA,cAC7C;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cAEC,eAAa,iDAAgC;AAAA,cAC7C;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,eAAa,iDAAgC;AAAA,YAC7C;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -26,11 +26,44 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSChatSystemMessageDefinitions_exports = {};
30
- __export(DSChatSystemMessageDefinitions_exports, {
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ CHAT_SYSTEM_MESSAGE_DATA_TESTID: () => CHAT_SYSTEM_MESSAGE_DATA_TESTID,
32
+ CHAT_SYSTEM_MESSAGE_SLOTS: () => CHAT_SYSTEM_MESSAGE_SLOTS,
33
+ ChatSystemMessageDataTestIds: () => ChatSystemMessageDataTestIds,
31
34
  DSChatSystemMessageName: () => DSChatSystemMessageName
32
35
  });
33
- module.exports = __toCommonJS(DSChatSystemMessageDefinitions_exports);
36
+ module.exports = __toCommonJS(constants_exports);
34
37
  var React = __toESM(require("react"));
38
+ var import_ds_system = require("@elliemae/ds-system");
35
39
  const DSChatSystemMessageName = "DSChatsystemmessage";
36
- //# sourceMappingURL=DSChatSystemMessageDefinitions.js.map
40
+ const CHAT_SYSTEM_MESSAGE_SLOTS = {
41
+ ROOT: "root",
42
+ // legacy ones...
43
+ HEADER: "header",
44
+ LEFT_SPACER: "left-spacer",
45
+ TITLE: "title",
46
+ // legacy ones...
47
+ TIME: "time",
48
+ // legacy ones...
49
+ BODY: "body"
50
+ // legacy ones...
51
+ };
52
+ const CHAT_SYSTEM_MESSAGE_DATA_TESTID = {
53
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),
54
+ ROOT: "chat-system-message-root",
55
+ // legacy value — breaking change if removed
56
+ TITLE: "chat-system-message-title",
57
+ // legacy value — breaking change if removed
58
+ TIME: "chat-system-message-time",
59
+ // legacy value — breaking change if removed
60
+ BODY: "chat-system-message-body"
61
+ // legacy value — breaking change if removed
62
+ };
63
+ const ChatSystemMessageDataTestIds = {
64
+ SYSTEM_MSG_ROOT: CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,
65
+ SYSTEM_MSG_TITLE: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,
66
+ SYSTEM_MSG_TIME: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,
67
+ SYSTEM_MSG_BODY: CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY
68
+ };
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatSystemMessageName = 'DSChatsystemmessage';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n// legacy data-testid values predate the slot naming convention; preserved at three layers (constants + JSX inline `data-testid` prop on each slot consumer) \u2014 breaking change if removed.\nexport const CHAT_SYSTEM_MESSAGE_SLOTS = {\n ROOT: 'root', // legacy ones...\n HEADER: 'header',\n LEFT_SPACER: 'left-spacer',\n TITLE: 'title', // legacy ones...\n TIME: 'time', // legacy ones...\n BODY: 'body', // legacy ones...\n} as const;\n\nexport const CHAT_SYSTEM_MESSAGE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),\n ROOT: 'chat-system-message-root', // legacy value \u2014 breaking change if removed\n TITLE: 'chat-system-message-title', // legacy value \u2014 breaking change if removed\n TIME: 'chat-system-message-time', // legacy value \u2014 breaking change if removed\n BODY: 'chat-system-message-body', // legacy value \u2014 breaking change if removed\n};\n\n// Legacy alias preserved for consumer compatibility \u2014 the original public export used\n// SYSTEM_MSG_* keys instead of slot-style ROOT/TITLE/TIME/BODY keys. Removing this alias is a\n// breaking change for any consumer that imports `ChatSystemMessageDataTestIds` and references\n// the SYSTEM_MSG_* property names.\nexport const ChatSystemMessageDataTestIds = {\n SYSTEM_MSG_ROOT: CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,\n SYSTEM_MSG_TITLE: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,\n SYSTEM_MSG_TIME: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,\n SYSTEM_MSG_BODY: CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,0BAA0B;AAIhC,MAAM,4BAA4B;AAAA,EACvC,MAAM;AAAA;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA;AAAA,EACP,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAEO,MAAM,kCAAkC;AAAA,EAC7C,OAAG,0CAAwB,yBAAyB,yBAAyB;AAAA,EAC7E,MAAM;AAAA;AAAA,EACN,OAAO;AAAA;AAAA,EACP,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAMO,MAAM,+BAA+B;AAAA,EAC1C,iBAAiB,gCAAgC;AAAA,EACjD,kBAAkB,gCAAgC;AAAA,EAClD,iBAAiB,gCAAgC;AAAA,EACjD,iBAAiB,gCAAgC;AACnD;",
6
+ "names": []
7
+ }
package/dist/cjs/index.js CHANGED
@@ -17,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
21
  // If the importer is in node compatibility mode or this is not an ESM
23
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -29,13 +28,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
29
  var index_exports = {};
31
30
  __export(index_exports, {
32
- ChatSystemMessageDataTestIds: () => import_ChatSystemMessageDataTestIds.ChatSystemMessageDataTestIds,
31
+ CHAT_SYSTEM_MESSAGE_DATA_TESTID: () => import_constants.CHAT_SYSTEM_MESSAGE_DATA_TESTID,
32
+ CHAT_SYSTEM_MESSAGE_SLOTS: () => import_constants.CHAT_SYSTEM_MESSAGE_SLOTS,
33
+ ChatSystemMessageDataTestIds: () => import_constants.ChatSystemMessageDataTestIds,
34
+ DSChatSystemMessageName: () => import_constants.DSChatSystemMessageName,
35
+ DSChatSystemMessagePropTypes: () => import_react_desc_prop_types.DSChatSystemMessagePropTypes,
36
+ DSChatSystemMessagePropTypesSchema: () => import_react_desc_prop_types.DSChatSystemMessagePropTypesSchema,
37
+ Message: () => import_style.Message,
33
38
  SystemMessage: () => import_SystemMessage.SystemMessage,
34
- SystemMessageWithSchema: () => import_SystemMessage.SystemMessageWithSchema
39
+ SystemMessageWithSchema: () => import_SystemMessage.SystemMessageWithSchema,
40
+ Time: () => import_style.Time,
41
+ Title: () => import_style.Title,
42
+ Wrapper: () => import_style.Wrapper
35
43
  });
36
44
  module.exports = __toCommonJS(index_exports);
37
45
  var React = __toESM(require("react"));
38
46
  var import_SystemMessage = require("./SystemMessage.js");
39
- var import_ChatSystemMessageDataTestIds = require("./ChatSystemMessageDataTestIds.js");
40
- __reExport(index_exports, require("./style.js"), module.exports);
47
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
48
+ var import_constants = require("./constants/index.js");
49
+ var import_style = require("./style.js");
41
50
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\nexport { SystemMessage, SystemMessageWithSchema } from './SystemMessage.js';\nexport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds.js';\nexport * from './style.js';\nexport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,2BAAuD;AACvD,0CAA6C;AAC7C,0BAAc,uBAHd;",
4
+ "sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\n\nexport { SystemMessage, SystemMessageWithSchema } from './SystemMessage.js';\nexport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nexport { DSChatSystemMessagePropTypes, DSChatSystemMessagePropTypesSchema } from './react-desc-prop-types.js';\nexport {\n DSChatSystemMessageName,\n CHAT_SYSTEM_MESSAGE_SLOTS,\n CHAT_SYSTEM_MESSAGE_DATA_TESTID,\n ChatSystemMessageDataTestIds, // legacy alias \u2014 breaking change if removed\n} from './constants/index.js';\n// Styled re-exports \u2014 consumed by @elliemae/ds-chat-container/src/styled.ts. Removing any of\n// these is a breaking change for that package's compose-by-styling integration.\n// Replaces the previous `export * from './style.js'` (which violated the no-`export *` rule).\nexport { Wrapper, Title, Time, Message } from './style.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,2BAAuD;AAEvD,mCAAiF;AACjF,uBAKO;AAIP,mBAA8C;",
6
6
  "names": []
7
7
  }
@@ -28,18 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
- defaultProps: () => defaultProps,
32
- systemMessageProps: () => systemMessageProps
31
+ DSChatSystemMessagePropTypes: () => DSChatSystemMessagePropTypes,
32
+ DSChatSystemMessagePropTypesSchema: () => DSChatSystemMessagePropTypesSchema,
33
+ defaultProps: () => defaultProps
33
34
  });
34
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
35
36
  var React = __toESM(require("react"));
36
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_constants = require("./constants/index.js");
37
39
  const defaultProps = {
38
40
  title: "System Message"
39
41
  };
40
- const systemMessageProps = {
42
+ const DSChatSystemMessagePropTypes = {
43
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSChatSystemMessageName, import_constants.CHAT_SYSTEM_MESSAGE_SLOTS),
44
+ ...import_ds_props_helpers.globalAttributesPropTypes,
45
+ ...import_ds_props_helpers.xstyledPropTypes,
41
46
  body: import_ds_props_helpers.PropTypes.string.isRequired.description("message"),
42
47
  title: import_ds_props_helpers.PropTypes.string.description("Message title").defaultValue("System Message"),
43
48
  time: import_ds_props_helpers.PropTypes.string.description("data of the message, ie: hour")
44
49
  };
50
+ const DSChatSystemMessagePropTypesSchema = DSChatSystemMessagePropTypes;
45
51
  //# 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": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n// import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatSystemMessageT {\n export interface DefaultProps {\n title: string;\n }\n export interface OptionalProps {\n time?: string;\n }\n export interface RequiredProps {\n body: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n // currently the component doesn't accept global attributes...\n // Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n // currently the component doesn't accept global attributes...\n // Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatSystemMessageT.DefaultProps = {\n title: 'System Message',\n};\n\nexport const systemMessageProps = {\n body: PropTypes.string.isRequired.description('message'),\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AA+BnB,MAAM,eAAkD;AAAA,EAC7D,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,kCAAU,OAAO,WAAW,YAAY,SAAS;AAAA,EACvD,OAAO,kCAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,kCAAU,OAAO,YAAY,+BAA+B;AACpE;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from './constants/index.js';\n\nexport declare namespace DSChatSystemMessageT {\n export type SlotFunctionArguments = {\n dsChatsystemmessageRoot: () => object;\n dsChatsystemmessageHeader: () => object;\n dsChatsystemmessageLeftSpacer: () => object;\n dsChatsystemmessageTitle: () => object;\n dsChatsystemmessageTime: () => object;\n dsChatsystemmessageBody: () => object;\n };\n\n export interface DefaultProps {\n title: string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatSystemMessageName, typeof CHAT_SYSTEM_MESSAGE_SLOTS> {\n time?: string;\n }\n\n export interface RequiredProps {\n body: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatSystemMessageT.DefaultProps = {\n title: 'System Message',\n};\n\nexport const DSChatSystemMessagePropTypes: DSPropTypesSchema<DSChatSystemMessageT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n body: PropTypes.string.isRequired.description('message'),\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n};\n\nexport const DSChatSystemMessagePropTypesSchema =\n DSChatSystemMessagePropTypes as unknown as ValidationMap<DSChatSystemMessageT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAAmE;AAwC5D,MAAM,eAAkD;AAAA,EAC7D,OAAO;AACT;AAEO,MAAM,+BAA8E;AAAA,EACzF,OAAG,kDAAyB,0CAAyB,0CAAyB;AAAA,EAC9E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,OAAO,WAAW,YAAY,SAAS;AAAA,EACvD,OAAO,kCAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,kCAAU,OAAO,YAAY,+BAA+B;AACpE;AAEO,MAAM,qCACX;",
6
6
  "names": []
7
7
  }
package/dist/cjs/style.js CHANGED
@@ -39,11 +39,15 @@ module.exports = __toCommonJS(style_exports);
39
39
  var React = __toESM(require("react"));
40
40
  var import_ds_system = require("@elliemae/ds-system");
41
41
  var import_ds_grid = require("@elliemae/ds-grid");
42
+ var import_constants = require("./constants/index.js");
42
43
  const wrapRule = import_ds_system.css`
43
44
  overflow-wrap: break-word;
44
45
  white-space: 'pre-wrap';
45
46
  `;
46
- const Wrapper = import_ds_system.styled.div`
47
+ const Wrapper = (0, import_ds_system.styled)("div", {
48
+ name: import_constants.DSChatSystemMessageName,
49
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.ROOT
50
+ })`
47
51
  align-items: center;
48
52
  min-width: 268px;
49
53
  padding: 0 8px 8px;
@@ -52,7 +56,10 @@ const Wrapper = import_ds_system.styled.div`
52
56
  background-color: ${(props) => props.theme.colors.neutral["080"]};
53
57
  box-shadow: none;
54
58
  `;
55
- const Header = (0, import_ds_system.styled)(import_ds_grid.Grid)`
59
+ const Header = (0, import_ds_system.styled)(import_ds_grid.Grid, {
60
+ name: import_constants.DSChatSystemMessageName,
61
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.HEADER
62
+ })`
56
63
  width: 100%;
57
64
  min-height: 36px;
58
65
  grid-auto-flow: column;
@@ -61,10 +68,16 @@ const Header = (0, import_ds_system.styled)(import_ds_grid.Grid)`
61
68
  justify-items: stretch;
62
69
  padding-top: 10px;
63
70
  `;
64
- const EmptyDiv = import_ds_system.styled.div`
71
+ const EmptyDiv = (0, import_ds_system.styled)("div", {
72
+ name: import_constants.DSChatSystemMessageName,
73
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.LEFT_SPACER
74
+ })`
65
75
  min-width: 54.5px;
66
76
  `;
67
- const Title = import_ds_system.styled.p`
77
+ const Title = (0, import_ds_system.styled)("p", {
78
+ name: import_constants.DSChatSystemMessageName,
79
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.TITLE
80
+ })`
68
81
  font-size: 1.077rem;
69
82
  font-weight: ${(props) => props.theme.fontWeights.semibold};
70
83
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -74,7 +87,10 @@ const Title = import_ds_system.styled.p`
74
87
  text-align: center;
75
88
  ${wrapRule}
76
89
  `;
77
- const Time = import_ds_system.styled.div`
90
+ const Time = (0, import_ds_system.styled)("div", {
91
+ name: import_constants.DSChatSystemMessageName,
92
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.TIME
93
+ })`
78
94
  font-size: 0.923rem;
79
95
  font-weight: ${(props) => props.theme.fontWeights.regular};
80
96
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -82,7 +98,10 @@ const Time = import_ds_system.styled.div`
82
98
  text-align: right;
83
99
  min-width: 54.5px;
84
100
  `;
85
- const Message = import_ds_system.styled.p`
101
+ const Message = (0, import_ds_system.styled)("p", {
102
+ name: import_constants.DSChatSystemMessageName,
103
+ slot: import_constants.CHAT_SYSTEM_MESSAGE_SLOTS.BODY
104
+ })`
86
105
  font-size: 1rem;
87
106
  font-weight: ${(props) => props.theme.fontWeights.regular};
88
107
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/style.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst wrapRule = css`\n overflow-wrap: break-word;\n white-space: 'pre-wrap';\n`;\n\nconst Wrapper = styled.div`\n align-items: center;\n min-width: 268px;\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 width: 100%;\n min-height: 36px;\n grid-auto-flow: column;\n place-items: center;\n align-items: start;\n justify-items: stretch;\n padding-top: 10px;\n`;\n\nconst EmptyDiv = styled.div`\n min-width: 54.5px;\n`;\n\nconst Title = styled.p`\n font-size: 1.077rem;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n ${wrapRule}\n`;\n\nconst Time = styled.div`\n font-size: 0.923rem;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n min-width: 54.5px;\n`;\n\nconst Message = styled.p`\n font-size: 1rem;\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 ${wrapRule}\n`;\n\nexport { Wrapper, Header, EmptyDiv, Title, Time, Message };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,qBAAqB;AAErB,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,UAAU,wBAAO;AAAA;AAAA;AAAA;AAAA,sBAID,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,sBAE5C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIlE,MAAM,aAAS,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1B,MAAM,WAAW,wBAAO;AAAA;AAAA;AAIxB,MAAM,QAAQ,wBAAO;AAAA;AAAA,iBAEJ,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnD,QAAQ;AAAA;AAGZ,MAAM,OAAO,wBAAO;AAAA;AAAA,iBAEH,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,UAAU,wBAAO;AAAA;AAAA,iBAEN,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,IAInD,QAAQ;AAAA;",
4
+ "sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from './constants/index.js';\n\nconst wrapRule = css`\n overflow-wrap: break-word;\n white-space: 'pre-wrap';\n`;\n\nconst Wrapper = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.ROOT,\n})`\n align-items: center;\n min-width: 268px;\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 name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.HEADER,\n})`\n width: 100%;\n min-height: 36px;\n grid-auto-flow: column;\n place-items: center;\n align-items: start;\n justify-items: stretch;\n padding-top: 10px;\n`;\n\nconst EmptyDiv = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.LEFT_SPACER,\n})`\n min-width: 54.5px;\n`;\n\nconst Title = styled('p', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.TITLE,\n})`\n font-size: 1.077rem;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n ${wrapRule}\n`;\n\nconst Time = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.TIME,\n})`\n font-size: 0.923rem;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n min-width: 54.5px;\n`;\n\nconst Message = styled('p', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.BODY,\n})`\n font-size: 1rem;\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 ${wrapRule}\n`;\n\nexport { Wrapper, Header, EmptyDiv, Title, Time, Message };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,qBAAqB;AACrB,uBAAmE;AAEnE,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,cAAU,yBAAO,OAAO;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAIqB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,sBAE5C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIlE,MAAM,aAAS,yBAAO,qBAAM;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,eAAW,yBAAO,OAAO;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA;AAID,MAAM,YAAQ,yBAAO,KAAK;AAAA,EACxB,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnD,QAAQ;AAAA;AAGZ,MAAM,WAAO,yBAAO,OAAO;AAAA,EACzB,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,cAAU,yBAAO,KAAK;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM,2CAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,IAInD,QAAQ;AAAA;",
6
6
  "names": []
7
7
  }
@@ -5,10 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
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
8
  var __copyProps = (to, from, except, desc) => {
13
9
  if (from && typeof from === "object" || typeof from === "function") {
14
10
  for (let key of __getOwnPropNames(from))
@@ -25,17 +21,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
22
  mod
27
23
  ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var ChatSystemMessageDataTestIds_exports = {};
30
- __export(ChatSystemMessageDataTestIds_exports, {
31
- ChatSystemMessageDataTestIds: () => ChatSystemMessageDataTestIds
32
- });
33
- module.exports = __toCommonJS(ChatSystemMessageDataTestIds_exports);
34
24
  var React = __toESM(require("react"));
35
- const ChatSystemMessageDataTestIds = {
36
- SYSTEM_MSG_ROOT: "chat-system-message-root",
37
- SYSTEM_MSG_TITLE: "chat-system-message-title",
38
- SYSTEM_MSG_BODY: "chat-system-message-body",
39
- SYSTEM_MSG_TIME: "chat-system-message-time"
25
+ const SlotPropsAsObj = {
26
+ dsChatsystemmessageRoot: { "aria-label": "just a typescript test" },
27
+ dsChatsystemmessageHeader: { "aria-label": "just a typescript test" },
28
+ dsChatsystemmessageLeftSpacer: { "aria-hidden": true },
29
+ dsChatsystemmessageTitle: { "aria-label": "just a typescript test" },
30
+ dsChatsystemmessageTime: { "aria-label": "just a typescript test" },
31
+ dsChatsystemmessageBody: { "aria-label": "just a typescript test" }
32
+ };
33
+ const SlotPropsAsFunctions = {
34
+ dsChatsystemmessageRoot: () => ({ "aria-label": "just a typescript test" }),
35
+ dsChatsystemmessageHeader: () => ({ "aria-label": "just a typescript test" }),
36
+ dsChatsystemmessageLeftSpacer: () => ({ "aria-hidden": true }),
37
+ dsChatsystemmessageTitle: () => ({ "aria-label": "just a typescript test" }),
38
+ dsChatsystemmessageTime: () => ({ "aria-label": "just a typescript test" }),
39
+ dsChatsystemmessageBody: () => ({ "aria-label": "just a typescript test" })
40
40
  };
41
- //# sourceMappingURL=ChatSystemMessageDataTestIds.js.map
41
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
42
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from '../constants/index.js';\nimport type { DSChatSystemMessageT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSChatSystemMessageT.Props> = {\n dsChatsystemmessageRoot: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageHeader: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageLeftSpacer: { 'aria-hidden': true },\n dsChatsystemmessageTitle: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageTime: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageBody: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSChatSystemMessageT.SlotFunctionArguments = {\n dsChatsystemmessageRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageHeader: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageLeftSpacer: () => ({ 'aria-hidden': true }),\n dsChatsystemmessageTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageTime: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageBody: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSChatSystemMessageName, typeof CHAT_SYSTEM_MESSAGE_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,iBAAsD;AAAA,EAC1D,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,+BAA+B,EAAE,eAAe,KAAK;AAAA,EACrD,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,yBAAyB,EAAE,cAAc,yBAAyB;AACpE;AAEA,MAAM,uBAAmE;AAAA,EACvE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,+BAA+B,OAAO,EAAE,eAAe,KAAK;AAAA,EAC5D,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAC3E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -3,33 +3,66 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import {
4
4
  describe,
5
5
  useValidateTypescriptPropTypes,
6
- useMemoMergePropsWithDefault
6
+ useMemoMergePropsWithDefault,
7
+ useOwnerProps
7
8
  } from "@elliemae/ds-props-helpers";
8
9
  import { Wrapper, Header, Title, Time, Message, EmptyDiv } from "./style.js";
9
- import { systemMessageProps, defaultProps } from "./react-desc-prop-types.js";
10
- import { ChatSystemMessageDataTestIds } from "./ChatSystemMessageDataTestIds.js";
11
- import { DSChatSystemMessageName } from "./DSChatSystemMessageDefinitions.js";
10
+ import { DSChatSystemMessagePropTypes, defaultProps } from "./react-desc-prop-types.js";
11
+ import { CHAT_SYSTEM_MESSAGE_DATA_TESTID, DSChatSystemMessageName } from "./constants/index.js";
12
12
  const SystemMessage = (props) => {
13
13
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
14
- useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps, DSChatSystemMessageName);
14
+ useValidateTypescriptPropTypes(propsWithDefault, DSChatSystemMessagePropTypes, DSChatSystemMessageName);
15
+ const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
15
16
  const {
16
17
  title,
17
18
  time = null,
18
19
  // undefined is technically not a valid React node, it should be null instead
19
20
  body
20
21
  } = propsWithDefault;
21
- return /* @__PURE__ */ jsxs(Wrapper, { "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_ROOT, children: [
22
- /* @__PURE__ */ jsxs(Header, { children: [
23
- /* @__PURE__ */ jsx(EmptyDiv, {}),
24
- /* @__PURE__ */ jsx(Title, { "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_TITLE, children: title }),
25
- /* @__PURE__ */ jsx(Time, { "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_TIME, children: time })
26
- ] }),
27
- /* @__PURE__ */ jsx(Message, { "data-testid": ChatSystemMessageDataTestIds.SYSTEM_MSG_BODY, children: body })
28
- ] });
22
+ return /* @__PURE__ */ jsxs(
23
+ Wrapper,
24
+ {
25
+ "data-testid": CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,
26
+ getOwnerProps,
27
+ getOwnerPropsArguments,
28
+ children: [
29
+ /* @__PURE__ */ jsxs(Header, { getOwnerProps, getOwnerPropsArguments, children: [
30
+ /* @__PURE__ */ jsx(EmptyDiv, { getOwnerProps, getOwnerPropsArguments }),
31
+ /* @__PURE__ */ jsx(
32
+ Title,
33
+ {
34
+ "data-testid": CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,
35
+ getOwnerProps,
36
+ getOwnerPropsArguments,
37
+ children: title
38
+ }
39
+ ),
40
+ /* @__PURE__ */ jsx(
41
+ Time,
42
+ {
43
+ "data-testid": CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,
44
+ getOwnerProps,
45
+ getOwnerPropsArguments,
46
+ children: time
47
+ }
48
+ )
49
+ ] }),
50
+ /* @__PURE__ */ jsx(
51
+ Message,
52
+ {
53
+ "data-testid": CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY,
54
+ getOwnerProps,
55
+ getOwnerPropsArguments,
56
+ children: body
57
+ }
58
+ )
59
+ ]
60
+ }
61
+ );
29
62
  };
30
63
  SystemMessage.displayName = DSChatSystemMessageName;
31
64
  const SystemMessageWithSchema = describe(SystemMessage);
32
- SystemMessageWithSchema.propTypes = systemMessageProps;
65
+ SystemMessageWithSchema.propTypes = DSChatSystemMessagePropTypes;
33
66
  export {
34
67
  SystemMessage,
35
68
  SystemMessageWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/SystemMessage.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Wrapper, Header, Title, Time, Message, EmptyDiv } from './style.js';\nimport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nimport { systemMessageProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds.js';\nimport { DSChatSystemMessageName } from './DSChatSystemMessageDefinitions.js';\n\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSystemMessageT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps, DSChatSystemMessageName);\n\n const {\n title,\n time = null, // undefined is technically not a valid React node, it should be null instead\n body,\n } = propsWithDefault;\n return (\n <Wrapper data-testid={ChatSystemMessageDataTestIds.SYSTEM_MSG_ROOT}>\n <Header>\n <EmptyDiv />\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.displayName = DSChatSystemMessageName;\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps as ValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACwBjB,SACE,KADF;AAvBN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,SAAS,QAAQ,OAAO,MAAM,SAAS,gBAAgB;AAEhE,SAAS,oBAAoB,oBAAoB;AACjD,SAAS,oCAAoC;AAC7C,SAAS,+BAA+B;AAExC,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,mBAAmB,6BAAiE,OAAO,YAAY;AAC7G,iCAA+B,kBAAkB,oBAAoB,uBAAuB;AAE5F,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA;AAAA,IACP;AAAA,EACF,IAAI;AACJ,SACE,qBAAC,WAAQ,eAAa,6BAA6B,iBACjD;AAAA,yBAAC,UACC;AAAA,0BAAC,YAAS;AAAA,MACV,oBAAC,SAAM,eAAa,6BAA6B,kBAAmB,iBAAM;AAAA,MAC1E,oBAAC,QAAK,eAAa,6BAA6B,iBAAkB,gBAAK;AAAA,OACzE;AAAA,IACA,oBAAC,WAAQ,eAAa,6BAA6B,iBAAkB,gBAAK;AAAA,KAC5E;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Wrapper, Header, Title, Time, Message, EmptyDiv } from './style.js';\nimport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nimport { DSChatSystemMessagePropTypes, defaultProps } from './react-desc-prop-types.js';\nimport { CHAT_SYSTEM_MESSAGE_DATA_TESTID, DSChatSystemMessageName } from './constants/index.js';\n\nconst SystemMessage: React.ComponentType<DSChatSystemMessageT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSystemMessageT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSChatSystemMessagePropTypes, DSChatSystemMessageName);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatSystemMessageT.Props>(propsWithDefault);\n\n const {\n title,\n time = null, // undefined is technically not a valid React node, it should be null instead\n body,\n } = propsWithDefault;\n return (\n <Wrapper\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Header getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <EmptyDiv getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n <Title\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </Title>\n <Time\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {time}\n </Time>\n </Header>\n <Message\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {body}\n </Message>\n </Wrapper>\n );\n};\n\nSystemMessage.displayName = DSChatSystemMessageName;\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = DSChatSystemMessagePropTypes as ValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8BjB,SACE,KADF;AA7BN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,SAAS,QAAQ,OAAO,MAAM,SAAS,gBAAgB;AAEhE,SAAS,8BAA8B,oBAAoB;AAC3D,SAAS,iCAAiC,+BAA+B;AAEzE,MAAM,gBAAiE,CAAC,UAAU;AAChF,QAAM,mBAAmB,6BAAiE,OAAO,YAAY;AAC7G,iCAA+B,kBAAkB,8BAA8B,uBAAuB;AACtG,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAA0C,gBAAgB;AAE5G,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA;AAAA,IACP;AAAA,EACF,IAAI;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,eAAa,gCAAgC;AAAA,MAC7C;AAAA,MACA;AAAA,MAEA;AAAA,6BAAC,UAAO,eAA8B,wBACpC;AAAA,8BAAC,YAAS,eAA8B,wBAAgD;AAAA,UACxF;AAAA,YAAC;AAAA;AAAA,cAEC,eAAa,gCAAgC;AAAA,cAC7C;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cAEC,eAAa,gCAAgC;AAAA,cAC7C;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,eAAa,gCAAgC;AAAA,YAC7C;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSChatSystemMessageName = "DSChatsystemmessage";
4
+ const CHAT_SYSTEM_MESSAGE_SLOTS = {
5
+ ROOT: "root",
6
+ // legacy ones...
7
+ HEADER: "header",
8
+ LEFT_SPACER: "left-spacer",
9
+ TITLE: "title",
10
+ // legacy ones...
11
+ TIME: "time",
12
+ // legacy ones...
13
+ BODY: "body"
14
+ // legacy ones...
15
+ };
16
+ const CHAT_SYSTEM_MESSAGE_DATA_TESTID = {
17
+ ...slotObjectToDataTestIds(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),
18
+ ROOT: "chat-system-message-root",
19
+ // legacy value — breaking change if removed
20
+ TITLE: "chat-system-message-title",
21
+ // legacy value — breaking change if removed
22
+ TIME: "chat-system-message-time",
23
+ // legacy value — breaking change if removed
24
+ BODY: "chat-system-message-body"
25
+ // legacy value — breaking change if removed
26
+ };
27
+ const ChatSystemMessageDataTestIds = {
28
+ SYSTEM_MSG_ROOT: CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,
29
+ SYSTEM_MSG_TITLE: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,
30
+ SYSTEM_MSG_TIME: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,
31
+ SYSTEM_MSG_BODY: CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY
32
+ };
33
+ export {
34
+ CHAT_SYSTEM_MESSAGE_DATA_TESTID,
35
+ CHAT_SYSTEM_MESSAGE_SLOTS,
36
+ ChatSystemMessageDataTestIds,
37
+ DSChatSystemMessageName
38
+ };
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatSystemMessageName = 'DSChatsystemmessage';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n// legacy data-testid values predate the slot naming convention; preserved at three layers (constants + JSX inline `data-testid` prop on each slot consumer) \u2014 breaking change if removed.\nexport const CHAT_SYSTEM_MESSAGE_SLOTS = {\n ROOT: 'root', // legacy ones...\n HEADER: 'header',\n LEFT_SPACER: 'left-spacer',\n TITLE: 'title', // legacy ones...\n TIME: 'time', // legacy ones...\n BODY: 'body', // legacy ones...\n} as const;\n\nexport const CHAT_SYSTEM_MESSAGE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),\n ROOT: 'chat-system-message-root', // legacy value \u2014 breaking change if removed\n TITLE: 'chat-system-message-title', // legacy value \u2014 breaking change if removed\n TIME: 'chat-system-message-time', // legacy value \u2014 breaking change if removed\n BODY: 'chat-system-message-body', // legacy value \u2014 breaking change if removed\n};\n\n// Legacy alias preserved for consumer compatibility \u2014 the original public export used\n// SYSTEM_MSG_* keys instead of slot-style ROOT/TITLE/TIME/BODY keys. Removing this alias is a\n// breaking change for any consumer that imports `ChatSystemMessageDataTestIds` and references\n// the SYSTEM_MSG_* property names.\nexport const ChatSystemMessageDataTestIds = {\n SYSTEM_MSG_ROOT: CHAT_SYSTEM_MESSAGE_DATA_TESTID.ROOT,\n SYSTEM_MSG_TITLE: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TITLE,\n SYSTEM_MSG_TIME: CHAT_SYSTEM_MESSAGE_DATA_TESTID.TIME,\n SYSTEM_MSG_BODY: CHAT_SYSTEM_MESSAGE_DATA_TESTID.BODY,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,0BAA0B;AAIhC,MAAM,4BAA4B;AAAA,EACvC,MAAM;AAAA;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA;AAAA,EACP,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAEO,MAAM,kCAAkC;AAAA,EAC7C,GAAG,wBAAwB,yBAAyB,yBAAyB;AAAA,EAC7E,MAAM;AAAA;AAAA,EACN,OAAO;AAAA;AAAA,EACP,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAMO,MAAM,+BAA+B;AAAA,EAC1C,iBAAiB,gCAAgC;AAAA,EACjD,kBAAkB,gCAAgC;AAAA,EAClD,iBAAiB,gCAAgC;AAAA,EACjD,iBAAiB,gCAAgC;AACnD;",
6
+ "names": []
7
+ }
package/dist/esm/index.js CHANGED
@@ -1,10 +1,25 @@
1
1
  import * as React from "react";
2
2
  import { SystemMessage, SystemMessageWithSchema } from "./SystemMessage.js";
3
- import { ChatSystemMessageDataTestIds } from "./ChatSystemMessageDataTestIds.js";
4
- export * from "./style.js";
3
+ import { DSChatSystemMessagePropTypes, DSChatSystemMessagePropTypesSchema } from "./react-desc-prop-types.js";
4
+ import {
5
+ DSChatSystemMessageName,
6
+ CHAT_SYSTEM_MESSAGE_SLOTS,
7
+ CHAT_SYSTEM_MESSAGE_DATA_TESTID,
8
+ ChatSystemMessageDataTestIds
9
+ } from "./constants/index.js";
10
+ import { Wrapper, Title, Time, Message } from "./style.js";
5
11
  export {
12
+ CHAT_SYSTEM_MESSAGE_DATA_TESTID,
13
+ CHAT_SYSTEM_MESSAGE_SLOTS,
6
14
  ChatSystemMessageDataTestIds,
15
+ DSChatSystemMessageName,
16
+ DSChatSystemMessagePropTypes,
17
+ DSChatSystemMessagePropTypesSchema,
18
+ Message,
7
19
  SystemMessage,
8
- SystemMessageWithSchema
20
+ SystemMessageWithSchema,
21
+ Time,
22
+ Title,
23
+ Wrapper
9
24
  };
10
25
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-props-helpers';\nexport { SystemMessage, SystemMessageWithSchema } from './SystemMessage.js';\nexport { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds.js';\nexport * from './style.js';\nexport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe,+BAA+B;AACvD,SAAS,oCAAoC;AAC7C,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-props-helpers';\n\nexport { SystemMessage, SystemMessageWithSchema } from './SystemMessage.js';\nexport type { DSChatSystemMessageT } from './react-desc-prop-types.js';\nexport { DSChatSystemMessagePropTypes, DSChatSystemMessagePropTypesSchema } from './react-desc-prop-types.js';\nexport {\n DSChatSystemMessageName,\n CHAT_SYSTEM_MESSAGE_SLOTS,\n CHAT_SYSTEM_MESSAGE_DATA_TESTID,\n ChatSystemMessageDataTestIds, // legacy alias \u2014 breaking change if removed\n} from './constants/index.js';\n// Styled re-exports \u2014 consumed by @elliemae/ds-chat-container/src/styled.ts. Removing any of\n// these is a breaking change for that package's compose-by-styling integration.\n// Replaces the previous `export * from './style.js'` (which violated the no-`export *` rule).\nexport { Wrapper, Title, Time, Message } from './style.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,eAAe,+BAA+B;AAEvD,SAAS,8BAA8B,0CAA0C;AACjF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,SAAS,OAAO,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -1,15 +1,26 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "@elliemae/ds-props-helpers";
2
+ import {
3
+ PropTypes,
4
+ getPropsPerSlotPropTypes,
5
+ globalAttributesPropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
8
+ import { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from "./constants/index.js";
3
9
  const defaultProps = {
4
10
  title: "System Message"
5
11
  };
6
- const systemMessageProps = {
12
+ const DSChatSystemMessagePropTypes = {
13
+ ...getPropsPerSlotPropTypes(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),
14
+ ...globalAttributesPropTypes,
15
+ ...xstyledPropTypes,
7
16
  body: PropTypes.string.isRequired.description("message"),
8
17
  title: PropTypes.string.description("Message title").defaultValue("System Message"),
9
18
  time: PropTypes.string.description("data of the message, ie: hour")
10
19
  };
20
+ const DSChatSystemMessagePropTypesSchema = DSChatSystemMessagePropTypes;
11
21
  export {
12
- defaultProps,
13
- systemMessageProps
22
+ DSChatSystemMessagePropTypes,
23
+ DSChatSystemMessagePropTypesSchema,
24
+ defaultProps
14
25
  };
15
26
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -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", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n// import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatSystemMessageT {\n export interface DefaultProps {\n title: string;\n }\n export interface OptionalProps {\n time?: string;\n }\n export interface RequiredProps {\n body: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n // currently the component doesn't accept global attributes...\n // Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n // currently the component doesn't accept global attributes...\n // Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatSystemMessageT.DefaultProps = {\n title: 'System Message',\n};\n\nexport const systemMessageProps = {\n body: PropTypes.string.isRequired.description('message'),\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AA+BnB,MAAM,eAAkD;AAAA,EAC7D,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,UAAU,OAAO,WAAW,YAAY,SAAS;AAAA,EACvD,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,UAAU,OAAO,YAAY,+BAA+B;AACpE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from './constants/index.js';\n\nexport declare namespace DSChatSystemMessageT {\n export type SlotFunctionArguments = {\n dsChatsystemmessageRoot: () => object;\n dsChatsystemmessageHeader: () => object;\n dsChatsystemmessageLeftSpacer: () => object;\n dsChatsystemmessageTitle: () => object;\n dsChatsystemmessageTime: () => object;\n dsChatsystemmessageBody: () => object;\n };\n\n export interface DefaultProps {\n title: string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatSystemMessageName, typeof CHAT_SYSTEM_MESSAGE_SLOTS> {\n time?: string;\n }\n\n export interface RequiredProps {\n body: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatSystemMessageT.DefaultProps = {\n title: 'System Message',\n};\n\nexport const DSChatSystemMessagePropTypes: DSPropTypesSchema<DSChatSystemMessageT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n body: PropTypes.string.isRequired.description('message'),\n title: PropTypes.string.description('Message title').defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n};\n\nexport const DSChatSystemMessagePropTypesSchema =\n DSChatSystemMessagePropTypes as unknown as ValidationMap<DSChatSystemMessageT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,2BAA2B,+BAA+B;AAwC5D,MAAM,eAAkD;AAAA,EAC7D,OAAO;AACT;AAEO,MAAM,+BAA8E;AAAA,EACzF,GAAG,yBAAyB,yBAAyB,yBAAyB;AAAA,EAC9E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,OAAO,WAAW,YAAY,SAAS;AAAA,EACvD,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,gBAAgB;AAAA,EAClF,MAAM,UAAU,OAAO,YAAY,+BAA+B;AACpE;AAEO,MAAM,qCACX;",
6
6
  "names": []
7
7
  }
package/dist/esm/style.js CHANGED
@@ -1,11 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { styled, css } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
+ import { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from "./constants/index.js";
4
5
  const wrapRule = css`
5
6
  overflow-wrap: break-word;
6
7
  white-space: 'pre-wrap';
7
8
  `;
8
- const Wrapper = styled.div`
9
+ const Wrapper = styled("div", {
10
+ name: DSChatSystemMessageName,
11
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.ROOT
12
+ })`
9
13
  align-items: center;
10
14
  min-width: 268px;
11
15
  padding: 0 8px 8px;
@@ -14,7 +18,10 @@ const Wrapper = styled.div`
14
18
  background-color: ${(props) => props.theme.colors.neutral["080"]};
15
19
  box-shadow: none;
16
20
  `;
17
- const Header = styled(Grid)`
21
+ const Header = styled(Grid, {
22
+ name: DSChatSystemMessageName,
23
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.HEADER
24
+ })`
18
25
  width: 100%;
19
26
  min-height: 36px;
20
27
  grid-auto-flow: column;
@@ -23,10 +30,16 @@ const Header = styled(Grid)`
23
30
  justify-items: stretch;
24
31
  padding-top: 10px;
25
32
  `;
26
- const EmptyDiv = styled.div`
33
+ const EmptyDiv = styled("div", {
34
+ name: DSChatSystemMessageName,
35
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.LEFT_SPACER
36
+ })`
27
37
  min-width: 54.5px;
28
38
  `;
29
- const Title = styled.p`
39
+ const Title = styled("p", {
40
+ name: DSChatSystemMessageName,
41
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.TITLE
42
+ })`
30
43
  font-size: 1.077rem;
31
44
  font-weight: ${(props) => props.theme.fontWeights.semibold};
32
45
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -36,7 +49,10 @@ const Title = styled.p`
36
49
  text-align: center;
37
50
  ${wrapRule}
38
51
  `;
39
- const Time = styled.div`
52
+ const Time = styled("div", {
53
+ name: DSChatSystemMessageName,
54
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.TIME
55
+ })`
40
56
  font-size: 0.923rem;
41
57
  font-weight: ${(props) => props.theme.fontWeights.regular};
42
58
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -44,7 +60,10 @@ const Time = styled.div`
44
60
  text-align: right;
45
61
  min-width: 54.5px;
46
62
  `;
47
- const Message = styled.p`
63
+ const Message = styled("p", {
64
+ name: DSChatSystemMessageName,
65
+ slot: CHAT_SYSTEM_MESSAGE_SLOTS.BODY
66
+ })`
48
67
  font-size: 1rem;
49
68
  font-weight: ${(props) => props.theme.fontWeights.regular};
50
69
  color: ${(props) => props.theme.colors.neutral["700"]};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/style.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst wrapRule = css`\n overflow-wrap: break-word;\n white-space: 'pre-wrap';\n`;\n\nconst Wrapper = styled.div`\n align-items: center;\n min-width: 268px;\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 width: 100%;\n min-height: 36px;\n grid-auto-flow: column;\n place-items: center;\n align-items: start;\n justify-items: stretch;\n padding-top: 10px;\n`;\n\nconst EmptyDiv = styled.div`\n min-width: 54.5px;\n`;\n\nconst Title = styled.p`\n font-size: 1.077rem;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n ${wrapRule}\n`;\n\nconst Time = styled.div`\n font-size: 0.923rem;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n min-width: 54.5px;\n`;\n\nconst Message = styled.p`\n font-size: 1rem;\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 ${wrapRule}\n`;\n\nexport { Wrapper, Header, EmptyDiv, Title, Time, Message };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AAErB,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA,sBAID,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,sBAE5C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIlE,MAAM,SAAS,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1B,MAAM,WAAW,OAAO;AAAA;AAAA;AAIxB,MAAM,QAAQ,OAAO;AAAA;AAAA,iBAEJ,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnD,QAAQ;AAAA;AAGZ,MAAM,OAAO,OAAO;AAAA;AAAA,iBAEH,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,UAAU,OAAO;AAAA;AAAA,iBAEN,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,IAInD,QAAQ;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from './constants/index.js';\n\nconst wrapRule = css`\n overflow-wrap: break-word;\n white-space: 'pre-wrap';\n`;\n\nconst Wrapper = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.ROOT,\n})`\n align-items: center;\n min-width: 268px;\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 name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.HEADER,\n})`\n width: 100%;\n min-height: 36px;\n grid-auto-flow: column;\n place-items: center;\n align-items: start;\n justify-items: stretch;\n padding-top: 10px;\n`;\n\nconst EmptyDiv = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.LEFT_SPACER,\n})`\n min-width: 54.5px;\n`;\n\nconst Title = styled('p', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.TITLE,\n})`\n font-size: 1.077rem;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n ${wrapRule}\n`;\n\nconst Time = styled('div', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.TIME,\n})`\n font-size: 0.923rem;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n min-width: 54.5px;\n`;\n\nconst Message = styled('p', {\n name: DSChatSystemMessageName,\n slot: CHAT_SYSTEM_MESSAGE_SLOTS.BODY,\n})`\n font-size: 1rem;\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 ${wrapRule}\n`;\n\nexport { Wrapper, Header, EmptyDiv, Title, Time, Message };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AACrB,SAAS,2BAA2B,+BAA+B;AAEnE,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,UAAU,OAAO,OAAO;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAIqB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,sBAE5C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIlE,MAAM,SAAS,OAAO,MAAM;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,WAAW,OAAO,OAAO;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA;AAID,MAAM,QAAQ,OAAO,KAAK;AAAA,EACxB,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnD,QAAQ;AAAA;AAGZ,MAAM,OAAO,OAAO,OAAO;AAAA,EACzB,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,UAAU,OAAO,KAAK;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM,0BAA0B;AAClC,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA,WAChD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,IAInD,QAAQ;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ const SlotPropsAsObj = {
3
+ dsChatsystemmessageRoot: { "aria-label": "just a typescript test" },
4
+ dsChatsystemmessageHeader: { "aria-label": "just a typescript test" },
5
+ dsChatsystemmessageLeftSpacer: { "aria-hidden": true },
6
+ dsChatsystemmessageTitle: { "aria-label": "just a typescript test" },
7
+ dsChatsystemmessageTime: { "aria-label": "just a typescript test" },
8
+ dsChatsystemmessageBody: { "aria-label": "just a typescript test" }
9
+ };
10
+ const SlotPropsAsFunctions = {
11
+ dsChatsystemmessageRoot: () => ({ "aria-label": "just a typescript test" }),
12
+ dsChatsystemmessageHeader: () => ({ "aria-label": "just a typescript test" }),
13
+ dsChatsystemmessageLeftSpacer: () => ({ "aria-hidden": true }),
14
+ dsChatsystemmessageTitle: () => ({ "aria-label": "just a typescript test" }),
15
+ dsChatsystemmessageTime: () => ({ "aria-label": "just a typescript test" }),
16
+ dsChatsystemmessageBody: () => ({ "aria-label": "just a typescript test" })
17
+ };
18
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
19
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from '../constants/index.js';\nimport type { DSChatSystemMessageT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSChatSystemMessageT.Props> = {\n dsChatsystemmessageRoot: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageHeader: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageLeftSpacer: { 'aria-hidden': true },\n dsChatsystemmessageTitle: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageTime: { 'aria-label': 'just a typescript test' },\n dsChatsystemmessageBody: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSChatSystemMessageT.SlotFunctionArguments = {\n dsChatsystemmessageRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageHeader: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageLeftSpacer: () => ({ 'aria-hidden': true }),\n dsChatsystemmessageTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageTime: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatsystemmessageBody: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSChatSystemMessageName, typeof CHAT_SYSTEM_MESSAGE_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACMvB,MAAM,iBAAsD;AAAA,EAC1D,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,+BAA+B,EAAE,eAAe,KAAK;AAAA,EACrD,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,yBAAyB,EAAE,cAAc,yBAAyB;AACpE;AAEA,MAAM,uBAAmE;AAAA,EACvE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,+BAA+B,OAAO,EAAE,eAAe,KAAK;AAAA,EAC5D,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAC3E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ export declare const DSChatSystemMessageName = "DSChatsystemmessage";
2
+ export declare const CHAT_SYSTEM_MESSAGE_SLOTS: {
3
+ readonly ROOT: "root";
4
+ readonly HEADER: "header";
5
+ readonly LEFT_SPACER: "left-spacer";
6
+ readonly TITLE: "title";
7
+ readonly TIME: "time";
8
+ readonly BODY: "body";
9
+ };
10
+ export declare const CHAT_SYSTEM_MESSAGE_DATA_TESTID: {
11
+ ROOT: string;
12
+ TITLE: string;
13
+ TIME: string;
14
+ BODY: string;
15
+ HEADER: "ds-chatsystemmessage-header";
16
+ LEFT_SPACER: "ds-chatsystemmessage-left-spacer";
17
+ };
18
+ export declare const ChatSystemMessageDataTestIds: {
19
+ SYSTEM_MSG_ROOT: string;
20
+ SYSTEM_MSG_TITLE: string;
21
+ SYSTEM_MSG_TIME: string;
22
+ SYSTEM_MSG_BODY: string;
23
+ };
@@ -1,4 +1,5 @@
1
1
  export { SystemMessage, SystemMessageWithSchema } from './SystemMessage.js';
2
- export { ChatSystemMessageDataTestIds } from './ChatSystemMessageDataTestIds.js';
3
- export * from './style.js';
4
2
  export type { DSChatSystemMessageT } from './react-desc-prop-types.js';
3
+ export { DSChatSystemMessagePropTypes, DSChatSystemMessagePropTypesSchema } from './react-desc-prop-types.js';
4
+ export { DSChatSystemMessageName, CHAT_SYSTEM_MESSAGE_SLOTS, CHAT_SYSTEM_MESSAGE_DATA_TESTID, ChatSystemMessageDataTestIds, } from './constants/index.js';
5
+ export { Wrapper, Title, Time, Message } from './style.js';
@@ -1,21 +1,29 @@
1
+ import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';
2
+ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
3
+ import { CHAT_SYSTEM_MESSAGE_SLOTS, DSChatSystemMessageName } from './constants/index.js';
1
4
  export declare namespace DSChatSystemMessageT {
5
+ type SlotFunctionArguments = {
6
+ dsChatsystemmessageRoot: () => object;
7
+ dsChatsystemmessageHeader: () => object;
8
+ dsChatsystemmessageLeftSpacer: () => object;
9
+ dsChatsystemmessageTitle: () => object;
10
+ dsChatsystemmessageTime: () => object;
11
+ dsChatsystemmessageBody: () => object;
12
+ };
2
13
  interface DefaultProps {
3
14
  title: string;
4
15
  }
5
- interface OptionalProps {
16
+ interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatSystemMessageName, typeof CHAT_SYSTEM_MESSAGE_SLOTS> {
6
17
  time?: string;
7
18
  }
8
19
  interface RequiredProps {
9
20
  body: string;
10
21
  }
11
- interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {
22
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
12
23
  }
13
- interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {
24
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
14
25
  }
15
26
  }
16
27
  export declare const defaultProps: DSChatSystemMessageT.DefaultProps;
17
- export declare const systemMessageProps: {
18
- body: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
19
- title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
20
- time: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
21
- };
28
+ export declare const DSChatSystemMessagePropTypes: DSPropTypesSchema<DSChatSystemMessageT.Props>;
29
+ export declare const DSChatSystemMessagePropTypesSchema: ValidationMap<DSChatSystemMessageT.Props>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat-system-message",
3
- "version": "3.70.0-next.3",
3
+ "version": "3.70.0-next.31",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat System Message",
6
6
  "files": [
@@ -36,18 +36,18 @@
36
36
  "typeSafety": true
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-grid": "3.70.0-next.3",
40
- "@elliemae/ds-props-helpers": "3.70.0-next.3",
41
- "@elliemae/ds-system": "3.70.0-next.3"
39
+ "@elliemae/ds-grid": "3.70.0-next.31",
40
+ "@elliemae/ds-props-helpers": "3.70.0-next.31",
41
+ "@elliemae/ds-system": "3.70.0-next.31"
42
42
  },
43
43
  "devDependencies": {
44
44
  "jest": "^30.0.0",
45
45
  "styled-components": "~5.3.9",
46
- "@elliemae/ds-test-utils": "3.70.0-next.3",
47
- "@elliemae/ds-monorepo-devops": "3.70.0-next.3"
46
+ "@elliemae/ds-test-utils": "3.70.0-next.31",
47
+ "@elliemae/ds-monorepo-devops": "3.70.0-next.31"
48
48
  },
49
49
  "peerDependencies": {
50
- "lodash-es": "^4.17.21",
50
+ "lodash-es": "^4.18.1",
51
51
  "react": "^18.3.1",
52
52
  "react-dom": "^18.3.1",
53
53
  "styled-components": "~5.3.9"
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/ChatSystemMessageDataTestIds.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const ChatSystemMessageDataTestIds = {\n SYSTEM_MSG_ROOT: 'chat-system-message-root',\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,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSChatSystemMessageDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSChatSystemMessageName = 'DSChatsystemmessage';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,0BAA0B;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- const ChatSystemMessageDataTestIds = {
3
- SYSTEM_MSG_ROOT: "chat-system-message-root",
4
- SYSTEM_MSG_TITLE: "chat-system-message-title",
5
- SYSTEM_MSG_BODY: "chat-system-message-body",
6
- SYSTEM_MSG_TIME: "chat-system-message-time"
7
- };
8
- export {
9
- ChatSystemMessageDataTestIds
10
- };
11
- //# sourceMappingURL=ChatSystemMessageDataTestIds.js.map
@@ -1,7 +0,0 @@
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_ROOT: 'chat-system-message-root',\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,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;",
6
- "names": []
7
- }
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- const DSChatSystemMessageName = "DSChatsystemmessage";
3
- export {
4
- DSChatSystemMessageName
5
- };
6
- //# sourceMappingURL=DSChatSystemMessageDefinitions.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSChatSystemMessageDefinitions.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSChatSystemMessageName = 'DSChatsystemmessage';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,0BAA0B;",
6
- "names": []
7
- }
@@ -1,6 +0,0 @@
1
- export declare const ChatSystemMessageDataTestIds: {
2
- SYSTEM_MSG_ROOT: string;
3
- SYSTEM_MSG_TITLE: string;
4
- SYSTEM_MSG_BODY: string;
5
- SYSTEM_MSG_TIME: string;
6
- };
@@ -1 +0,0 @@
1
- export declare const DSChatSystemMessageName = "DSChatsystemmessage";