@elliemae/ds-chat-bubble 3.60.0-next.9 → 3.70.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/cjs/ChatBubble.js +90 -32
  2. package/dist/cjs/ChatBubble.js.map +2 -2
  3. package/dist/cjs/ChatBubbleArrow.js +76 -55
  4. package/dist/cjs/ChatBubbleArrow.js.map +2 -2
  5. package/dist/cjs/{DSChatBubbleDefinitions.js → constants/index.js} +36 -4
  6. package/dist/cjs/constants/index.js.map +7 -0
  7. package/dist/cjs/index.js +7 -5
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/react-desc-prop-types.js +14 -17
  10. package/dist/cjs/react-desc-prop-types.js.map +3 -3
  11. package/dist/cjs/styled.js +35 -37
  12. package/dist/cjs/styled.js.map +2 -2
  13. package/dist/esm/ChatBubble.js +88 -30
  14. package/dist/esm/ChatBubble.js.map +2 -2
  15. package/dist/esm/ChatBubbleArrow.js +76 -55
  16. package/dist/esm/ChatBubbleArrow.js.map +2 -2
  17. package/dist/esm/constants/index.js +38 -0
  18. package/dist/esm/constants/index.js.map +7 -0
  19. package/dist/esm/index.js +12 -4
  20. package/dist/esm/index.js.map +3 -3
  21. package/dist/esm/react-desc-prop-types.js +10 -8
  22. package/dist/esm/react-desc-prop-types.js.map +2 -2
  23. package/dist/esm/styled.js +35 -37
  24. package/dist/esm/styled.js.map +2 -2
  25. package/dist/types/ChatBubbleArrow.d.ts +1 -1
  26. package/dist/types/constants/index.d.ts +30 -0
  27. package/dist/types/index.d.ts +3 -2
  28. package/dist/types/react-desc-prop-types.d.ts +6 -10
  29. package/dist/types/styled.d.ts +2 -3
  30. package/package.json +24 -26
  31. package/dist/cjs/ChatBubbleDataTestIds.js +0 -41
  32. package/dist/cjs/ChatBubbleDataTestIds.js.map +0 -7
  33. package/dist/cjs/DSChatBubbleDefinitions.js.map +0 -7
  34. package/dist/esm/ChatBubbleDataTestIds.js +0 -11
  35. package/dist/esm/ChatBubbleDataTestIds.js.map +0 -7
  36. package/dist/esm/DSChatBubbleDefinitions.js +0 -6
  37. package/dist/esm/DSChatBubbleDefinitions.js.map +0 -7
  38. package/dist/types/ChatBubbleDataTestIds.d.ts +0 -6
  39. package/dist/types/DSChatBubbleDefinitions.d.ts +0 -1
@@ -31,7 +31,6 @@ __export(styled_exports, {
31
31
  StyleBodyWrapper: () => StyleBodyWrapper,
32
32
  StyleErrorMessage: () => StyleErrorMessage,
33
33
  StyleHelpMessage: () => StyleHelpMessage,
34
- StyledBubbleArrow: () => StyledBubbleArrow,
35
34
  StyledColoredBubble: () => StyledColoredBubble,
36
35
  StyledTitleBubble: () => StyledTitleBubble,
37
36
  StyledTitleLeftBubble: () => StyledTitleLeftBubble,
@@ -42,41 +41,59 @@ module.exports = __toCommonJS(styled_exports);
42
41
  var React = __toESM(require("react"));
43
42
  var import_ds_system = require("@elliemae/ds-system");
44
43
  var import_ds_grid = require("@elliemae/ds-grid");
45
- var import_react_desc_prop_types = require("./react-desc-prop-types.js");
44
+ var import_constants = require("./constants/index.js");
46
45
  const wrapRules = import_ds_system.css`
47
46
  overflow-wrap: break-word;
48
47
  white-space: pre-wrap;
49
48
  `;
50
- const StyledWrapper = import_ds_system.styled.div`
49
+ const StyledWrapper = (0, import_ds_system.styled)("div", {
50
+ name: import_constants.DSChatBubbleName,
51
+ slot: import_constants.CHAT_BUBBLE_SLOTS.WRAPPER
52
+ })`
51
53
  min-width: 224px;
52
54
  border-radius: 10px;
53
55
  ${wrapRules}
54
56
  `;
55
- const StyledTitleBubble = (0, import_ds_system.styled)(import_ds_grid.Grid)`
57
+ const StyledTitleBubble = (0, import_ds_system.styled)(import_ds_grid.Grid, {
58
+ name: import_constants.DSChatBubbleName,
59
+ slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER
60
+ })`
56
61
  padding-top: 6px;
57
62
  padding-left: 10px;
58
63
  padding-right: 10px;
59
64
  padding-bottom: 4px;
60
65
  `;
61
- const StyledTitleLeftBubble = (0, import_ds_system.styled)("div")`
66
+ const StyledTitleLeftBubble = (0, import_ds_system.styled)("div", {
67
+ name: import_constants.DSChatBubbleName,
68
+ slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_LEFT
69
+ })`
62
70
  font-size: 1rem;
63
71
  font-weight: 600;
64
72
  ${wrapRules}
65
73
  `;
66
- const StyledTitleRightBubble = (0, import_ds_system.styled)(import_ds_grid.Grid)`
74
+ const StyledTitleRightBubble = (0, import_ds_system.styled)(import_ds_grid.Grid, {
75
+ name: import_constants.DSChatBubbleName,
76
+ slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_RIGHT
77
+ })`
67
78
  font-size: 1rem;
68
79
  font-weight: 400;
69
80
  align-self: flex-start;
70
- color: ${(props) => props.type === import_react_desc_prop_types.BUBBLE_TYPES.SENDER ? "#FFF" : "#657489"};
81
+ color: ${(props) => props["data-theming-type"] === import_constants.BUBBLE_TYPES.SENDER ? "#FFF" : "#657489"};
71
82
  `;
72
- const StyleBodyWrapper = import_ds_system.styled.div`
83
+ const StyleBodyWrapper = (0, import_ds_system.styled)("div", {
84
+ name: import_constants.DSChatBubbleName,
85
+ slot: import_constants.CHAT_BUBBLE_SLOTS.BODY_WRAPPER
86
+ })`
73
87
  font-size: 1rem;
74
88
  font-weight: 400;
75
89
  line-height: 1.15;
76
90
  min-height: 18px;
77
91
  padding: 0px 10px 8px 10px;
78
92
  `;
79
- const StyleErrorMessage = import_ds_system.styled.div`
93
+ const StyleErrorMessage = (0, import_ds_system.styled)("div", {
94
+ name: import_constants.DSChatBubbleName,
95
+ slot: import_constants.CHAT_BUBBLE_SLOTS.ERROR_MESSAGE
96
+ })`
80
97
  font-size: 0.923rem;
81
98
  font-weight: 400;
82
99
  padding-top: ${(props) => props.theme.space.xxxs};
@@ -96,7 +113,10 @@ const StyleErrorMessage = import_ds_system.styled.div`
96
113
  margin-left: 8px;
97
114
  }
98
115
  `;
99
- const StyleHelpMessage = (0, import_ds_system.styled)(StyleErrorMessage)`
116
+ const StyleHelpMessage = (0, import_ds_system.styled)(StyleErrorMessage, {
117
+ name: import_constants.DSChatBubbleName,
118
+ slot: import_constants.CHAT_BUBBLE_SLOTS.HELP_MESSAGE
119
+ })`
100
120
  font-size: 0.923rem;
101
121
  line-height: 1.15;
102
122
  color: ${(props) => props.theme.colors.neutral[600]};
@@ -108,47 +128,25 @@ const StyleHelpMessage = (0, import_ds_system.styled)(StyleErrorMessage)`
108
128
  color: ${(props) => props.theme.colors.danger[900]};
109
129
  }
