pds-dev-kit-web-test 0.0.7 → 0.0.8

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 (104) hide show
  1. package/dist/index.d.ts +4 -4
  2. package/dist/index.js +5 -3
  3. package/dist/src/common/assets/icons/line/Coins.d.ts +4 -0
  4. package/dist/src/common/assets/icons/line/Coins.js +34 -0
  5. package/dist/src/common/assets/icons/line/Home.d.ts +4 -0
  6. package/dist/src/common/assets/icons/line/Home.js +36 -0
  7. package/dist/src/common/assets/icons/line/PostPaperPlane.d.ts +4 -0
  8. package/dist/src/common/assets/icons/line/PostPaperPlane.js +36 -0
  9. package/dist/src/common/assets/icons/line/index.d.ts +3 -0
  10. package/dist/src/common/assets/icons/line/index.js +6 -0
  11. package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +2 -1
  12. package/dist/src/common/styles/colorSet/PaletteColor_light.json +2 -1
  13. package/dist/src/common/styles/colorSet/UIColor.json +16 -1
  14. package/dist/src/common/styles/colorSet/index.d.ts +196 -179
  15. package/dist/src/common/styles/colorSet/index.js +3 -3
  16. package/dist/src/common/styles/colorSet/ui-type.d.ts +15 -0
  17. package/dist/src/common/styles/theme.js +22 -22
  18. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +2 -1
  19. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +6 -6
  20. package/dist/src/desktop/components/AdminList/AdminList.d.ts +17 -11
  21. package/dist/src/desktop/components/AdminList/AdminList.js +5 -28
  22. package/dist/src/desktop/components/AdminList/BulkActionBar.d.ts +4 -1
  23. package/dist/src/desktop/components/AdminList/BulkActionBar.js +4 -4
  24. package/dist/src/desktop/components/AdminListItem/AdminListItem.d.ts +2 -2
  25. package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.js +15 -15
  26. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
  27. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.js +76 -0
  28. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
  29. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
  30. package/dist/src/desktop/components/ChatBubbleListItem/Popup.d.ts +19 -0
  31. package/dist/src/desktop/components/ChatBubbleListItem/Popup.js +238 -0
  32. package/dist/src/desktop/components/ChatBubbleListItem/index.d.ts +1 -0
  33. package/dist/src/desktop/components/ChatBubbleListItem/index.js +8 -0
  34. package/dist/src/desktop/components/ChatList/Body.d.ts +4 -4
  35. package/dist/src/desktop/components/ChatList/Body.js +38 -19
  36. package/dist/src/desktop/components/ChatList/ChatList.d.ts +22 -1
  37. package/dist/src/desktop/components/ChatList/ChatList.js +20 -8
  38. package/dist/src/desktop/components/ChatList/ChatTextField.d.ts +22 -4
  39. package/dist/src/desktop/components/ChatList/ChatTextField.js +24 -6
  40. package/dist/src/desktop/components/ChatList/Footer.d.ts +21 -3
  41. package/dist/src/desktop/components/ChatList/Footer.js +2 -2
  42. package/dist/src/desktop/components/ChatList/Header.d.ts +2 -2
  43. package/dist/src/desktop/components/ChatList/Header.js +6 -3
  44. package/dist/src/desktop/components/ChatList/useAutoScrollToBottom.js +7 -2
  45. package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +41 -47
  46. package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +1 -1
  47. package/dist/src/desktop/components/Dropdown/Dropdown.js +23 -8
  48. package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuItemNav.js +1 -1
  49. package/dist/src/desktop/components/FilterBar/FilterBar.js +1 -1
  50. package/dist/src/desktop/components/TextField/TextField.d.ts +2 -1
  51. package/dist/src/desktop/components/TextField/TextField.js +7 -7
  52. package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.js +4 -1
  53. package/dist/src/desktop/components/index.d.ts +2 -1
  54. package/dist/src/desktop/components/index.js +3 -1
  55. package/dist/src/desktop/index.d.ts +2 -2
  56. package/dist/src/desktop/index.js +3 -2
  57. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
  58. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.js +5 -4
  59. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTN.d.ts +3 -2
  60. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTN.js +2 -2
  61. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTQ.js +1 -1
  62. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.d.ts +13 -0
  63. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.js +96 -0
  64. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.d.ts +1 -0
  65. package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.js +3 -1
  66. package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.d.ts +1 -1
  67. package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.js +8 -4
  68. package/dist/src/desktop/panels/DesktopBasicModal/DesktopBasicModal.js +7 -4
  69. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +2 -1
  70. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +6 -6
  71. package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.js +15 -15
  72. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
  73. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.js +76 -0
  74. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
  75. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
  76. package/dist/src/mobile/components/ChatBubbleListItem/Popup.d.ts +19 -0
  77. package/dist/src/mobile/components/ChatBubbleListItem/Popup.js +238 -0
  78. package/dist/src/mobile/components/ChatBubbleListItem/index.d.ts +1 -0
  79. package/dist/src/mobile/components/ChatBubbleListItem/index.js +8 -0
  80. package/dist/src/mobile/components/ChatList/Body.d.ts +4 -4
  81. package/dist/src/mobile/components/ChatList/Body.js +47 -32
  82. package/dist/src/mobile/components/ChatList/ChatList.d.ts +22 -1
  83. package/dist/src/mobile/components/ChatList/ChatList.js +20 -8
  84. package/dist/src/mobile/components/ChatList/ChatTextField.d.ts +22 -4
  85. package/dist/src/mobile/components/ChatList/ChatTextField.js +24 -6
  86. package/dist/src/mobile/components/ChatList/Footer.d.ts +21 -3
  87. package/dist/src/mobile/components/ChatList/Footer.js +2 -2
  88. package/dist/src/mobile/components/ChatList/Header.d.ts +2 -2
  89. package/dist/src/mobile/components/ChatList/Header.js +6 -3
  90. package/dist/src/mobile/components/ChatList/useAutoScrollToBottom.js +7 -2
  91. package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +1 -1
  92. package/dist/src/mobile/components/Dropdown/Dropdown.js +23 -8
  93. package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.d.ts +2 -1
  94. package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +23 -13
  95. package/dist/src/mobile/components/TextField/TextField.d.ts +2 -1
  96. package/dist/src/mobile/components/TextField/TextField.js +7 -7
  97. package/dist/src/mobile/components/index.d.ts +2 -1
  98. package/dist/src/mobile/components/index.js +3 -1
  99. package/dist/src/mobile/index.d.ts +2 -2
  100. package/dist/src/mobile/index.js +2 -1
  101. package/package.json +1 -1
  102. package/release-note.md +3 -2
  103. package/dist/src/mobile/components/ChatList/useTimeout.d.ts +0 -6
  104. package/dist/src/mobile/components/ChatList/useTimeout.js +0 -11
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Popup = exports.PopupProvider = void 0;
30
+ var react_1 = __importStar(require("react"));
31
+ var react_dom_1 = require("react-dom");
32
+ var styled_components_1 = __importDefault(require("styled-components"));
33
+ var PopupContext = (0, react_1.createContext)({
34
+ current: null
35
+ });
36
+ function getHAutoPlacement(_a) {
37
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
38
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
39
+ var topSpaced = targetRect.bottom + popupRect.height > window.innerHeight;
40
+ return (leftSpaced ? 'left' : 'right') + "-" + (topSpaced ? 'end' : 'start');
41
+ }
42
+ function getVAutoPlacement(_a) {
43
+ var targetRect = _a.targetRect, popupRect = _a.popupRect, wrapperHeight = _a.wrapperHeight;
44
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
45
+ var topSpaced = targetRect.bottom + popupRect.height > (wrapperHeight || window.innerWidth);
46
+ return (topSpaced ? 'top' : 'bottom') + "-" + (leftSpaced ? 'end' : 'start');
47
+ }
48
+ function getVCenterPlacement(_a) {
49
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
50
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
51
+ return leftSpaced ? 'left-center' : 'right-center';
52
+ }
53
+ function getHCenterPlacement(_a) {
54
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
55
+ var topSpaced = targetRect.bottom + popupRect.height > window.innerHeight;
56
+ return topSpaced ? 'top-center' : 'bottom-center';
57
+ }
58
+ /**
59
+ * 위치 정규화
60
+ */
61
+ function getNormalizedPlacement(_a) {
62
+ var placement = _a.placement, targetRect = _a.targetRect, popupRect = _a.popupRect, wrapperHeight = _a.wrapperHeight;
63
+ switch (placement) {
64
+ case 'v-auto':
65
+ return getVAutoPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
66
+ case 'h-auto':
67
+ return getHAutoPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
68
+ case 'v-center':
69
+ return getVCenterPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
70
+ case 'h-center':
71
+ return getHCenterPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
72
+ default:
73
+ return placement;
74
+ }
75
+ }
76
+ function updatePosition(_a) {
77
+ var targetElem = _a.targetElem, popupElem = _a.popupElem, placement = _a.placement, wrapperHeight = _a.wrapperHeight;
78
+ var targetRect = targetElem.getBoundingClientRect();
79
+ var popupRect = popupElem.getBoundingClientRect();
80
+ var normPlacement = getNormalizedPlacement({ placement: placement, targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
81
+ switch (normPlacement) {
82
+ case 'top':
83
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
84
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
85
+ popupElem.style.width = 'auto';
86
+ break;
87
+ case 'top-start':
88
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
89
+ popupElem.style.left = targetRect.left + "px";
90
+ popupElem.style.width = 'auto';
91
+ break;
92
+ case 'top-end':
93
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
94
+ popupElem.style.left = targetRect.left + targetRect.width - popupRect.width + "px";
95
+ popupElem.style.width = 'auto';
96
+ break;
97
+ case 'top-both':
98
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
99
+ popupElem.style.left = targetRect.left + "px";
100
+ popupElem.style.width = targetRect.width + "px";
101
+ break;
102
+ case 'top-center':
103
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
104
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
105
+ popupElem.style.width = 'auto';
106
+ break;
107
+ case 'bottom':
108
+ popupElem.style.top = targetRect.bottom + "px";
109
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
110
+ popupElem.style.width = 'auto';
111
+ break;
112
+ case 'bottom-start':
113
+ popupElem.style.top = targetRect.bottom + "px";
114
+ popupElem.style.left = targetRect.left + "px";
115
+ popupElem.style.width = 'auto';
116
+ break;
117
+ case 'bottom-end':
118
+ popupElem.style.top = targetRect.bottom + "px";
119
+ popupElem.style.left = targetRect.right - popupRect.width + "px";
120
+ popupElem.style.width = 'auto';
121
+ break;
122
+ case 'bottom-both':
123
+ popupElem.style.top = targetRect.bottom + "px";
124
+ popupElem.style.left = targetRect.left + "px";
125
+ popupElem.style.width = targetRect.width + "px";
126
+ break;
127
+ case 'bottom-center':
128
+ popupElem.style.top = targetRect.bottom + "px";
129
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
130
+ popupElem.style.width = 'auto';
131
+ break;
132
+ case 'left':
133
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
134
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
135
+ popupElem.style.width = 'auto';
136
+ break;
137
+ case 'left-start':
138
+ popupElem.style.top = targetRect.top + "px";
139
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
140
+ popupElem.style.width = 'auto';
141
+ break;
142
+ case 'left-end':
143
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) + "px";
144
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
145
+ popupElem.style.width = 'auto';
146
+ break;
147
+ case 'left-center':
148
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
149
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
150
+ popupElem.style.width = 'auto';
151
+ break;
152
+ case 'right':
153
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
154
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
155
+ popupElem.style.width = 'auto';
156
+ break;
157
+ case 'right-start':
158
+ popupElem.style.top = targetRect.top + "px";
159
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
160
+ popupElem.style.width = 'auto';
161
+ break;
162
+ case 'right-end':
163
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) + "px";
164
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
165
+ popupElem.style.width = 'auto';
166
+ break;
167
+ case 'right-center':
168
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
169
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
170
+ popupElem.style.width = 'auto';
171
+ break;
172
+ default:
173
+ break;
174
+ }
175
+ return normPlacement;
176
+ }
177
+ function Popup(_a) {
178
+ var targetRef = _a.targetRef, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, onClickOutside = _a.onClickOutside, onClick = _a.onClick, _c = _a.placement, placement = _c === void 0 ? 'bottom-start' : _c, wrapperHeight = _a.wrapperHeight, children = _a.children;
179
+ var popupRootRef = (0, react_1.useContext)(PopupContext);
180
+ var _d = (0, react_1.useState)('bottom'), normPlacement = _d[0], setNormPlacement = _d[1];
181
+ var popupRef = (0, react_1.useRef)(null);
182
+ /**
183
+ * 팝업 외의 다른 요소 클릭시 팝업이 닫히도록 합니다.
184
+ */
185
+ (0, react_1.useEffect)(function () {
186
+ function handleClickOutside(e) {
187
+ if (popupRootRef.current && !popupRootRef.current.contains(e.target)) {
188
+ if (onClickOutside) {
189
+ onClickOutside();
190
+ }
191
+ }
192
+ }
193
+ window.document.addEventListener('mousedown', handleClickOutside);
194
+ return function () {
195
+ window.document.removeEventListener('mousedown', handleClickOutside);
196
+ };
197
+ }, [popupRootRef, onClickOutside]);
198
+ /**
199
+ * 전체 UI 렌더링이 한 프레임 완료된 후에 팝업 위치를 결정합니다.
200
+ */
201
+ (0, react_1.useEffect)(function () {
202
+ window.requestAnimationFrame(function () {
203
+ if (!targetRef.current || !popupRef.current) {
204
+ return;
205
+ }
206
+ var targetElem = targetRef.current;
207
+ var popupElem = popupRef.current;
208
+ var updatedPlacement = updatePosition({ targetElem: targetElem, popupElem: popupElem, placement: placement, wrapperHeight: wrapperHeight });
209
+ setNormPlacement(updatedPlacement);
210
+ });
211
+ }, [isOpen, placement, wrapperHeight, targetRef, popupRef]);
212
+ function handlePopupClick(e) {
213
+ e.stopPropagation();
214
+ if (onClick) {
215
+ onClick(e);
216
+ }
217
+ }
218
+ if (!popupRootRef || !popupRootRef.current || !isOpen) {
219
+ return react_1.default.createElement(react_1.default.Fragment, null);
220
+ }
221
+ var popupComponent = (react_1.default.createElement(S_Popup, { ref: popupRef, onClick: function (e) { return handlePopupClick(e); } }, typeof children === 'function' ? children(normPlacement) : children));
222
+ return (0, react_dom_1.createPortal)(popupComponent, popupRootRef.current);
223
+ }
224
+ exports.Popup = Popup;
225
+ var S_Popup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n left: -1000px;\n position: fixed;\n top: -1000px;\n z-index: 1000;\n"], ["\n left: -1000px;\n position: fixed;\n top: -1000px;\n z-index: 1000;\n"])));
226
+ /**
227
+ * 팝업 루트 프로바이더
228
+ * 팝업을 사용하기 위해서는 팝업 프로바이더가 상위 컴포넌트로 있어야 합니다.
229
+ */
230
+ function PopupProvider(_a) {
231
+ var children = _a.children;
232
+ var ref = (0, react_1.useRef)();
233
+ return (react_1.default.createElement(react_1.default.Fragment, null,
234
+ react_1.default.createElement(PopupContext.Provider, { value: ref }, children),
235
+ react_1.default.createElement("div", { ref: ref })));
236
+ }
237
+ exports.PopupProvider = PopupProvider;
238
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { default as ChatBubbleListItem } from './ChatBubbleListItem';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ChatBubbleListItem = void 0;
7
+ var ChatBubbleListItem_1 = require("./ChatBubbleListItem");
8
+ Object.defineProperty(exports, "ChatBubbleListItem", { enumerable: true, get: function () { return __importDefault(ChatBubbleListItem_1).default; } });
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { Props as ChatListProps } from './ChatList';
3
- declare type Props = Pick<ChatListProps, 'scrollVisibleType' | 'children' | 'bodyMBtnText'> & {
3
+ declare const Body: React.ForwardRefExoticComponent<Pick<ChatListProps, "children" | "scrollVisibleType" | "bodyMBtnText" | "bodySpacingMode"> & {
4
4
  isSubmitted: boolean;
5
- };
6
- declare function Body({ scrollVisibleType, children, isSubmitted, bodyMBtnText }: Props): JSX.Element;
5
+ callBackAfterScrollToBottom: () => void;
6
+ } & React.RefAttributes<HTMLDivElement>>;
7
7
  export default Body;
