@elliemae/ds-chat 2.2.0-next.6 → 2.2.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.
- package/cjs/parts/chat-composer/ChatContainerComposer.js +3 -2
- package/cjs/parts/chat-composer/props.js +2 -0
- package/esm/parts/chat-composer/ChatContainerComposer.js +3 -2
- package/esm/parts/chat-composer/props.js +2 -0
- package/package.json +10 -10
- package/types/parts/bubble/ChatBubble.d.ts +1 -1
- package/types/parts/chat-card/ChatCard.d.ts +1 -1
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +4 -1
- package/types/parts/chat-container/ChatContainer.d.ts +1 -1
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +1 -1
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +1 -1
- package/types/parts/chat-sidebar/SideBarChat.d.ts +1 -1
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +1 -1
- package/types/parts/system-message/SystemMessage.d.ts +1 -1
- package/types/parts/tile-button/TileButton.d.ts +1 -1
|
@@ -48,6 +48,7 @@ const ChatComposer = props => {
|
|
|
48
48
|
placeholder,
|
|
49
49
|
inputMaxLength,
|
|
50
50
|
maxLengthMessage,
|
|
51
|
+
ariaMaxLengthMessage,
|
|
51
52
|
buttonDisabled,
|
|
52
53
|
dataTestid,
|
|
53
54
|
actionRef
|
|
@@ -151,8 +152,8 @@ const ChatComposer = props => {
|
|
|
151
152
|
}, void 0, inputMaxLength && hasError ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
152
153
|
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledCounterErrorA11y, {
|
|
153
154
|
role: "alert"
|
|
154
|
-
}, void 0,
|
|
155
|
-
}) : '', inputMaxLength
|
|
155
|
+
}, void 0, ariaMaxLengthMessage || "You have entered ".concat(inputLength, " characters and have exceeded the limit by ").concat(inputLength - inputMaxLength, ". Please limit to less than ").concat(inputMaxLength, " characters. ")), maxLengthMessage || "Please limit to less than ".concat(inputMaxLength, " characters. ")]
|
|
156
|
+
}) : '', inputMaxLength ? " ".concat(inputLength, " / ").concat(inputMaxLength) : ''), _Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}))));
|
|
156
157
|
};
|
|
157
158
|
|
|
158
159
|
ChatComposer.defaultProps = props.defaultComposerPros;
|
|
@@ -8,6 +8,7 @@ var lodash = require('lodash');
|
|
|
8
8
|
const defaultComposerPros = {
|
|
9
9
|
placeholder: 'Type your message',
|
|
10
10
|
inputValue: '',
|
|
11
|
+
ariaMaxLengthMessage: '',
|
|
11
12
|
onChange: lodash.noop,
|
|
12
13
|
onResize: lodash.noop,
|
|
13
14
|
onSend: lodash.noop,
|
|
@@ -24,6 +25,7 @@ const defaultComposerPros = {
|
|
|
24
25
|
const composerProps = {
|
|
25
26
|
placeholder: reactDesc.PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),
|
|
26
27
|
inputValue: reactDesc.PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),
|
|
28
|
+
ariaMaxLengthMessage: reactDesc.PropTypes.string.description('Aria message for Max length message when exceeded').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
27
29
|
maxLengthMessage: reactDesc.PropTypes.string.description('Max length message').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
28
30
|
onChange: reactDesc.PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),
|
|
29
31
|
onResize: reactDesc.PropTypes.func.description('Called the input changes his height').defaultValue(defaultComposerPros.onResize),
|
|
@@ -38,6 +38,7 @@ const ChatComposer = props => {
|
|
|
38
38
|
placeholder,
|
|
39
39
|
inputMaxLength,
|
|
40
40
|
maxLengthMessage,
|
|
41
|
+
ariaMaxLengthMessage,
|
|
41
42
|
buttonDisabled,
|
|
42
43
|
dataTestid,
|
|
43
44
|
actionRef
|
|
@@ -141,8 +142,8 @@ const ChatComposer = props => {
|
|
|
141
142
|
}, void 0, inputMaxLength && hasError ? /*#__PURE__*/jsxs(Fragment, {
|
|
142
143
|
children: [/*#__PURE__*/_jsx(StyledCounterErrorA11y, {
|
|
143
144
|
role: "alert"
|
|
144
|
-
}, void 0,
|
|
145
|
-
}) : '', inputMaxLength
|
|
145
|
+
}, void 0, ariaMaxLengthMessage || "You have entered ".concat(inputLength, " characters and have exceeded the limit by ").concat(inputLength - inputMaxLength, ". Please limit to less than ").concat(inputMaxLength, " characters. ")), maxLengthMessage || "Please limit to less than ".concat(inputMaxLength, " characters. ")]
|
|
146
|
+
}) : '', inputMaxLength ? " ".concat(inputLength, " / ").concat(inputMaxLength) : ''), _Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {}))));
|
|
146
147
|
};
|
|
147
148
|
|
|
148
149
|
ChatComposer.defaultProps = defaultComposerPros;
|
|
@@ -4,6 +4,7 @@ import { noop } from 'lodash';
|
|
|
4
4
|
const defaultComposerPros = {
|
|
5
5
|
placeholder: 'Type your message',
|
|
6
6
|
inputValue: '',
|
|
7
|
+
ariaMaxLengthMessage: '',
|
|
7
8
|
onChange: noop,
|
|
8
9
|
onResize: noop,
|
|
9
10
|
onSend: noop,
|
|
@@ -20,6 +21,7 @@ const defaultComposerPros = {
|
|
|
20
21
|
const composerProps = {
|
|
21
22
|
placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),
|
|
22
23
|
inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),
|
|
24
|
+
ariaMaxLengthMessage: PropTypes.string.description('Aria message for Max length message when exceeded').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
23
25
|
maxLengthMessage: PropTypes.string.description('Max length message').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
24
26
|
onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),
|
|
25
27
|
onResize: PropTypes.func.description('Called the input changes his height').defaultValue(defaultComposerPros.onResize),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -305,15 +305,15 @@
|
|
|
305
305
|
"generateSubmodules": true
|
|
306
306
|
},
|
|
307
307
|
"dependencies": {
|
|
308
|
-
"@elliemae/ds-banner": "2.2.
|
|
309
|
-
"@elliemae/ds-button": "2.2.
|
|
310
|
-
"@elliemae/ds-grid": "2.2.
|
|
311
|
-
"@elliemae/ds-icons": "2.2.
|
|
312
|
-
"@elliemae/ds-indeterminate-progress-indicator": "2.2.
|
|
313
|
-
"@elliemae/ds-props-helpers": "2.2.
|
|
314
|
-
"@elliemae/ds-system": "2.2.
|
|
315
|
-
"@elliemae/ds-tooltip": "2.2.
|
|
316
|
-
"@elliemae/ds-truncated-tooltip-text": "2.2.
|
|
308
|
+
"@elliemae/ds-banner": "2.2.1",
|
|
309
|
+
"@elliemae/ds-button": "2.2.1",
|
|
310
|
+
"@elliemae/ds-grid": "2.2.1",
|
|
311
|
+
"@elliemae/ds-icons": "2.2.1",
|
|
312
|
+
"@elliemae/ds-indeterminate-progress-indicator": "2.2.1",
|
|
313
|
+
"@elliemae/ds-props-helpers": "2.2.1",
|
|
314
|
+
"@elliemae/ds-system": "2.2.1",
|
|
315
|
+
"@elliemae/ds-tooltip": "2.2.1",
|
|
316
|
+
"@elliemae/ds-truncated-tooltip-text": "2.2.1",
|
|
317
317
|
"prop-types": "~15.7.2",
|
|
318
318
|
"react-desc": "~4.1.2",
|
|
319
319
|
"react-virtual": "~2.3.2"
|
|
@@ -10,6 +10,9 @@ declare const ChatComposer: {
|
|
|
10
10
|
inputValue: {
|
|
11
11
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
12
12
|
};
|
|
13
|
+
ariaMaxLengthMessage: {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
13
16
|
maxLengthMessage: {
|
|
14
17
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
18
|
};
|
|
@@ -50,7 +53,7 @@ declare const ChatComposer: {
|
|
|
50
53
|
defaultProps: ChatComposerProps;
|
|
51
54
|
};
|
|
52
55
|
declare const ChatComposerWithSchema: {
|
|
53
|
-
(props?:
|
|
56
|
+
(props?: unknown): JSX.Element;
|
|
54
57
|
propTypes: unknown;
|
|
55
58
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
56
59
|
};
|
|
@@ -56,7 +56,7 @@ declare const ChatContainer: {
|
|
|
56
56
|
defaultProps: ChatContainerProps;
|
|
57
57
|
};
|
|
58
58
|
declare const ChatContainerWithSchema: {
|
|
59
|
-
(props?:
|
|
59
|
+
(props?: unknown): JSX.Element;
|
|
60
60
|
propTypes: unknown;
|
|
61
61
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
62
62
|
};
|
|
@@ -41,7 +41,7 @@ declare const ChatContainerMessagesList: {
|
|
|
41
41
|
defaultProps: ChatContainerMessagesListProps;
|
|
42
42
|
};
|
|
43
43
|
declare const ChatContainerMessagesListWithSchema: {
|
|
44
|
-
(props?:
|
|
44
|
+
(props?: unknown): JSX.Element;
|
|
45
45
|
propTypes: unknown;
|
|
46
46
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
47
47
|
};
|
|
@@ -14,7 +14,7 @@ declare const ChatEmptyState: {
|
|
|
14
14
|
defaultProps: ChatEmptyStateProps;
|
|
15
15
|
};
|
|
16
16
|
declare const ChatEmptyStateListWithSchema: {
|
|
17
|
-
(props?:
|
|
17
|
+
(props?: unknown): JSX.Element;
|
|
18
18
|
propTypes: unknown;
|
|
19
19
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
20
20
|
};
|
|
@@ -41,7 +41,7 @@ declare const SideBarChat: {
|
|
|
41
41
|
defaultProps: CharSidebarProps;
|
|
42
42
|
};
|
|
43
43
|
declare const SideBarChatWithSchema: {
|
|
44
|
-
(props?:
|
|
44
|
+
(props?: unknown): JSX.Element;
|
|
45
45
|
propTypes: unknown;
|
|
46
46
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
47
47
|
};
|
|
@@ -24,7 +24,7 @@ declare const MessageDelimiter: {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
declare const MessageDelimiterWithSchema: {
|
|
27
|
-
(props?:
|
|
27
|
+
(props?: unknown): JSX.Element;
|
|
28
28
|
propTypes: unknown;
|
|
29
29
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
30
30
|
};
|
|
@@ -16,7 +16,7 @@ declare const SystemMessage: {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
declare const SystemMessageWithSchema: {
|
|
19
|
-
(props?:
|
|
19
|
+
(props?: unknown): JSX.Element;
|
|
20
20
|
propTypes: unknown;
|
|
21
21
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
22
22
|
};
|
|
@@ -68,7 +68,7 @@ declare const TileButton: {
|
|
|
68
68
|
defaultProps: TileButtonProps;
|
|
69
69
|
};
|
|
70
70
|
declare const TileButtonWithSchema: {
|
|
71
|
-
(props?:
|
|
71
|
+
(props?: unknown): JSX.Element;
|
|
72
72
|
propTypes: unknown;
|
|
73
73
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
74
74
|
};
|