110
130
  `;
111
- const StyledBubbleArrow = import_ds_system.styled.div`
112
- display: block;
113
- content: '';
114
- position: absolute;
115
- bottom: 0.769rem;
116
- height: 1.15rem;
117
- `;
118
- const StyledColoredBubble = import_ds_system.styled.div`
131
+ const StyledColoredBubble = (0, import_ds_system.styled)("div", {
132
+ name: import_constants.DSChatBubbleName,
133
+ slot: import_constants.CHAT_BUBBLE_SLOTS.COLORED_BUBBLE
134
+ })`
119
135
  min-width: 224px;
120
136
  border-radius: 10px;
121
137
  position: relative;
122
138
 
123
- ${(props) => props.type === import_react_desc_prop_types.BUBBLE_TYPES.SENDER ? `
139
+ ${(props) => props["data-theming-type"] === import_constants.BUBBLE_TYPES.SENDER ? `
124
140
  border: 1px solid ${props.theme.colors.brand["700"]};
125
141
  background: ${props.theme.colors.brand[600]};
126
142
  color: ${props.theme.colors.neutral["000"]};
127
- ${StyledBubbleArrow}{
128
- right: -0.692rem;
129
- bottom: 0.461rem;
130
- svg{
131
- fill: ${props.theme.colors.brand[600]};
132
- }
133
- }
134
-
135
143
  a {
136
144
  color: #FFF;
137
145
  }
138
-
139
146
  ` : `
140
147
  box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);
141
148
  background: ${props.theme.colors.neutral["000"]};
142
149
  color: ${props.theme.colors.neutral[700]};
143
-
144
- ${StyledBubbleArrow}{
145
- left: -0.846rem;
146
- bottom: 0.461rem;
147
- svg{
148
- fill: ${props.theme.colors.neutral["000"]};
149
- }
150
- }
151
-
152
150
  `}