@@ -30,26 +30,34 @@ var react_1 = __importStar(require("react"));
30
30
  var styled_components_1 = __importStar(require("styled-components"));
31
31
  var MainButton_1 = require("../MainButton");
32
32
  var useAutoScrollToBottom_1 = __importDefault(require("./useAutoScrollToBottom"));
33
- function Body(_a) {
34
- var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyMBtnText = _a.bodyMBtnText;
33
+ var Body = react_1.default.forwardRef(function (_a, ref) {
34
+ var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyMBtnText = _a.bodyMBtnText, bodySpacingMode = _a.bodySpacingMode, callBackAfterScrollToBottom = _a.callBackAfterScrollToBottom;
35
35
  var _b = (0, react_1.useState)(false), isButtonShow = _b[0], setIsButtonShow = _b[1];
36
36
  var _c = (0, useAutoScrollToBottom_1.default)(), triggerScrollToBottom = _c.triggerScrollToBottom, EndOfList = _c.EndOfList;
37
- var scrollRef = (0, react_1.useRef)(null);
38
- var childrenLength = react_1.default.Children.count(children);
39
37
  /**
40
- * @when 스크롤하지 않은 상태에서 chatMessages가 업데이트 될 때마다
38
+ * @when 페이지 진입
41
39
  * @expected 채팅 리스트의 맨 밑으로 스크롤 내린다.
42
40
  * @clear -
43
41
  */
44
42
  (0, react_1.useEffect)(function () {
45
- if (isButtonShow) {
43
+ if (!isButtonShow) {
44
+ triggerScrollToBottom();
45
+ }
46
+ }, [children, isButtonShow, triggerScrollToBottom]);
47
+ /**
48
+ * @when 스크롤을 하고 있지 않은 상황에서 chatMessages가 업데이트 될 때마다
49
+ * @expected 채팅 리스트의 맨 밑으로 스크롤 내린다.
50
+ * @clear -
51
+ */
52
+ (0, react_1.useEffect)(function () {
53
+ var handleTriggerScroll = function () {
46
54
  if (isSubmitted) {
55
+ callBackAfterScrollToBottom();
47
56
  triggerScrollToBottom();
48
57
  }
49
- return;
50
- }
51
- triggerScrollToBottom();
52
- }, [childrenLength, isButtonShow, isSubmitted]);
58
+ };
59
+ setTimeout(function () { return handleTriggerScroll(); }, 0);
60
+ }, [children, isButtonShow, isSubmitted, callBackAfterScrollToBottom]);
53
61
  var handleClickMBtn = function () {
54
62
  triggerScrollToBottom();
55
63
  };
@@ -61,17 +69,27 @@ function Body(_a) {
61
69
  }
62
70
  setIsButtonShow(true);
63
71
  };
