pds-dev-kit-web 1.4.32 → 1.4.35
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/dist/index.d.ts +4 -4
- package/dist/index.js +5 -3
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +2 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +2 -1
- package/dist/src/common/styles/colorSet/UIColor.json +6 -1
- package/dist/src/common/styles/colorSet/index.d.ts +69 -62
- package/dist/src/common/styles/colorSet/index.js +4 -4
- package/dist/src/common/styles/colorSet/ui-type.d.ts +5 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.js +75 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
- package/dist/src/desktop/components/ChatBubbleListItem/Popup.d.ts +19 -0
- package/dist/src/desktop/components/ChatBubbleListItem/Popup.js +238 -0
- package/dist/src/desktop/components/ChatBubbleListItem/index.d.ts +1 -0
- package/dist/src/desktop/components/ChatBubbleListItem/index.js +8 -0
- package/dist/src/desktop/components/ChatList/Body.d.ts +2 -2
- package/dist/src/desktop/components/ChatList/Body.js +18 -8
- package/dist/src/desktop/components/ChatList/ChatList.d.ts +21 -1
- package/dist/src/desktop/components/ChatList/ChatList.js +5 -5
- package/dist/src/desktop/components/ChatList/ChatTextField.d.ts +21 -3
- package/dist/src/desktop/components/ChatList/ChatTextField.js +18 -2
- package/dist/src/desktop/components/ChatList/Footer.d.ts +20 -2
- package/dist/src/desktop/components/ChatList/Footer.js +2 -2
- package/dist/src/desktop/components/ChatList/Header.d.ts +2 -2
- package/dist/src/desktop/components/ChatList/Header.js +6 -3
- package/dist/src/desktop/components/Dropdown/Dropdown.js +1 -1
- package/dist/src/desktop/components/index.d.ts +2 -1
- package/dist/src/desktop/components/index.js +3 -1
- package/dist/src/desktop/index.d.ts +2 -2
- package/dist/src/desktop/index.js +3 -2
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.js +2 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.d.ts +13 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.js +93 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.d.ts +1 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.js +3 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.js +8 -4
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.js +75 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
- package/dist/src/mobile/components/ChatBubbleListItem/Popup.d.ts +19 -0
- package/dist/src/mobile/components/ChatBubbleListItem/Popup.js +238 -0
- package/dist/src/mobile/components/ChatBubbleListItem/index.d.ts +1 -0
- package/dist/src/mobile/components/ChatBubbleListItem/index.js +8 -0
- package/dist/src/mobile/components/ChatList/Body.d.ts +2 -2
- package/dist/src/mobile/components/ChatList/Body.js +18 -8
- package/dist/src/mobile/components/ChatList/ChatList.d.ts +21 -1
- package/dist/src/mobile/components/ChatList/ChatList.js +5 -5
- package/dist/src/mobile/components/ChatList/ChatTextField.d.ts +21 -3
- package/dist/src/mobile/components/ChatList/ChatTextField.js +18 -2
- package/dist/src/mobile/components/ChatList/Footer.d.ts +20 -2
- package/dist/src/mobile/components/ChatList/Footer.js +2 -2
- package/dist/src/mobile/components/ChatList/Header.d.ts +2 -2
- package/dist/src/mobile/components/ChatList/Header.js +6 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.js +1 -1
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.d.ts +2 -1
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +22 -12
- package/dist/src/mobile/components/index.d.ts +2 -1
- package/dist/src/mobile/components/index.js +3 -1
- package/dist/src/mobile/index.d.ts +2 -2
- package/dist/src/mobile/index.js +2 -1
- package/package.json +1 -1
- package/release-note.md +28 -3
|
@@ -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
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Props as ChatListProps } from './ChatList';
|
|
3
|
-
declare type Props = Pick<ChatListProps, 'scrollVisibleType' | 'children' | 'bodyMBtnText'> & {
|
|
3
|
+
declare type Props = Pick<ChatListProps, 'scrollVisibleType' | 'children' | 'bodyMBtnText' | 'bodySpacingMode'> & {
|
|
4
4
|
isSubmitted: boolean;
|
|
5
5
|
};
|
|
6
|
-
declare function Body({ scrollVisibleType, children, isSubmitted, bodyMBtnText }: Props): JSX.Element;
|
|
6
|
+
declare function Body({ scrollVisibleType, children, isSubmitted, bodyMBtnText, bodySpacingMode }: Props): JSX.Element;
|
|
7
7
|
export default Body;
|
|
@@ -32,7 +32,7 @@ var MainButton_1 = require("../MainButton");
|
|
|
32
32
|
var useAutoScrollToBottom_1 = __importDefault(require("./useAutoScrollToBottom"));
|
|
33
33
|
var useTimeout_1 = __importDefault(require("./useTimeout"));
|
|
34
34
|
function Body(_a) {
|
|
35
|
-
var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyMBtnText = _a.bodyMBtnText;
|
|
35
|
+
var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyMBtnText = _a.bodyMBtnText, bodySpacingMode = _a.bodySpacingMode;
|
|
36
36
|
var _b = (0, react_1.useState)(false), isButtonShow = _b[0], setIsButtonShow = _b[1];
|
|
37
37
|
var _c = (0, useAutoScrollToBottom_1.default)(), triggerScrollToBottom = _c.triggerScrollToBottom, EndOfList = _c.EndOfList;
|
|
38
38
|
var scrollRef = (0, react_1.useRef)(null);
|
|
@@ -66,17 +66,27 @@ function Body(_a) {
|
|
|
66
66
|
setIsButtonShow(true);
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
return (react_1.default.createElement(S_Body,
|
|
69
|
+
return (react_1.default.createElement(S_Body, { bodySpacingMode: bodySpacingMode },
|
|
70
70
|
react_1.default.createElement(S_ChatMessageBox, { onScroll: handleScroll, ref: scrollRef, scrollVisibleType: scrollVisibleType },
|
|
71
71
|
children,
|
|
72
72
|
react_1.default.createElement(EndOfList, null)),
|
|
73
73
|
isButtonShow && (react_1.default.createElement(S_BottomButtonWrapper, null,
|
|
74
74
|
react_1.default.createElement(MainButton_1.MainButton, { text: bodyMBtnText, size: "small", onClick: handleClickMBtn })))));
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
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) {
|
|
77
|
+
var theme = _a.theme;
|
|
78
|
+
return theme.spacing.spacingE;
|
|
79
|
+
}, function (_a) {
|
|
80
|
+
var theme = _a.theme;
|
|
81
|
+
return theme.spacing.spacingE;
|
|
82
|
+
});
|
|
83
|
+
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) {
|
|
84
|
+
var bodySpacingMode = _a.bodySpacingMode;
|
|
85
|
+
return bodySpacingMode === 'use' && bodySpacing;
|
|
86
|
+
});
|
|
87
|
+
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"])));
|
|
88
|
+
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"])));
|
|
89
|
+
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) {
|
|
80
90
|
var scrollVisibleType = _a.scrollVisibleType;
|
|
81
91
|
if (!scrollVisibleType || scrollVisibleType === 'moving') {
|
|
82
92
|
return;
|
|
@@ -86,9 +96,9 @@ var S_ChatMessageBox = styled_components_1.default.div(templateObject_4 || (temp
|
|
|
86
96
|
hidden: scrollHiddenStyle
|
|
87
97
|
}[scrollVisibleType];
|
|
88
98
|
});
|
|
89
|
-
var S_BottomButtonWrapper = styled_components_1.default.div(
|
|
99
|
+
var S_BottomButtonWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n bottom: ", ";\n left: 50%;\n transform: translate(-50%, 0);\n"], ["\n position: absolute;\n bottom: ", ";\n left: 50%;\n transform: translate(-50%, 0);\n"])), function (_a) {
|
|
90
100
|
var theme = _a.theme;
|
|
91
101
|
return theme.spacing.spacingC;
|
|
92
102
|
});
|
|
93
103
|
exports.default = Body;
|
|
94
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
104
|
+
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,26 @@ 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
|
+
onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
20
40
|
onSubmit: (value: string) => void;
|
|
21
41
|
onClickHeaderIBtn1?: () => void;
|
|
22
42
|
};
|
|
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;
|
|
43
|
+
declare function ChatList({ styleTheme, headerMode, titleText, descText, captionText, titleStyleTheme, headerDisplayType, headerIBtn1IconName, headerIBtn1IconFillType, children, textFieldState, textFieldHintText, textFieldDefaultText, textFieldMaxLength, scrollVisibleType, footerChildren, submitIBtnState, bodyMBtnText, bodySpacingMode, onSubmit, onClickHeaderIBtn1, submitIBtnIconName, submitIBtnIconFillType, footerIBtn1State, footerIBtn1IconName, footerIBtn1IconFillType, footerIBtn1Type, onClickFooterIBtn1, footerIBtn2State, footerIBtn2IconName, footerIBtn2IconFillType, footerIBtn2Type, onClickFooterIBtn2, footerIBtn3State, footerIBtn3IconName, footerIBtn3IconFillType, footerIBtn3Type, onClickFooterIBtn3 }: Props): JSX.Element;
|
|
24
44
|
export default ChatList;
|
|
@@ -50,14 +50,14 @@ var baseBackgroundColors = {
|
|
|
50
50
|
transparent: 'ui_cpnt_list_base_area_translucent'
|
|
51
51
|
};
|
|
52
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.
|
|
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, 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,
|
|
60
|
+
var reset = methods.reset, handleSubmit = methods.handleSubmit, control = methods.control, _t = methods.formState, isSubmitted = _t.isSubmitted, isValid = _t.isValid, isDirty = _t.isDirty;
|
|
61
61
|
var inputValue = (0, react_hook_form_1.useWatch)({ name: 'chat', control: control });
|
|
62
62
|
var isSubmitButtonActive = (0, react_1.useMemo)(function () {
|
|
63
63
|
if (!submitIBtnState) {
|
|
@@ -75,14 +75,14 @@ function ChatList(_a) {
|
|
|
75
75
|
};
|
|
76
76
|
return (react_1.default.createElement(S_ChatList, { backgroundColor: baseBackgroundColors[styleTheme], id: "chatList" },
|
|
77
77
|
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 }),
|
|
78
|
+
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
79
|
react_1.default.createElement(hybrid_1.Divider, null))),
|
|
80
|
-
react_1.default.createElement(Body_1.default, { scrollVisibleType: scrollVisibleType, isSubmitted: isSubmitted, bodyMBtnText: bodyMBtnText }, children),
|
|
80
|
+
react_1.default.createElement(Body_1.default, { scrollVisibleType: scrollVisibleType, isSubmitted: isSubmitted, bodyMBtnText: bodyMBtnText, bodySpacingMode: bodySpacingMode }, children),
|
|
81
81
|
react_1.default.createElement(hybrid_1.Divider, null),
|
|
82
82
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
|
|
83
83
|
react_1.default.createElement(react_hook_form_1.FormProvider, __assign({}, methods),
|
|
84
84
|
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 }))),
|
|
85
|
+
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, onClickFooterIBtn3: onClickFooterIBtn3 }))),
|
|
86
86
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" })));
|
|
87
87
|
}
|
|
88
88
|
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) {
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
|
|
2
3
|
import type { Props as ChatListProps } from './ChatList';
|
|
3
4
|
declare type Props = Pick<ChatListProps, 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength'> & {
|
|
4
|
-
isSubmitBtnActive
|
|
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, 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, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
|
|
16
17
|
var chatValidation = {
|
|
17
18
|
validate: function (value) {
|
|
18
19
|
if (!value)
|
|
@@ -22,9 +23,24 @@ function ChatTextField(_a) {
|
|
|
22
23
|
};
|
|
23
24
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
24
25
|
react_1.default.createElement(S_FooterContentWrapper, null,
|
|
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 })))),
|
|
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
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 })),
|
|
27
|
-
react_1.default.createElement(IconButton_1.IconButton, { iconName:
|
|
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
46
|
var theme = _a.theme;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
|
|
2
3
|
import type { Props as ChatListProps } from './ChatList';
|
|
3
4
|
declare type Props = Pick<ChatListProps, 'footerChildren' | 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength'> & {
|
|
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, 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, 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, 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;
|
|
@@ -23,13 +23,16 @@ var iconColors = {
|
|
|
23
23
|
transparent: 'ui_cpnt_button_icon_white'
|
|
24
24
|
};
|
|
25
25
|
function Header(_a) {
|
|
26
|
-
var styleTheme = _a.styleTheme, titleText = _a.titleText, captionText = _a.captionText, headerDisplayType = _a.headerDisplayType, headerIBtn1IconName = _a.headerIBtn1IconName, headerIBtn1IconFillType = _a.headerIBtn1IconFillType, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1;
|
|
26
|
+
var styleTheme = _a.styleTheme, titleText = _a.titleText, descText = _a.descText, captionText = _a.captionText, titleStyleTheme = _a.titleStyleTheme, headerDisplayType = _a.headerDisplayType, headerIBtn1IconName = _a.headerIBtn1IconName, headerIBtn1IconFillType = _a.headerIBtn1IconFillType, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1;
|
|
27
27
|
return (react_1.default.createElement(S_HeaderContentWrapper, null,
|
|
28
28
|
react_1.default.createElement(S_HeaderLeftBox, null,
|
|
29
|
-
titleText && (react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme:
|
|
29
|
+
titleText && (react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme: titleStyleTheme, colorTheme: titleTextColors[styleTheme] })),
|
|
30
|
+
descText && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
31
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_c" }),
|
|
32
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: descText, styleTheme: "body2Regular", colorTheme: "sysTextSecondary", colorOverride: styleTheme === 'translucent' ? 'ui_cpnt_list_text_caption_02' : undefined }))),
|
|
30
33
|
captionText && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
31
34
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a" }),
|
|
32
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: captionText, styleTheme: "caption1Regular", colorTheme: "
|
|
35
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: captionText, styleTheme: "caption1Regular", colorTheme: "sysTextTertiary", colorOverride: styleTheme === 'translucent' ? 'ui_cpnt_list_text_caption_03' : undefined })))),
|
|
33
36
|
headerDisplayType === 'ibtn1' && headerIBtn1IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: headerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: iconColors[styleTheme], iconSize: 24, iconFillType: headerIBtn1IconFillType, onClick: onClickHeaderIBtn1 }))));
|
|
34
37
|
}
|
|
35
38
|
var S_HeaderContentWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"])), function (_a) {
|
|
@@ -150,7 +150,7 @@ function Dropdown(_a) {
|
|
|
150
150
|
}, [size, maxHeightItemNumber]);
|
|
151
151
|
return (react_1.default.createElement(S_Dropdown, { className: "container", size: size, tabIndex: 0, onBlur: handleBlur, responsiveMode: responsiveMode, customWidth: customWidth },
|
|
152
152
|
react_1.default.createElement(S_Select, { size: size, onClick: handleClick, isFocused: isFocused, state: state, colorTheme: colorTheme, responsiveMode: responsiveMode, customWidth: customWidth },
|
|
153
|
-
react_1.default.createElement(S_TextLabel, { size: size },
|
|
153
|
+
react_1.default.createElement(S_TextLabel, { size: size, responsiveMode: responsiveMode },
|
|
154
154
|
react_1.default.createElement(TextLabel_1.TextLabel, { text: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) || hintText, styleTheme: "form2Regular", singleLineMode: "use", colorTheme: getTextColorTheme(), colorOverride: getTextColorOverride(), ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })),
|
|
155
155
|
react_1.default.createElement(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getIconColorKey() }),
|
|
156
156
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" })),
|
|
@@ -3,6 +3,7 @@ import { FillIconNameKeys, LineIconNameKeys, PDSTextType, UiColors } from '../..
|
|
|
3
3
|
declare type Props = {
|
|
4
4
|
titleType?: 'text' | 'profile' | 'image';
|
|
5
5
|
titleText?: PDSTextType;
|
|
6
|
+
captionText?: PDSTextType;
|
|
6
7
|
leftBtnMode?: 'none' | 'back' | 'menu' | 'close';
|
|
7
8
|
displayType?: 'none' | 'ibtn_amount1' | 'ibtn_amount2';
|
|
8
9
|
iBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
@@ -21,5 +22,5 @@ declare type Props = {
|
|
|
21
22
|
onClickIBtn1?: () => void;
|
|
22
23
|
onClickIBtn2?: () => void;
|
|
23
24
|
};
|
|
24
|
-
declare function MobileHeaderBar({ titleType, titleText, leftBtnMode, displayType, iBtn1IconName, iBtn1IconFillType, iBtn1IconColorKey, iBtn2IconName, iBtn2IconFillType, iBtn2IconColorKey, dividerMode, imageSrc, iBtn1State, iBtn1Type, iBtn2State, iBtn2Type, onClickLeftBtn, onClickIBtn1, onClickIBtn2 }: Props): JSX.Element;
|
|
25
|
+
declare function MobileHeaderBar({ titleType, titleText, captionText, leftBtnMode, displayType, iBtn1IconName, iBtn1IconFillType, iBtn1IconColorKey, iBtn2IconName, iBtn2IconFillType, iBtn2IconColorKey, dividerMode, imageSrc, iBtn1State, iBtn1Type, iBtn2State, iBtn2Type, onClickLeftBtn, onClickIBtn1, onClickIBtn2 }: Props): JSX.Element;
|
|
25
26
|
export default MobileHeaderBar;
|