153
151
  `;
154
152
  //# sourceMappingURL=styled.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './react-desc-prop-types.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div')`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid)<{ type: string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div`\n display: block;\n content: '';\n position: absolute;\n bottom: 0.769rem;\n height: 1.15rem;\n`;\n\nexport const StyledColoredBubble = styled.div<{ type: string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -0.692rem;\n bottom: 0.461rem;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n a {\n color: #FFF;\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -0.846rem;\n bottom: 0.461rem;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA4B;AAC5B,qBAAqB;AACrB,mCAA6B;AAE7B,MAAM,YAAY;AAAA;AAAA;AAAA;AAKX,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAAA,IAGhC,SAAS;AAAA;AAIN,MAAM,wBAAoB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAOrC,MAAM,4BAAwB,yBAAO,KAAK;AAAA;AAAA;AAAA,IAG7C,SAAS;AAAA;AAEN,MAAM,6BAAyB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,WAItC,CAAC,UAAW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AQ,KAAK,CAAC;AAAA,iBACtC,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA,UAEtC,iBAAiB;AAAA;AAAA;AAAA;AAAA,wBAIH,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,KAIpD;AAAA;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.WRAPPER,\n})`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER,\n})`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,\n})`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,\n})<{ 'data-theming-type': string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props['data-theming-type'] === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,\n})`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,\n})`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,\n})`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\nexport const StyledColoredBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE,\n})<{ 'data-theming-type': string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n a {\n color: #FFF;\n }\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA4B;AAC5B,qBAAqB;AACrB,uBAAkE;AAElE,MAAM,YAAY;A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,WAGU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA,YAEzC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAI/C,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG,CAAC,UACD,MAAM,mBAAmB,MAAM,8BAAa,SACxC;AAAA,4BACoB,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,sBACrC,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,iBAClC,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,QAK1C;AAAA;AAAA,sBAEc,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBACtC,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,KAC3C;AAAA;",
6
6
  "names": []
7
7
  }
@@ -17,8 +17,7 @@ import {
17
17
  } from "./styled.js";
18
18
  import { BubblePropTypes, defaultProps } from "./react-desc-prop-types.js";
19
19
  import { ChatBubbleArrow } from "./ChatBubbleArrow.js";
20
- import { ChatBubbleDataTestIds } from "./ChatBubbleDataTestIds.js";
21
- import { DSChatBubbleName } from "./DSChatBubbleDefinitions.js";
20
+ import { CHAT_BUBBLE_DATA_TESTID, DSChatBubbleName } from "./constants/index.js";
22
21
  const ChatBubble = (props) => {
23
22
  const defaultPropsIncludingInstanciatedValues = React2.useMemo(() => {
24
23
  const dsId2 = props.dsId || `ds-chat-bubble-${uid(9)}`;
@@ -31,39 +30,98 @@ const ChatBubble = (props) => {
31
30
  useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);
32
31
  const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;
33
32
  const bodyParts = React2.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
34
- return /* @__PURE__ */ jsxs(StyledWrapper, { "data-testid": `${ChatBubbleDataTestIds.BUBBLE}-${dsId}`, children: [
35
- /* @__PURE__ */ jsxs(StyledColoredBubble, { type, children: [
36
- /* @__PURE__ */ jsxs(StyledTitleBubble, { cols: ["1fr", "auto"], gutter: "xs", alignItems: "flex-end", className: "sr-only", children: [
37
- /* @__PURE__ */ jsx(StyledTitleLeftBubble, { "data-testid": `${ChatBubbleDataTestIds.BUBBLE_TITLE}-${dsId}`, children: title }),
38
- /* @__PURE__ */ jsx(
39
- StyledTitleRightBubble,
33
+ return /* @__PURE__ */ jsxs(
34
+ StyledWrapper,
35
+ {
36
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`,
37
+ getOwnerProps: () => propsWithDefault,
38
+ getOwnerPropsArguments: () => ({}),
39
+ children: [
40
+ /* @__PURE__ */ jsxs(
41
+ StyledColoredBubble,
40
42
  {
41
- alignItems: "center",
42
- type,
43
- "data-testid": `${ChatBubbleDataTestIds.BUBBLE_TIME}-${dsId}`,
44
- children: time
43
+ "data-theming-type": type,
44
+ getOwnerProps: () => propsWithDefault,
45
+ getOwnerPropsArguments: () => ({}),
46
+ children: [
47
+ /* @__PURE__ */ jsxs(
48
+ StyledTitleBubble,
49
+ {
50
+ cols: ["1fr", "auto"],
51
+ gutter: "xs",
52
+ alignItems: "flex-end",
53
+ getOwnerProps: () => propsWithDefault,
54
+ getOwnerPropsArguments: () => ({}),
55
+ children: [
56
+ /* @__PURE__ */ jsx(
57
+ StyledTitleLeftBubble,
58
+ {
59
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`,
60
+ getOwnerProps: () => propsWithDefault,
61
+ getOwnerPropsArguments: () => ({}),
62
+ children: title
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx(
66
+ StyledTitleRightBubble,
67
+ {
68
+ alignItems: "center",
69
+ "data-theming-type": type,
70
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`,
71
+ getOwnerProps: () => propsWithDefault,
72
+ getOwnerPropsArguments: () => ({}),
73
+ children: time
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ ),
79
+ /* @__PURE__ */ jsx(
80
+ StyleBodyWrapper,
81
+ {
82
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`,
83
+ getOwnerProps: () => propsWithDefault,
84
+ getOwnerPropsArguments: () => ({}),
85
+ children: bodyParts.map((item, index) => (
86
+ // eslint-disable-next-line react/no-array-index-key
87
+ /* @__PURE__ */ jsxs(React2.Fragment, { children: [
88
+ item,
89
+ index < bodyParts.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
90
+ ] }, `body-fragment-${index}-${dsId}`)
91
+ ))
92
+ }
93
+ ),
94
+ /* @__PURE__ */ jsx(ChatBubbleArrow, { ...propsWithDefault })
95
+ ]
45
96
  }
46
- )
47
- ] }),
48
- /* @__PURE__ */ jsx(StyleBodyWrapper, { "data-testid": `chat-bubble-body-${dsId}`, children: bodyParts.map((item, index) => (
49
- // eslint-disable-next-line react/no-array-index-key
50
- /* @__PURE__ */ jsxs(React2.Fragment, { children: [
51
- item,
52
- index < bodyParts.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
53
- ] }, `body-fragment-${index}-${dsId}`)
54
- )) }),
55
- /* @__PURE__ */ jsx(ChatBubbleArrow, { type, dsId })
56
- ] }),
57
- errorMessage ? /* @__PURE__ */ jsx(StyleErrorMessage, { "data-testid": `chat-bubble-error-message-${dsId}`, children: /* @__PURE__ */ jsxs(Grid, { cols: ["1fr", "auto"], children: [
58
- /* @__PURE__ */ jsx("span", { children: errorMessage }),
59
- /* @__PURE__ */ jsx(WarningCircleFill, {})
60
- ] }) }) : null,
61
- helpMessage ? /* @__PURE__ */ jsx(StyleHelpMessage, { "data-testid": `chat-bubble-help-message-${dsId}`, children: /* @__PURE__ */ jsx("span", { children: helpMessage }) }) : null
62
- ] });
97
+ ),
98
+ errorMessage ? /* @__PURE__ */ jsx(
99
+ StyleErrorMessage,
100
+ {
101
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`,
102
+ getOwnerProps: () => propsWithDefault,
103
+ getOwnerPropsArguments: () => ({}),
104
+ children: /* @__PURE__ */ jsxs(Grid, { cols: ["1fr", "auto"], children: [
105
+ /* @__PURE__ */ jsx("span", { children: errorMessage }),
106
+ /* @__PURE__ */ jsx(WarningCircleFill, {})
107
+ ] })
108
+ }
109
+ ) : null,
110
+ helpMessage ? /* @__PURE__ */ jsx(
111
+ StyleHelpMessage,
112
+ {
113
+ "data-testid": `${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`,
114
+ getOwnerProps: () => propsWithDefault,
115
+ getOwnerPropsArguments: () => ({}),
116
+ children: /* @__PURE__ */ jsx("span", { children: helpMessage })
117
+ }
118
+ ) : null
119
+ ]
120
+ }
121
+ );
63
122
  };
64
123
  ChatBubble.displayName = DSChatBubbleName;
65
124
  const ChatBubbleWithSchema = describe(ChatBubble);
66
- ChatBubbleWithSchema.propTypes = BubblePropTypes;
67
125
  export {
68
126
  ChatBubble,
69
127
  ChatBubbleWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatBubble.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled.js';\nimport { BubblePropTypes, type DSChatBubbleT, defaultProps } from './react-desc-prop-types.js';\nimport { ChatBubbleArrow } from './ChatBubbleArrow.js';\nimport { ChatBubbleDataTestIds } from './ChatBubbleDataTestIds.js';\nimport { DSChatBubbleName } from './DSChatBubbleDefinitions.js';\n\nconst ChatBubble: React.ComponentType<DSChatBubbleT.Props> = (props) => {\n const defaultPropsIncludingInstanciatedValues = React.useMemo(() => {\n const dsId = props.dsId || `ds-chat-bubble-${uid(9)}`;\n return { ...defaultProps, dsId };\n }, [props.dsId]);\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatBubbleT.InternalProps>(\n props,\n defaultPropsIncludingInstanciatedValues,\n );\n useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n return (\n <StyledWrapper data-testid={`${ChatBubbleDataTestIds.BUBBLE}-${dsId}`}>\n <StyledColoredBubble type={type}>\n <StyledTitleBubble cols={['1fr', 'auto']} gutter=\"xs\" alignItems=\"flex-end\" className=\"sr-only\">\n <StyledTitleLeftBubble data-testid={`${ChatBubbleDataTestIds.BUBBLE_TITLE}-${dsId}`}>\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n type={type}\n data-testid={`${ChatBubbleDataTestIds.BUBBLE_TIME}-${dsId}`}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper data-testid={`chat-bubble-body-${dsId}`}>\n {bodyParts.map((item, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <React.Fragment key={`body-fragment-${index}-${dsId}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow type={type} dsId={dsId} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage data-testid={`chat-bubble-error-message-${dsId}`}>\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage data-testid={`chat-bubble-help-message-${dsId}`}>\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = BubblePropTypes;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoCf,SACE,KADF;AApCR,OAAOA,YAAW;AAClB,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,yBAAyB;AAClC,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAqC,oBAAoB;AAClE,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAEjC,MAAM,aAAuD,CAAC,UAAU;AACtE,QAAM,0CAA0CA,OAAM,QAAQ,MAAM;AAClE,UAAMC,QAAO,MAAM,QAAQ,kBAAkB,IAAI,CAAC,CAAC;AACnD,WAAO,EAAE,GAAG,cAAc,MAAAA,MAAK;AAAA,EACjC,GAAG,CAAC,MAAM,IAAI,CAAC;AACf,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,iCAA+B,kBAAkB,iBAAiB,gBAAgB;AAElF,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,YAAY,IAAI;AACrE,QAAM,YAAYD,OAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,GAAI,CAAC,IAAI,CAAC;AACpG,SACE,qBAAC,iBAAc,eAAa,GAAG,sBAAsB,MAAM,IAAI,IAAI,IACjE;AAAA,yBAAC,uBAAoB,MACnB;AAAA,2BAAC,qBAAkB,MAAM,CAAC,OAAO,MAAM,GAAG,QAAO,MAAK,YAAW,YAAW,WAAU,WACpF;AAAA,4BAAC,yBAAsB,eAAa,GAAG,sBAAsB,YAAY,IAAI,IAAI,IAC9E,iBACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX;AAAA,YACA,eAAa,GAAG,sBAAsB,WAAW,IAAI,IAAI;AAAA,YAExD;AAAA;AAAA,QACH;AAAA,SACF;AAAA,MACA,oBAAC,oBAAiB,eAAa,oBAAoB,IAAI,IACpD,oBAAU,IAAI,CAAC,MAAM;AAAA;AAAA,QAEpB,qBAACA,OAAM,UAAN,EACE;AAAA;AAAA,UACA,QAAQ,UAAU,SAAS,IAAI,oBAAC,QAAG,IAAK;AAAA,aAFtB,iBAAiB,KAAK,IAAI,IAAI,EAGnD;AAAA,OACD,GACH;AAAA,MACA,oBAAC,mBAAgB,MAAY,MAAY;AAAA,OAC3C;AAAA,IACC,eACC,oBAAC,qBAAkB,eAAa,6BAA6B,IAAI,IAC/D,+BAAC,QAAK,MAAM,CAAC,OAAO,MAAM,GACxB;AAAA,0BAAC,UAAM,wBAAa;AAAA,MACpB,oBAAC,qBAAkB;AAAA,OACrB,GACF,IACE;AAAA,IACH,cACC,oBAAC,oBAAiB,eAAa,4BAA4B,IAAI,IAC7D,8BAAC,UAAM,uBAAY,GACrB,IACE;AAAA,KACN;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled.js';\nimport { BubblePropTypes, type DSChatBubbleT, defaultProps } from './react-desc-prop-types.js';\nimport { ChatBubbleArrow } from './ChatBubbleArrow.js';\nimport { CHAT_BUBBLE_DATA_TESTID, DSChatBubbleName } from './constants/index.js';\n\nconst ChatBubble: React.ComponentType<DSChatBubbleT.Props> = (props) => {\n const defaultPropsIncludingInstanciatedValues = React.useMemo(() => {\n const dsId = props.dsId || `ds-chat-bubble-${uid(9)}`;\n return { ...defaultProps, dsId };\n }, [props.dsId]);\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatBubbleT.InternalProps>(\n props,\n defaultPropsIncludingInstanciatedValues,\n );\n useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n return (\n <StyledWrapper\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledColoredBubble\n data-theming-type={type}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledTitleBubble\n cols={['1fr', 'auto']}\n gutter=\"xs\"\n alignItems=\"flex-end\"\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledTitleLeftBubble\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n data-theming-type={type}\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {bodyParts.map((item, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <React.Fragment key={`body-fragment-${index}-${dsId}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow {...propsWithDefault} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\n\nexport { ChatBubble, ChatBubbleWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC2Cf,SAOE,KAPF;AA3CR,OAAOA,YAAW;AAClB,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,yBAAyB;AAClC,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;A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
6
6
  "names": ["React", "dsId"]
7
7
  }
@@ -1,62 +1,83 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { describe } from "@elliemae/ds-props-helpers";
4
- import { StyledBubbleArrow } from "./styled.js";
5
- import { BUBBLE_TYPES, propsArrowBubble } from "./react-desc-prop-types.js";
6
- const ChatBubbleArrow = ({ type, dsId }) => /* @__PURE__ */ jsx(StyledBubbleArrow, { children: type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ jsxs("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
7
- /* @__PURE__ */ jsxs("defs", { children: [
8
- /* @__PURE__ */ jsx(
9
- "path",
10
- {
11
- id: `arrow-svg-path-${dsId}`,
12
- d: "M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z"
13
- }
14
- ),
15
- /* @__PURE__ */ jsxs(
16
- "filter",
17
- {
18
- id: `arrow-svg-filter-${dsId}`,
19
- x: "-55.6%",
20
- y: "-50.0%",
21
- width: "211.1%",
22
- height: "225.0%",
23
- filterUnits: "objectBoundingBox",
24
- children: [
25
- /* @__PURE__ */ jsx("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
26
- /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "1.5", in: "shadowOffsetOuter1", result: "shadowBlurOuter1" }),
27
- /* @__PURE__ */ jsx(
28
- "feColorMatrix",
29
- {
30
- values: "0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0",
31
- type: "matrix",
32
- in: "shadowBlurOuter1"
33
- }
34
- )
35
- ]
36
- }
37
- )
38
- ] }),
39
- /* @__PURE__ */ jsx("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsxs("g", { transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) ", children: [
40
- /* @__PURE__ */ jsx(
41
- "use",
42
- {
43
- fill: "black",
44
- fillOpacity: "1",
45
- filter: `url(#arrow-svg-filter-${dsId})`,
46
- xlinkHref: `#arrow-svg-path-${dsId}`
47
- }
48
- ),
49
- /* @__PURE__ */ jsx("use", { fill: "#FFFFFF", fillRule: "evenodd", xlinkHref: `#arrow-svg-path-${dsId}` })
50
- ] }) })
51
- ] }) : /* @__PURE__ */ jsx("svg", { width: "0.692rem", height: "0.615rem", viewBox: "0 0 9 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsx(
52
- "path",
3
+ import { styled, css } from "@elliemae/ds-system";
4
+ import { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from "./constants/index.js";
5
+ const senderArrowPositionStyles = css`
6
+ right: -0.692rem;
7
+ height: 1.15rem;
8
+ bottom: 0.461rem;
9
+ `;
10
+ const recipientArrowPositionStyles = css`
11
+ left: -0.846rem;
12
+ bottom: 0.461rem;
13
+ `;
14
+ const StyledBubbleArrow = styled("div", {
15
+ name: DSChatBubbleName,
16
+ slot: CHAT_BUBBLE_SLOTS.ARROW
17
+ })`
18
+ position: absolute;
19
+ fill: ${(props) => props["data-theming-type"] === BUBBLE_TYPES.RECIPIENT ? props.theme.colors.neutral["000"] : props.theme.colors.brand["600"]};
20
+ ${(props) => {
21
+ if (props["data-theming-type"] === BUBBLE_TYPES.RECIPIENT) return recipientArrowPositionStyles;
22
+ return senderArrowPositionStyles;
23
+ }}
24
+ `;
25
+ const BubbleArrowRecipient = (propsWithDefault) => /* @__PURE__ */ jsx(
26
+ StyledBubbleArrow,
53
27
  {
54
- d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z",
55
- fill: "#1E79C2"
28
+ "data-theming-type": BUBBLE_TYPES.RECIPIENT,
29
+ getOwnerProps: () => propsWithDefault,
30
+ getOwnerPropsArguments: () => ({ isRecipientArrow: true }),
31
+ children: /* @__PURE__ */ jsxs("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
32
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
33
+ "filter",
34
+ {
35
+ id: `filter-${propsWithDefault.dsId}`,
36
+ width: "211.1%",
37
+ height: "225%",
38
+ x: "-55.6%",
39
+ y: "-50%",
40
+ filterUnits: "objectBoundingBox",
41
+ children: [
42
+ /* @__PURE__ */ jsx("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
43
+ /* @__PURE__ */ jsx("feGaussianBlur", { in: "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "1.5" }),
44
+ /* @__PURE__ */ jsx(
45
+ "feColorMatrix",
46
+ {
47
+ in: "shadowBlurOuter1",
48
+ values: "0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0"
49
+ }
50
+ )
51
+ ]
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ jsxs("g", { transform: "matrix(-1 0 0 1 15 0)", children: [
55
+ /* @__PURE__ */ jsx("use", { filter: `url(#filter-${propsWithDefault.dsId})`, href: `#path-${propsWithDefault.dsId}` }),
56
+ /* @__PURE__ */ jsx(
57
+ "path",
58
+ {
59
+ id: `path-${propsWithDefault.dsId}`,
60
+ d: "M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5"
61
+ }
62
+ )
63
+ ] })
64
+ ] })
56
65
  }
57
- ) }) }) });
58
- const ChatBubbleArrowWithSchema = describe(ChatBubbleArrow);
59
- ChatBubbleArrowWithSchema.propTypes = propsArrowBubble;
66
+ );
67
+ const BubbleArrowSender = (propsWithDefault) => /* @__PURE__ */ jsx(
68
+ StyledBubbleArrow,
69
+ {
70
+ "data-theming-type": BUBBLE_TYPES.SENDER,
71
+ getOwnerProps: () => propsWithDefault,
72
+ getOwnerPropsArguments: () => ({ isRecipientArrow: false }),
73
+ children: /* @__PURE__ */ jsx("svg", { width: "0.692rem", height: "0.615rem", viewBox: "0 0 9 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsx("path", { d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z" }) }) })
74
+ }
75
+ );
76
+ const ChatBubbleArrow = (propsWithDefault) => {
77
+ const { type } = propsWithDefault;
78
+ if (type === BUBBLE_TYPES.RECIPIENT) return /* @__PURE__ */ jsx(BubbleArrowRecipient, { ...propsWithDefault });
79
+ return /* @__PURE__ */ jsx(BubbleArrowSender, { ...propsWithDefault });
80
+ };
60
81
  export {
61
82
  ChatBubbleArrow
62
83
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatBubbleArrow.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledBubbleArrow } from './styled.js';\nimport { BUBBLE_TYPES, type DSChatBubbleT, propsArrowBubble } from './react-desc-prop-types.js';\n\nexport const ChatBubbleArrow: React.ComponentType<Pick<DSChatBubbleT.Props, 'type' | 'dsId'>> = ({ type, dsId }) => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"1.15rem\" height=\"1.07rem\" viewBox=\"0 0 15 14\" aria-hidden=\"true\">\n <defs>\n <path\n id={`arrow-svg-path-${dsId}`}\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n ></path>\n <filter\n id={`arrow-svg-filter-${dsId}`}\n x=\"-55.6%\"\n y=\"-50.0%\"\n width=\"211.1%\"\n height=\"225.0%\"\n filterUnits=\"objectBoundingBox\"\n >\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use\n fill=\"black\"\n fillOpacity=\"1\"\n filter={`url(#arrow-svg-filter-${dsId})`}\n xlinkHref={`#arrow-svg-path-${dsId}`}\n ></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref={`#arrow-svg-path-${dsId}`}></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"0.692rem\" height=\"0.615rem\" viewBox=\"0 0 9 8\" aria-hidden=\"true\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nconst ChatBubbleArrowWithSchema = describe(ChatBubbleArrow);\nChatBubbleArrowWithSchema.propTypes = propsArrowBubble;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACUb,cAIA,YAJA;AATV,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,SAAS,cAAkC,wBAAwB;AAE5D,MAAM,kBAAmF,CAAC,EAAE,MAAM,KAAK,MAC5G,oBAAC,qBACE,mBAAS,aAAa,YACrB,qBAAC,SAAI,OAAM,WAAU,QAAO,WAAU,SAAQ,aAAY,eAAY,QACpE;AAAA,uBAAC,UACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,kBAAkB,IAAI;AAAA,QAC1B,GAAE;AAAA;AAAA,IACH;AAAA,IACD;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,oBAAoB,IAAI;AAAA,QAC5B,GAAE;AAAA,QACF,GAAE;AAAA,QACF,OAAM;AAAA,QACN,QAAO;AAAA,QACP,aAAY;AAAA,QAEZ;AAAA,8BAAC,cAAS,IAAG,OAAM,IAAG,OAAM,IAAG,eAAc,QAAO,sBAAqB;AAAA,UACzE,oBAAC,oBAAe,cAAa,OAAM,IAAG,sBAAqB,QAAO,oBAAmB;AAAA,UACrF;AAAA,YAAC;AAAA;AAAA,cACC,QAAO;AAAA,cAIP,MAAK;AAAA,cACL,IAAG;AAAA;AAAA,UACJ;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAAA,EACA,oBAAC,OAAE,QAAO,QAAO,aAAY,KAAI,MAAK,QAAO,UAAS,WACpD,+BAAC,OAAE,WAAU,+EACX;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,aAAY;AAAA,QACZ,QAAQ,yBAAyB,IAAI;AAAA,QACrC,WAAW,mBAAmB,IAAI;AAAA;AAAA,IACnC;AAAA,IACD,oBAAC,SAAI,MAAK,WAAU,UAAS,WAAU,WAAW,mBAAmB,IAAI,IAAI;AAAA,KAC/E,GACF;AAAA,GACF,IAEA,oBAAC,SAAI,OAAM,YAAW,QAAO,YAAW,SAAQ,WAAU,eAAY,QACpE,8BAAC,OAAE,QAAO,QAAO,aAAY,KAAI,MAAK,QAAO,UAAS,WACpD;AAAA,EAAC;AAAA;AAAA,IACC,GAAE;AAAA,IACF,MAAK;AAAA;AACN,GACH,GACF,GAEJ;AAGF,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css } from '@elliemae/ds-system';\nimport React from 'react';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\nimport { type DSChatBubbleT } from './react-desc-prop-types.js';\n\nconst senderArrowPositionStyles = css`\n right: -0.692rem;\n height: 1.15rem;\n bottom: 0.461rem;\n`;\nconst recipientArrowPositionStyles = css`\n left: -0.846rem;\n bottom: 0.461rem;\n`;\n\nconst StyledBubbleArrow = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ARROW,\n})<{ 'data-theming-type': typeof BUBBLE_TYPES.RECIPIENT | typeof BUBBLE_TYPES.SENDER }>`\n position: absolute;\n fill: ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.RECIPIENT\n ? props.theme.colors.neutral['000']\n : props.theme.colors.brand['600']};\n ${(props) => {\n if (props['data-theming-type'] === BUBBLE_TYPES.RECIPIENT) return recipientArrowPositionStyles;\n return senderArrowPositionStyles;\n }}\n`;\n\nconst BubbleArrowRecipient: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.RECIPIENT}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({ isRecipientArrow: true })}\n >\n <svg width=\"1.15rem\" height=\"1.07rem\" viewBox=\"0 0 15 14\" aria-hidden=\"true\">\n <defs>\n <filter\n id={`filter-${propsWithDefault.dsId}`}\n width=\"211.1%\"\n height=\"225%\"\n x=\"-55.6%\"\n y=\"-50%\"\n filterUnits=\"objectBoundingBox\"\n >\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n <feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\"1.5\" />\n <feColorMatrix\n in=\"shadowBlurOuter1\"\n values=\"0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0\"\n />\n </filter>\n </defs>\n <g transform=\"matrix(-1 0 0 1 15 0)\">\n <use filter={`url(#filter-${propsWithDefault.dsId})`} href={`#path-${propsWithDefault.dsId}`} />\n <path\n id={`path-${propsWithDefault.dsId}`}\n d=\"M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5\"\n />\n </g>\n </svg>\n </StyledBubbleArrow>\n);\n\nconst BubbleArrowSender: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.SENDER}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({ isRecipientArrow: false })}\n >\n <svg width=\"0.692rem\" height=\"0.615rem\" viewBox=\"0 0 9 8\" aria-hidden=\"true\">\n <g stroke=\"none\" strokeWidth=\"1\" fillRule=\"evenodd\">\n <path d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"></path>\n </g>\n </svg>\n </StyledBubbleArrow>\n);\n\nexport const ChatBubbleArrow: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => {\n const { type } = propsWithDefault;\n if (type === BUBBLE_TYPES.RECIPIENT) return <BubbleArrowRecipient {...propsWithDefault} />;\n return <BubbleArrowSender {...propsWithDefault} />;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsCf,SAQE,KARF;AAtCR,SAAS,QAAQ,WAAW;AAE5B,SAAS,cAAc,mBAAmB,wBAAwB;AAGlE,MAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAKlC,MAAM,+BAA+B;AAAA;AAAA;AAAA;AAKrC,MAAM,oBAAoB,OAAO,OAAO;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA,UAES,CAAC,UACP,MAAM,mBAAmB,MAAM,aAAa,YACxC,MAAM,MAAM,OAAO,QAAQ,KAAK,IAChC,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,IACnC,CAAC,UAAU;AACX,MAAI,MAAM,mBAAmB,MAAM,aAAa,UAAW,QAAO;AAClE,SAAO;AACT,CAAC;AAAA;AAGH,MAAM,uBAAyE,CAAC,qBAC9E;AAAA,EAAC;AAAA;AAAA,IACC,qBAAmB,aAAa;AAAA,IAChC,eAAe,MAAM;AAAA,IACrB,wBAAwB,OAAO,EAAE,kBAAkB,KAAK;AAAA,IAExD,+BAAC,SAAI,OAAM,WAAU,QAAO,WAAU,SAAQ,aAAY,eAAY,QACpE;AAAA,0BAAC,UACC;AAAA,QAAC;AAAA;AAAA,UACC,IAAI,UAAU,iBAAiB,IAAI;AAAA,UACnC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,GAAE;AAAA,UACF,GAAE;AAAA,UACF,aAAY;AAAA,UAEZ;AAAA,gCAAC,cAAS,IAAG,OAAM,IAAG,OAAM,IAAG,eAAc,QAAO,sBAAqB;AAAA,YACzE,oBAAC,oBAAe,IAAG,sBAAqB,QAAO,oBAAmB,cAAa,OAAM;AAAA,YACrF;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,QAAO;AAAA;AAAA,YACT;AAAA;AAAA;AAAA,MACF,GACF;AAAA,MACA,qBAAC,OAAE,WAAU,yBACX;AAAA,4BAAC,SAAI,QAAQ,eAAe,iBAAiB,IAAI,KAAK,MAAM,SAAS,iBAAiB,IAAI,IAAI;AAAA,QAC9F;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,QAAQ,iBAAiB,IAAI;AAAA,YACjC,GAAE;AAAA;AAAA,QACJ;AAAA,SACF;AAAA,OACF;AAAA;AACF;AAGF,MAAM,oBAAsE,CAAC,qBAC3E;AAAA,EAAC;AAAA;AAAA,IACC,qBAAmB,aAAa;AAAA,IAChC,eAAe,MAAM;AAAA,IACrB,wBAAwB,OAAO,EAAE,kBAAkB,MAAM;AAAA,IAEzD,8BAAC,SAAI,OAAM,YAAW,QAAO,YAAW,SAAQ,WAAU,eAAY,QACpE,8BAAC,OAAE,QAAO,QAAO,aAAY,KAAI,UAAS,WACxC,8BAAC,UAAK,GAAE,2KAA0K,GACpL,GACF;AAAA;AACF;AAGK,MAAM,kBAAoE,CAAC,qBAAqB;AACrG,QAAM,EAAE,KAAK,IAAI;AACjB,MAAI,SAAS,aAAa,UAAW,QAAO,oBAAC,wBAAsB,GAAG,kBAAkB;AACxF,SAAO,oBAAC,qBAAmB,GAAG,kBAAkB;AAClD;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSChatBubbleName = "DSBubble";
4
+ const DSChatBubbleArrowName = "DSBubbleArrow";
5
+ const BUBBLE_TYPES = {
6
+ SENDER: "SENDER",
7
+ RECIPIENT: "RECIPIENT",
8
+ DELIMITER: "DELIMITER",
9
+ SYSTEM: "SYSTEM"
10
+ };
11
+ const CHAT_BUBBLE_SLOTS = {
12
+ WRAPPER: "wrapper",
13
+ HEADER: "header",
14
+ HEADER_LEFT: "header-left",
15
+ HEADER_RIGHT: "header-right",
16
+ BODY_WRAPPER: "body-wrapper",
17
+ ERROR_MESSAGE: "error-message",
18
+ HELP_MESSAGE: "help-message",
19
+ ARROW: "arrow",
20
+ COLORED_BUBBLE: "colored-bubble"
21
+ };
22
+ const CHAT_BUBBLE_DATA_TESTID = {
23
+ ...slotObjectToDataTestIds(DSChatBubbleName, CHAT_BUBBLE_SLOTS),
24
+ WRAPPER: "ds-chat-bubble",
25
+ HEADER_LEFT: "chat-bubble-title",
26
+ BODY_WRAPPER: "chat-bubble-body",
27
+ HEADER_RIGHT: "chat-bubble-time",
28
+ ERROR_MESSAGE: "chat-bubble-error-message",
29
+ HELP_MESSAGE: "chat-bubble-help-message"
30
+ };
31
+ export {
32
+ BUBBLE_TYPES,
33
+ CHAT_BUBBLE_DATA_TESTID,
34
+ CHAT_BUBBLE_SLOTS,
35
+ DSChatBubbleArrowName,
36
+ DSChatBubbleName
37
+ };
38
+ //# 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 DSChatBubbleName = 'DSBubble';\nexport const DSChatBubbleArrowName = 'DSBubbleArrow';\n\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n} as const;\n\nexport const CHAT_BUBBLE_SLOTS = {\n WRAPPER: 'wrapper',\n HEADER: 'header',\n HEADER_LEFT: 'header-left',\n HEADER_RIGHT: 'header-right',\n BODY_WRAPPER: 'body-wrapper',\n ERROR_MESSAGE: 'error-message',\n HELP_MESSAGE: 'help-message',\n ARROW: 'arrow',\n COLORED_BUBBLE: 'colored-bubble',\n} as const;\n\nexport const CHAT_BUBBLE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatBubbleName, CHAT_BUBBLE_SLOTS),\n WRAPPER: 'ds-chat-bubble',\n HEADER_LEFT: 'chat-bubble-title',\n BODY_WRAPPER: 'chat-bubble-body',\n HEADER_RIGHT: 'chat-bubble-time',\n ERROR_MESSAGE: 'chat-bubble-error-message',\n HELP_MESSAGE: 'chat-bubble-help-message',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,mBAAmB;AACzB,MAAM,wBAAwB;AAE9B,MAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AACV;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAAA,EACd,OAAO;AAAA,EACP,gBAAgB;AAClB;AAEO,MAAM,0BAA0B;AAAA,EACrC,GAAG,wBAAwB,kBAAkB,iBAAiB;AAAA,EAC9D,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAChB;",
6
+ "names": []
7
+ }
package/dist/esm/index.js CHANGED
@@ -1,12 +1,20 @@
1
1
  import * as React from "react";