64
- return (react_1.default.createElement(S_Body, null,
65
- react_1.default.createElement(S_ChatMessageBox, { id: "chatMessageBox", onScroll: handleScroll, ref: scrollRef, scrollVisibleType: scrollVisibleType },
72
+ return (react_1.default.createElement(S_Body, { bodySpacingMode: bodySpacingMode },
73
+ react_1.default.createElement(S_ChatMessageBox, { id: "chatMessageBox", onScroll: handleScroll, scrollVisibleType: scrollVisibleType, ref: ref },
66
74
  children,
67
75
  react_1.default.createElement(EndOfList, null)),
68
76
  isButtonShow && (react_1.default.createElement(S_BottomButtonWrapper, null,
69
77
  react_1.default.createElement(MainButton_1.MainButton, { text: bodyMBtnText, size: "small", onClick: handleClickMBtn })))));
70
- }
71
- var S_Body = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n"], ["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n"])));
72
- var scrollVisibleStyle = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n display: block;\n }\n"], ["\n ::-webkit-scrollbar {\n display: block;\n }\n"])));
73
- var scrollHiddenStyle = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n"], ["\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n"])));
74
- var S_ChatMessageBox = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 100%;\n overflow-y: auto;\n\n ", "\n"], ["\n height: 100%;\n overflow-y: auto;\n\n ", "\n"])), function (_a) {
78
+ });
79
+ var bodySpacing = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n padding-right: ", ";\n padding-left: ", ";\n"], ["\n box-sizing: border-box;\n padding-right: ", ";\n padding-left: ", ";\n"])), function (_a) {
80
+ var theme = _a.theme;
81
+ return theme.spacing.spacingE;
82
+ }, function (_a) {
83
+ var theme = _a.theme;
84
+ return theme.spacing.spacingE;
85
+ });
86
+ var S_Body = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n\n ", ";\n"], ["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n\n ", ";\n"])), function (_a) {
87
+ var bodySpacingMode = _a.bodySpacingMode;
88
+ return bodySpacingMode === 'use' && bodySpacing;
89
+ });
90
+ var scrollVisibleStyle = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n display: block;\n }\n"], ["\n ::-webkit-scrollbar {\n display: block;\n }\n"])));
91
+ var scrollHiddenStyle = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n"], ["\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n"])));
92
+ var S_ChatMessageBox = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 100%;\n overflow-y: auto;\n\n ", "\n"], ["\n height: 100%;\n overflow-y: auto;\n\n ", "\n"])), function (_a) {
75
93
  var scrollVisibleType = _a.scrollVisibleType;
76
94
  if (!scrollVisibleType || scrollVisibleType === 'moving') {
77
95
  return;
@@ -81,9 +99,10 @@ var S_ChatMessageBox = styled_components_1.default.div(templateObject_4 || (temp
81
99
  hidden: scrollHiddenStyle
82
100
  }[scrollVisibleType];
83
101
  });
84
- var S_BottomButtonWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"], ["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"])), function (_a) {
102
+ var S_BottomButtonWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"], ["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"])), function (_a) {
85
103
  var theme = _a.theme;
86
104
  return theme.spacing.spacingC;
87
105
  });
88
106
  exports.default = Body;
89
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
107
+ Body.displayName = 'Body';
108
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -4,7 +4,9 @@ export declare type Props = {
4
4
  styleTheme?: 'solid' | 'translucent' | 'transparent';
5
5
  headerMode?: 'none' | 'use';
6
6
  titleText?: PDSTextType;
7
+ descText?: PDSTextType;
7
8
  captionText?: PDSTextType;
9
+ titleStyleTheme?: 'headingBold' | 'subTitleBold';
8
10
  headerDisplayType?: 'none' | 'ibtn1';
9
11
  headerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
10
12
  headerIBtn1IconFillType?: 'line' | 'fill';
@@ -17,8 +19,27 @@ export declare type Props = {
17
19
  footerChildren?: React.ReactNode;
18
20
  submitIBtnState?: 'disabled' | 'normal';
19
21
  bodyMBtnText?: PDSTextType;
22
+ bodySpacingMode?: 'none' | 'use';
23
+ submitIBtnIconName?: FillIconNameKeys | LineIconNameKeys;
24
+ submitIBtnIconFillType?: 'fill' | 'line';
25
+ footerIBtn1State?: 'disabled' | 'normal';
26
+ footerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
27
+ footerIBtn1IconFillType?: 'fill' | 'line';
28
+ footerIBtn1Type?: 'button' | 'upload';
29
+ onClickFooterIBtn1?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
30
+ footerIBtn2State?: 'disabled' | 'normal';
31
+ footerIBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
32
+ footerIBtn2IconFillType?: 'fill' | 'line';
33
+ footerIBtn2Type?: 'button' | 'upload';
34
+ onClickFooterIBtn2?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
35
+ footerIBtn3State?: 'disabled' | 'normal';
36
+ footerIBtn3IconName?: FillIconNameKeys | LineIconNameKeys;
37
+ footerIBtn3IconFillType?: 'fill' | 'line';
38
+ footerIBtn3Type?: 'button' | 'upload';
39
+ footerIBtn3Accept?: string;
40
+ onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
20
41
  onSubmit: (value: string) => void;
21
42
  onClickHeaderIBtn1?: () => void;
22
43
  };
23
- declare function ChatList({ styleTheme, headerMode, titleText, captionText, headerDisplayType, headerIBtn1IconName, headerIBtn1IconFillType, children, textFieldState, textFieldHintText, textFieldDefaultText, textFieldMaxLength, scrollVisibleType, footerChildren, submitIBtnState, bodyMBtnText, onSubmit, onClickHeaderIBtn1 }: Props): JSX.Element;
44
+ declare const ChatList: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
24
45
  export default ChatList;
@@ -49,15 +49,25 @@ var baseBackgroundColors = {
49
49
  translucent: 'ui_cpnt_list_base_area_translucent',
50
50
  transparent: 'ui_cpnt_list_base_area_translucent'
51
51
  };
52
- function ChatList(_a) {
53
- var _b = _a.styleTheme, styleTheme = _b === void 0 ? 'solid' : _b, _c = _a.headerMode, headerMode = _c === void 0 ? 'use' : _c, titleText = _a.titleText, captionText = _a.captionText, _d = _a.headerDisplayType, headerDisplayType = _d === void 0 ? 'none' : _d, _e = _a.headerIBtn1IconName, headerIBtn1IconName = _e === void 0 ? 'ic_xmark' : _e, _f = _a.headerIBtn1IconFillType, headerIBtn1IconFillType = _f === void 0 ? 'line' : _f, children = _a.children, _g = _a.textFieldState, textFieldState = _g === void 0 ? 'normal' : _g, textFieldHintText = _a.textFieldHintText, textFieldDefaultText = _a.textFieldDefaultText, textFieldMaxLength = _a.textFieldMaxLength, _h = _a.scrollVisibleType, scrollVisibleType = _h === void 0 ? 'moving' : _h, footerChildren = _a.footerChildren, submitIBtnState = _a.submitIBtnState, bodyMBtnText = _a.bodyMBtnText, onSubmit = _a.onSubmit, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1;
52
+ var ChatList = react_1.default.forwardRef(function (_a, ref) {
53
+ var _b = _a.styleTheme, styleTheme = _b === void 0 ? 'solid' : _b, _c = _a.headerMode, headerMode = _c === void 0 ? 'use' : _c, titleText = _a.titleText, descText = _a.descText, captionText = _a.captionText, _d = _a.titleStyleTheme, titleStyleTheme = _d === void 0 ? 'subTitleBold' : _d, _e = _a.headerDisplayType, headerDisplayType = _e === void 0 ? 'none' : _e, _f = _a.headerIBtn1IconName, headerIBtn1IconName = _f === void 0 ? 'ic_xmark' : _f, _g = _a.headerIBtn1IconFillType, headerIBtn1IconFillType = _g === void 0 ? 'line' : _g, children = _a.children, _h = _a.textFieldState, textFieldState = _h === void 0 ? 'normal' : _h, textFieldHintText = _a.textFieldHintText, textFieldDefaultText = _a.textFieldDefaultText, textFieldMaxLength = _a.textFieldMaxLength, _j = _a.scrollVisibleType, scrollVisibleType = _j === void 0 ? 'moving' : _j, footerChildren = _a.footerChildren, _k = _a.submitIBtnState, submitIBtnState = _k === void 0 ? 'normal' : _k, bodyMBtnText = _a.bodyMBtnText, _l = _a.bodySpacingMode, bodySpacingMode = _l === void 0 ? 'none' : _l, onSubmit = _a.onSubmit, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1, submitIBtnIconName = _a.submitIBtnIconName, submitIBtnIconFillType = _a.submitIBtnIconFillType, _m = _a.footerIBtn1State, footerIBtn1State = _m === void 0 ? 'normal' : _m, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, _o = _a.footerIBtn1Type, footerIBtn1Type = _o === void 0 ? 'button' : _o, onClickFooterIBtn1 = _a.onClickFooterIBtn1, _p = _a.footerIBtn2State, footerIBtn2State = _p === void 0 ? 'normal' : _p, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, _q = _a.footerIBtn2Type, footerIBtn2Type = _q === void 0 ? 'button' : _q, onClickFooterIBtn2 = _a.onClickFooterIBtn2, _r = _a.footerIBtn3State, footerIBtn3State = _r === void 0 ? 'normal' : _r, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, _s = _a.footerIBtn3Type, footerIBtn3Type = _s === void 0 ? 'button' : _s, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
54
54
  var methods = (0, react_hook_form_1.useForm)({
55
55
  mode: 'onChange',
56
56
  defaultValues: {
57
57
  chat: ''
58
58
  }
59
59
  });
60
- var reset = methods.reset, handleSubmit = methods.handleSubmit, control = methods.control, _j = methods.formState, isSubmitted = _j.isSubmitted, isDirty = _j.isDirty, isValid = _j.isValid;
60
+ var reset = methods.reset, handleSubmit = methods.handleSubmit, control = methods.control, _t = methods.formState, isDirty = _t.isDirty, isValid = _t.isValid, isSubmitSuccessful = _t.isSubmitSuccessful;
61
+ /**
62
+ * @when 폼 submit이 성공적으로 완료 되었을 때
63
+ * @expected 폼을 초기화합니다.
64
+ * @clear -
65
+ */
66
+ (0, react_1.useEffect)(function () {
67
+ if (isSubmitSuccessful) {
68
+ reset();
69
+ }
70
+ }, [isSubmitSuccessful]);
61
71
  var inputValue = (0, react_hook_form_1.useWatch)({ name: 'chat', control: control });
62
72
  var isSubmitButtonActive = (0, react_1.useMemo)(function () {
63
73
  if (!submitIBtnState) {
@@ -71,20 +81,22 @@ function ChatList(_a) {
71
81
  return;
72
82
  }
73
83
  onSubmit(chat);
74
- reset({ chat: '' });
84
+ };
85
+ var callBackAfterScrollToBottom = function () {
86
+ reset();
75
87
  };
76
88
  return (react_1.default.createElement(S_ChatList, { backgroundColor: baseBackgroundColors[styleTheme], id: "chatList" },
77
89
  headerMode === 'use' && (react_1.default.createElement(react_1.default.Fragment, null,
78
- react_1.default.createElement(Header_1.default, { styleTheme: styleTheme, titleText: titleText, captionText: captionText, headerDisplayType: headerDisplayType, headerIBtn1IconName: headerIBtn1IconName, headerIBtn1IconFillType: headerIBtn1IconFillType, onClickHeaderIBtn1: onClickHeaderIBtn1 }),
90
+ react_1.default.createElement(Header_1.default, { styleTheme: styleTheme, titleText: titleText, descText: descText, captionText: captionText, titleStyleTheme: titleStyleTheme, headerDisplayType: headerDisplayType, headerIBtn1IconName: headerIBtn1IconName, headerIBtn1IconFillType: headerIBtn1IconFillType, onClickHeaderIBtn1: onClickHeaderIBtn1 }),
79
91
  react_1.default.createElement(hybrid_1.Divider, null))),
80
- react_1.default.createElement(Body_1.default, { scrollVisibleType: scrollVisibleType, isSubmitted: isSubmitted, bodyMBtnText: bodyMBtnText }, children),
92
+ react_1.default.createElement(Body_1.default, { scrollVisibleType: scrollVisibleType, isSubmitted: isSubmitSuccessful, bodyMBtnText: bodyMBtnText, bodySpacingMode: bodySpacingMode, callBackAfterScrollToBottom: callBackAfterScrollToBottom, ref: ref }, children),
81
93
  react_1.default.createElement(hybrid_1.Divider, null),
82
94
  react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
83
95
  react_1.default.createElement(react_hook_form_1.FormProvider, __assign({}, methods),
84
96
  react_1.default.createElement("form", { onSubmit: handleSubmit(handleSubmitChat) },
85
- react_1.default.createElement(Footer_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, footerChildren: footerChildren, isSubmitBtnActive: isSubmitButtonActive }))),
97
+ react_1.default.createElement(Footer_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, footerChildren: footerChildren, isSubmitBtnActive: isSubmitButtonActive, submitIBtnIconName: submitIBtnIconName, submitIBtnIconFillType: submitIBtnIconFillType, footerIBtn1State: footerIBtn1State, footerIBtn1IconName: footerIBtn1IconName, footerIBtn1IconFillType: footerIBtn1IconFillType, footerIBtn1Type: footerIBtn1Type, onClickFooterIBtn1: onClickFooterIBtn1, footerIBtn2State: footerIBtn2State, footerIBtn2IconName: footerIBtn2IconName, footerIBtn2IconFillType: footerIBtn2IconFillType, footerIBtn2Type: footerIBtn2Type, onClickFooterIBtn2: onClickFooterIBtn2, footerIBtn3State: footerIBtn3State, footerIBtn3IconName: footerIBtn3IconName, footerIBtn3IconFillType: footerIBtn3IconFillType, footerIBtn3Type: footerIBtn3Type, footerIBtn3Accept: footerIBtn3Accept, onClickFooterIBtn3: onClickFooterIBtn3 }))),
86
98
  react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" })));
87
- }
99
+ });
88
100
  var S_ChatList = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n"], ["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n"])), function (_a) {
89
101
  var backgroundColor = _a.backgroundColor, theme = _a.theme;
90
102
  return theme[backgroundColor];
@@ -1,7 +1,25 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
+ import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
2
3
  import type { Props as ChatListProps } from './ChatList';
3
- declare type Props = Pick<ChatListProps, 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength'> & {
4
- isSubmitBtnActive: boolean;
4
+ declare type Props = Pick<ChatListProps, 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength' | 'footerIBtn3Accept'> & {
5
+ isSubmitBtnActive?: boolean;
6
+ submitIBtnIconName?: FillIconNameKeys | LineIconNameKeys;
7
+ submitIBtnIconFillType?: 'fill' | 'line';
8
+ footerIBtn1State?: 'disabled' | 'normal';
9
+ footerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
10
+ footerIBtn1IconFillType?: 'fill' | 'line';
11
+ footerIBtn1Type?: 'button' | 'upload';
12
+ onClickFooterIBtn1?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ footerIBtn2State?: 'disabled' | 'normal';
14
+ footerIBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
15
+ footerIBtn2IconFillType?: 'fill' | 'line';
16
+ footerIBtn2Type?: 'button' | 'upload';
17
+ onClickFooterIBtn2?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
18
+ footerIBtn3State?: 'disabled' | 'normal';
19
+ footerIBtn3IconName?: FillIconNameKeys | LineIconNameKeys;
20
+ footerIBtn3IconFillType?: 'fill' | 'line';
21
+ footerIBtn3Type?: 'button' | 'upload';
22
+ onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
5
23
  };