2
2
  import { ChatBubble, ChatBubbleWithSchema } from "./ChatBubble.js";
3
- import { BUBBLE_TYPES } from "./react-desc-prop-types.js";
4
- import { ChatBubbleDataTestIds } from "./ChatBubbleDataTestIds.js";
3
+ import {
4
+ CHAT_BUBBLE_DATA_TESTID,
5
+ CHAT_BUBBLE_DATA_TESTID as CHAT_BUBBLE_DATA_TESTID2,
6
+ BUBBLE_TYPES,
7
+ DSChatBubbleName,
8
+ CHAT_BUBBLE_SLOTS
9
+ } from "./constants/index.js";
5
10
  export * from "./styled.js";
6
11
  export {
7
12
  BUBBLE_TYPES,
13
+ CHAT_BUBBLE_DATA_TESTID2 as CHAT_BUBBLE_DATA_TESTID,
14
+ CHAT_BUBBLE_SLOTS,
8
15
  ChatBubble,
9
- ChatBubbleDataTestIds,
10
- ChatBubbleWithSchema
16
+ CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds,
17
+ ChatBubbleWithSchema,
18
+ DSChatBubbleName
11
19
  };
12
20
  //# 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", "export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';\nexport { BUBBLE_TYPES, type DSChatBubbleT } from './react-desc-prop-types.js';\nexport { ChatBubbleDataTestIds } from './ChatBubbleDataTestIds.js';\nexport * from './styled.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,4BAA4B;AACjD,SAAS,oBAAwC;AACjD,SAAS,6BAA6B;AACtC,cAAc;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';\nexport { type DSChatBubbleT } from './react-desc-prop-types.js';\nexport {\n CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT\n CHAT_BUBBLE_DATA_TESTID,\n BUBBLE_TYPES,\n DSChatBubbleName,\n CHAT_BUBBLE_SLOTS,\n} from './constants/index.js';\nexport * from './styled.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,4BAA4B;AAEjD;AAAA,EAC6B;AAAA,EAC3B,2BAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,cAAc;",
6
+ "names": ["CHAT_BUBBLE_DATA_TESTID"]
7
7
  }