6
- declare function ChatTextField({ textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, isSubmitBtnActive }: Props): JSX.Element;
24
+ declare function ChatTextField({ textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, isSubmitBtnActive, submitIBtnIconName, submitIBtnIconFillType, footerIBtn1State, footerIBtn1IconName, footerIBtn1IconFillType, footerIBtn1Type, onClickFooterIBtn1, footerIBtn2State, footerIBtn2IconName, footerIBtn2IconFillType, footerIBtn2Type, onClickFooterIBtn2, footerIBtn3State, footerIBtn3IconName, footerIBtn3IconFillType, footerIBtn3Type, footerIBtn3Accept, onClickFooterIBtn3 }: Props): JSX.Element;
7
25
  export default ChatTextField;
@@ -11,8 +11,9 @@ var react_1 = __importDefault(require("react"));
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var IconButton_1 = require("../IconButton");
13
13
  var TextField_1 = require("../TextField");
14
+ var UploadIconButton_1 = require("../UploadIconButton");
14
15
  function ChatTextField(_a) {
15
- var textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, isSubmitBtnActive = _a.isSubmitBtnActive;
16
+ var textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, isSubmitBtnActive = _a.isSubmitBtnActive, _b = _a.submitIBtnIconName, submitIBtnIconName = _b === void 0 ? 'ic_paper_plane' : _b, _c = _a.submitIBtnIconFillType, submitIBtnIconFillType = _c === void 0 ? 'fill' : _c, footerIBtn1State = _a.footerIBtn1State, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, footerIBtn1Type = _a.footerIBtn1Type, onClickFooterIBtn1 = _a.onClickFooterIBtn1, footerIBtn2State = _a.footerIBtn2State, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, footerIBtn2Type = _a.footerIBtn2Type, onClickFooterIBtn2 = _a.onClickFooterIBtn2, footerIBtn3State = _a.footerIBtn3State, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, footerIBtn3Type = _a.footerIBtn3Type, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
16
17
  var chatValidation = {
17
18
  validate: function (value) {
18
19
  if (!value)
@@ -21,14 +22,31 @@ function ChatTextField(_a) {
21
22
  }
22
23
  };
23
24
  return (react_1.default.createElement(react_1.default.Fragment, null,
24
- react_1.default.createElement(S_FooterContentWrapper, null,
25
+ react_1.default.createElement(S_FooterContentWrapper, { footerIBtn2IconName: footerIBtn2IconName, footerIBtn3IconName: footerIBtn3IconName },
26
+ footerIBtn3IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn3Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn3IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn3State === 'normal'
27
+ ? 'ui_cpnt_button_icon_primary'
28
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn3IconFillType, iconSize: 24, state: footerIBtn3State, onClick: onClickFooterIBtn3 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn3IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn3State === 'normal'
29
+ ? 'ui_cpnt_button_icon_primary'
30
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn3IconFillType, iconSize: 24, state: footerIBtn3State, onClick: onClickFooterIBtn3, accept: footerIBtn3Accept })))),
31
+ footerIBtn2IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn2Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn2IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn2State === 'normal'
32
+ ? 'ui_cpnt_button_icon_primary'
33
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn2IconFillType, iconSize: 24, state: footerIBtn2State, onClick: onClickFooterIBtn2 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn2IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn2State === 'normal'
34
+ ? 'ui_cpnt_button_icon_primary'
35
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn2IconFillType, iconSize: 24, state: footerIBtn2State, onClick: onClickFooterIBtn2 })))),
25
36
  react_1.default.createElement(S_TextFieldWrapper, null,
26
- react_1.default.createElement(TextField_1.TextField, { name: "chat", responsiveMode: "use", textLineType: "single", inputType: "text", hintText: textFieldHintText, defaultText: textFieldDefaultText, validation: chatValidation, maxLength: textFieldMaxLength, enterSubmitMode: "use", validationPoint: "onChange", state: textFieldState })),
27
- react_1.default.createElement(IconButton_1.IconButton, { iconName: "ic_paper_plane", baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: isSubmitBtnActive ? 'ui_cpnt_button_icon_primary' : 'ui_cpnt_button_icon_disabled', iconSize: 24, type: "submit", state: isSubmitBtnActive ? 'normal' : 'disabled' }))));
37
+ react_1.default.createElement(TextField_1.TextField, { name: "chat", responsiveMode: "use", textLineType: "single", inputType: "text", hintText: textFieldHintText, defaultText: textFieldDefaultText, validation: chatValidation, maxLength: textFieldMaxLength, enterSubmitMode: "use", validationPoint: "onChange", state: textFieldState, autoComplete: "off" })),
38
+ footerIBtn1IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn1Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn1State === 'normal'
39
+ ? 'ui_cpnt_button_icon_primary'
40
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn1IconFillType, iconSize: 24, state: footerIBtn1State, onClick: onClickFooterIBtn1 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn1State === 'normal'
41
+ ? 'ui_cpnt_button_icon_primary'
42
+ : 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn1IconFillType, iconSize: 24, state: footerIBtn1State, onClick: onClickFooterIBtn1 })))),
43
+ react_1.default.createElement(IconButton_1.IconButton, { iconName: submitIBtnIconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: isSubmitBtnActive ? 'ui_cpnt_button_icon_primary' : 'ui_cpnt_button_icon_disabled', iconFillType: submitIBtnIconFillType, iconSize: 24, type: "submit", state: isSubmitBtnActive ? 'normal' : 'disabled' }))));
28
44
  }
29
45
  var S_FooterContentWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
30
- var theme = _a.theme;
31
- return theme.spacing.spacingE;
46
+ var theme = _a.theme, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn3IconName = _a.footerIBtn3IconName;
47
+ return footerIBtn2IconName || footerIBtn3IconName
48
+ ? "" + theme.spacing.spacingC
49
+ : "" + theme.spacing.spacingE;
32
50
  }, function (_a) {
33
51
  var theme = _a.theme;
34
52
  return theme.spacing.spacingC;
@@ -1,7 +1,25 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
+ import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
2
3
  import type { Props as ChatListProps } from './ChatList';
3
- declare type Props = Pick<ChatListProps, 'footerChildren' | 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength'> & {
4
+ declare type Props = Pick<ChatListProps, 'footerChildren' | 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength' | 'footerIBtn3Accept'> & {
4
5
  isSubmitBtnActive: boolean;
6
+ submitIBtnIconName?: FillIconNameKeys | LineIconNameKeys;
7
+ submitIBtnIconFillType?: 'fill' | 'line';
8
+ footerIBtn1State?: 'disabled' | 'normal';
9
+ footerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
10
+ footerIBtn1IconFillType?: 'fill' | 'line';
11
+ footerIBtn1Type?: 'button' | 'upload';
12
+ onClickFooterIBtn1?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ footerIBtn2State?: 'disabled' | 'normal';
14
+ footerIBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
15
+ footerIBtn2IconFillType?: 'fill' | 'line';
16
+ footerIBtn2Type?: 'button' | 'upload';
17
+ onClickFooterIBtn2?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
18
+ footerIBtn3State?: 'disabled' | 'normal';
19
+ footerIBtn3IconName?: FillIconNameKeys | LineIconNameKeys;
20
+ footerIBtn3IconFillType?: 'fill' | 'line';
21
+ footerIBtn3Type?: 'button' | 'upload';
22
+ onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
5
23
  };
6
- declare function Footer({ footerChildren, textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, isSubmitBtnActive }: Props): JSX.Element;
24
+ declare function Footer({ footerChildren, textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, submitIBtnIconName, submitIBtnIconFillType, isSubmitBtnActive, footerIBtn1State, footerIBtn1IconName, footerIBtn1IconFillType, footerIBtn1Type, onClickFooterIBtn1, footerIBtn2State, footerIBtn2IconName, footerIBtn2IconFillType, footerIBtn2Type, onClickFooterIBtn2, footerIBtn3State, footerIBtn3IconName, footerIBtn3IconFillType, footerIBtn3Type, footerIBtn3Accept, onClickFooterIBtn3 }: Props): JSX.Element;
7
25
  export default Footer;
@@ -11,9 +11,9 @@ var react_1 = __importDefault(require("react"));
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var ChatTextField_1 = __importDefault(require("./ChatTextField"));
13
13
  function Footer(_a) {
14
- var footerChildren = _a.footerChildren, textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, isSubmitBtnActive = _a.isSubmitBtnActive;
14
+ var footerChildren = _a.footerChildren, textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, submitIBtnIconName = _a.submitIBtnIconName, submitIBtnIconFillType = _a.submitIBtnIconFillType, isSubmitBtnActive = _a.isSubmitBtnActive, footerIBtn1State = _a.footerIBtn1State, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, footerIBtn1Type = _a.footerIBtn1Type, onClickFooterIBtn1 = _a.onClickFooterIBtn1, footerIBtn2State = _a.footerIBtn2State, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, footerIBtn2Type = _a.footerIBtn2Type, onClickFooterIBtn2 = _a.onClickFooterIBtn2, footerIBtn3State = _a.footerIBtn3State, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, footerIBtn3Type = _a.footerIBtn3Type, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
15
15
  return (react_1.default.createElement(react_1.default.Fragment, null,
16
- react_1.default.createElement(ChatTextField_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, isSubmitBtnActive: isSubmitBtnActive }),
16
+ react_1.default.createElement(ChatTextField_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, isSubmitBtnActive: isSubmitBtnActive, submitIBtnIconName: submitIBtnIconName, submitIBtnIconFillType: submitIBtnIconFillType, footerIBtn1State: footerIBtn1State, footerIBtn1IconName: footerIBtn1IconName, footerIBtn1IconFillType: footerIBtn1IconFillType, footerIBtn1Type: footerIBtn1Type, onClickFooterIBtn1: onClickFooterIBtn1, footerIBtn2State: footerIBtn2State, footerIBtn2IconName: footerIBtn2IconName, footerIBtn2IconFillType: footerIBtn2IconFillType, footerIBtn2Type: footerIBtn2Type, onClickFooterIBtn2: onClickFooterIBtn2, footerIBtn3State: footerIBtn3State, footerIBtn3IconName: footerIBtn3IconName, footerIBtn3IconFillType: footerIBtn3IconFillType, footerIBtn3Type: footerIBtn3Type, footerIBtn3Accept: footerIBtn3Accept, onClickFooterIBtn3: onClickFooterIBtn3 }),
17
17
  react_1.default.createElement(S_FooterChildrenWrapper, null, footerChildren)));
18
18
  }
19
19
  var S_FooterChildrenWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { Props as ChatListProps } from './ChatList';
3
- declare type Props = Required<Pick<ChatListProps, 'styleTheme'>> & Pick<ChatListProps, 'titleText' | 'captionText' | 'headerDisplayType' | 'headerIBtn1IconName' | 'headerIBtn1IconFillType' | 'onClickHeaderIBtn1'>;
4
- declare function Header({ styleTheme, titleText, captionText, headerDisplayType, headerIBtn1IconName, headerIBtn1IconFillType, onClickHeaderIBtn1 }: Props): JSX.Element;
3
+ declare type Props = Required<Pick<ChatListProps, 'styleTheme'>> & Pick<ChatListProps, 'titleText' | 'descText' | 'captionText' | 'titleStyleTheme' | 'headerDisplayType' | 'headerIBtn1IconName' | 'headerIBtn1IconFillType' | 'onClickHeaderIBtn1'>;
4
+ declare function Header({ styleTheme, titleText, descText, captionText, titleStyleTheme, headerDisplayType, headerIBtn1IconName, headerIBtn1IconFillType, onClickHeaderIBtn1 }: Props): JSX.Element;
5
5
  export default Header;