@ncds/ui-admin 1.8.21-alpha.6 → 1.8.21-alpha.7
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/cjs/src/components/forms-and-input/input-base/InputBase.js +20 -14
- package/dist/cjs/src/components/index.js +11 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +283 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +566 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/index.js +16 -0
- package/dist/cjs/src/generated/scoped-css.js +1 -1
- package/dist/esm/src/components/forms-and-input/input-base/InputBase.js +20 -14
- package/dist/esm/src/components/index.js +1 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +276 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +563 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/index.js +1 -0
- package/dist/esm/src/generated/scoped-css.js +1 -1
- package/dist/temp/src/components/forms-and-input/input-base/InputBase.js +18 -10
- package/dist/temp/src/components/index.d.ts +1 -0
- package/dist/temp/src/components/index.js +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModal.d.ts +49 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +118 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +456 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/index.d.ts +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/index.js +1 -0
- package/dist/temp/src/generated/scoped-css.js +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/overlays/postcode-search-modal/PostcodeSearchModal.d.ts +49 -0
- package/dist/types/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.d.ts +1 -0
- package/dist/types/src/components/overlays/postcode-search-modal/index.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +186 -0
- package/dist/ui-admin/assets/styles/style.scoped.css +186 -0
- package/package.json +1 -1
|
@@ -39,26 +39,27 @@ const InputBase = exports.InputBase = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
39
39
|
...props
|
|
40
40
|
} = _ref;
|
|
41
41
|
const inputRef = (0, _react.useRef)(null);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
// controlled 인풋은 props.value 로 길이를 알 수 있으므로 상태를 두지 않는다.
|
|
43
|
+
// 입력마다 setState 를 하면 조합 중(한글 IME)에 리렌더가 끼어들어 조합이 끊긴다.
|
|
44
|
+
const isControlled = props.value !== undefined;
|
|
45
|
+
const [uncontrolledLength, setUncontrolledLength] = (0, _react.useState)(0);
|
|
46
|
+
const valueLength = isControlled ? String(props.value ?? '').length : uncontrolledLength;
|
|
47
|
+
const hasValue = valueLength > 0;
|
|
48
|
+
const textCount = valueLength;
|
|
49
|
+
// uncontrolled 인풋만 DOM 값을 읽어 따라간다 — props.value 가 없어 길이를 알 방법이 이것뿐이다.
|
|
46
50
|
(0, _react.useEffect)(() => {
|
|
51
|
+
if (isControlled) return;
|
|
47
52
|
const input = inputRef.current;
|
|
48
53
|
if (!input) return;
|
|
49
54
|
const syncFromInput = () => {
|
|
50
|
-
|
|
51
|
-
length
|
|
52
|
-
} = input.value;
|
|
53
|
-
setHasValue(length > 0);
|
|
54
|
-
setTextCount(length);
|
|
55
|
+
setUncontrolledLength(input.value.length);
|
|
55
56
|
};
|
|
56
57
|
syncFromInput();
|
|
57
58
|
input.addEventListener('input', syncFromInput);
|
|
58
59
|
return () => {
|
|
59
60
|
input.removeEventListener('input', syncFromInput);
|
|
60
61
|
};
|
|
61
|
-
}, [
|
|
62
|
+
}, [isControlled]);
|
|
62
63
|
const renderOutsideSlot = (slot, position) => {
|
|
63
64
|
if (slot.type === 'custom' && slot.placement !== 'outside') {
|
|
64
65
|
return null;
|
|
@@ -72,10 +73,15 @@ const InputBase = exports.InputBase = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
72
73
|
children: slot.label
|
|
73
74
|
});
|
|
74
75
|
case 'text':
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
{
|
|
77
|
+
// 클래스명은 리터럴로 쓴다 — MCP 의 BEM 추출기가 `ncua-input__${position}-text` 형태의
|
|
78
|
+
// 템플릿 리터럴에서는 `ncua-input__` 조각만 읽어 완성된 클래스를 잡지 못한다.
|
|
79
|
+
const textClass = position === 'leading' ? 'ncua-input__leading-text' : 'ncua-input__trailing-text';
|
|
80
|
+
return (0, _jsxRuntime.jsx)("span", {
|
|
81
|
+
className: (0, _classnames.default)(textClass, `${textClass}--${size}`),
|
|
82
|
+
children: slot.text
|
|
83
|
+
});
|
|
84
|
+
}
|
|
79
85
|
case 'custom':
|
|
80
86
|
return slot.children;
|
|
81
87
|
default:
|
|
@@ -498,6 +498,17 @@ Object.keys(_notification).forEach(function (key) {
|
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
});
|
|
501
|
+
var _postcodeSearchModal = require("./overlays/postcode-search-modal");
|
|
502
|
+
Object.keys(_postcodeSearchModal).forEach(function (key) {
|
|
503
|
+
if (key === "default" || key === "__esModule") return;
|
|
504
|
+
if (key in exports && exports[key] === _postcodeSearchModal[key]) return;
|
|
505
|
+
Object.defineProperty(exports, key, {
|
|
506
|
+
enumerable: true,
|
|
507
|
+
get: function () {
|
|
508
|
+
return _postcodeSearchModal[key];
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
});
|
|
501
512
|
var _tooltip = require("./overlays/tooltip");
|
|
502
513
|
Object.keys(_tooltip).forEach(function (key) {
|
|
503
514
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PostcodeSearchModal = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _uiAdminIcon = require("@ncds/ui-admin-icon");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _button = require("../../action/button");
|
|
12
|
+
var _emptyState = require("../../feedback-and-status/empty-state");
|
|
13
|
+
var _inputBase = require("../../forms-and-input/input-base");
|
|
14
|
+
var _radio = require("../../forms-and-input/radio");
|
|
15
|
+
var _pagination = require("../../navigation/pagination");
|
|
16
|
+
var _modal = require("../modal");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
/** 기획서 기준값 */
|
|
19
|
+
const PAGE_SIZE = 15;
|
|
20
|
+
/** 페이지 번호 그룹 크기 — 초과 시 Pagination 이 점프 버튼을 노출한다 */
|
|
21
|
+
const PAGER_WINDOW = 10;
|
|
22
|
+
/** 이 건수를 넘으면 Tip 을 압축 버전으로 전환한다 (기획서 기준) */
|
|
23
|
+
const TIP_COMPACT_THRESHOLD = 30;
|
|
24
|
+
/** 반응형 전환 기준 — assets/styles/base/_variable.scss 의 $breakpoint 와 동일 */
|
|
25
|
+
const MOBILE_BREAKPOINT = 768;
|
|
26
|
+
const MODAL_TITLE = '주소 찾기';
|
|
27
|
+
const SEARCH_PLACEHOLDER = '도로명, 지번, 건물명 검색';
|
|
28
|
+
const SEARCH_BUTTON_LABEL = '검색';
|
|
29
|
+
const EMPTY_TITLE = '검색 결과가 없습니다.';
|
|
30
|
+
const EMPTY_DESCRIPTION = '검색어를 다시 확인해 주세요.';
|
|
31
|
+
const ROAD_BADGE_LABEL = '도로명';
|
|
32
|
+
const JIBUN_BADGE_LABEL = '지번';
|
|
33
|
+
const TIP_LABEL = 'Tip';
|
|
34
|
+
// 라디오 그룹 이름. `ncua-` 로 시작하면 MCP 의 BEM 추출기가 CSS 클래스로 오인하므로 접두사를 뺀다.
|
|
35
|
+
const RESULT_RADIO_NAME = 'postcode-search-modal-result';
|
|
36
|
+
/** E0006·E0008 외 나머지 코드는 모두 같은 문구를 쓴다(기획서: E0009~E0013 통합). */
|
|
37
|
+
const DEFAULT_ERROR_HINT = '검색어를 다시 입력해주세요.';
|
|
38
|
+
const ERROR_HINT = {
|
|
39
|
+
E0006: '시도명으로는 검색이 불가합니다.',
|
|
40
|
+
E0008: '검색어를 두 글자 이상 입력해주세요.'
|
|
41
|
+
};
|
|
42
|
+
/** Tip 카드 첫 줄 안내 문구 (기획서 TIPS.searchTitle) */
|
|
43
|
+
const TIP_TITLE = '아래 조합으로 검색하면 원하는 주소를 더 쉽게 찾을 수 있어요.';
|
|
44
|
+
/** Tip 상세 버전에 노출할 검색어 조합과 예시 주소 (기획서 TIPS.searchTips) */
|
|
45
|
+
const TIP_ITEMS = [{
|
|
46
|
+
combination: '도로명 + 건물번호',
|
|
47
|
+
example: '디지털로26길 43'
|
|
48
|
+
}, {
|
|
49
|
+
combination: '지역명(동·리) + 번지',
|
|
50
|
+
example: '구로동 235-3'
|
|
51
|
+
}, {
|
|
52
|
+
combination: '지역명(동·리) + 건물명(아파트명)',
|
|
53
|
+
example: '구로동 대륭포스트타워8차'
|
|
54
|
+
}];
|
|
55
|
+
/** Tip 압축 버전 문구 — 예시 주소를 빼고 조합만 한 줄로 (기획서 TIPS.searchTipsCompact) */
|
|
56
|
+
const TIP_COMPACT_TEXT = "'도로명+건물번호', '지역명+지번', '지역명+건물명(아파트명)'";
|
|
57
|
+
const TIP_EXAMPLE_PREFIX = '예)';
|
|
58
|
+
const TIP_ICON_SIZE = 16;
|
|
59
|
+
/** 선택 표시를 판정하는 키. 우편번호만으로는 같은 건물의 다른 지번을 구분하지 못한다. */
|
|
60
|
+
const resultKey = _ref => {
|
|
61
|
+
let {
|
|
62
|
+
zipCode,
|
|
63
|
+
roadAddress,
|
|
64
|
+
jibunAddress
|
|
65
|
+
} = _ref;
|
|
66
|
+
return `${zipCode}|${roadAddress}|${jibunAddress}`;
|
|
67
|
+
};
|
|
68
|
+
const resolveTipVariant = (hasResults, totalCount) => {
|
|
69
|
+
if (!hasResults) return 'detail';
|
|
70
|
+
return totalCount > TIP_COMPACT_THRESHOLD ? 'compact' : null;
|
|
71
|
+
};
|
|
72
|
+
/** SSR(도큐사우루스 등)에서는 초기값을 false(=PC)로 두고 mount 이후 갱신한다. */
|
|
73
|
+
const useIsMobileViewport = () => {
|
|
74
|
+
const [isMobile, setIsMobile] = (0, _react.useState)(false);
|
|
75
|
+
(0, _react.useEffect)(() => {
|
|
76
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;
|
|
77
|
+
const mediaQuery = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT}px)`);
|
|
78
|
+
const sync = () => setIsMobile(mediaQuery.matches);
|
|
79
|
+
sync();
|
|
80
|
+
mediaQuery.addEventListener('change', sync);
|
|
81
|
+
return () => {
|
|
82
|
+
mediaQuery.removeEventListener('change', sync);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
return isMobile;
|
|
86
|
+
};
|
|
87
|
+
const Tip = _ref2 => {
|
|
88
|
+
let {
|
|
89
|
+
compact = false,
|
|
90
|
+
className
|
|
91
|
+
} = _ref2;
|
|
92
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
93
|
+
className: (0, _classnames.default)('ncua-postcode-search-modal__tip', className),
|
|
94
|
+
children: [!compact && (0, _jsxRuntime.jsxs)("p", {
|
|
95
|
+
className: "ncua-postcode-search-modal__tip-label",
|
|
96
|
+
children: [(0, _jsxRuntime.jsx)(_uiAdminIcon.AnnotationInfoFill, {
|
|
97
|
+
className: "ncua-postcode-search-modal__tip-icon",
|
|
98
|
+
width: TIP_ICON_SIZE,
|
|
99
|
+
height: TIP_ICON_SIZE
|
|
100
|
+
}), TIP_LABEL]
|
|
101
|
+
}), (0, _jsxRuntime.jsx)("p", {
|
|
102
|
+
className: "ncua-postcode-search-modal__tip-title",
|
|
103
|
+
children: TIP_TITLE
|
|
104
|
+
}), compact ? (0, _jsxRuntime.jsx)("p", {
|
|
105
|
+
className: "ncua-postcode-search-modal__tip-compact-text",
|
|
106
|
+
children: TIP_COMPACT_TEXT
|
|
107
|
+
}) : (0, _jsxRuntime.jsx)("ul", {
|
|
108
|
+
className: "ncua-postcode-search-modal__tip-list",
|
|
109
|
+
children: TIP_ITEMS.map(_ref3 => {
|
|
110
|
+
let {
|
|
111
|
+
combination,
|
|
112
|
+
example
|
|
113
|
+
} = _ref3;
|
|
114
|
+
return (0, _jsxRuntime.jsxs)("li", {
|
|
115
|
+
className: "ncua-postcode-search-modal__tip-item",
|
|
116
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
117
|
+
className: "ncua-postcode-search-modal__tip-combination",
|
|
118
|
+
children: combination
|
|
119
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
className: "ncua-postcode-search-modal__tip-example",
|
|
121
|
+
children: `${TIP_EXAMPLE_PREFIX} ${example}`
|
|
122
|
+
})]
|
|
123
|
+
}, combination);
|
|
124
|
+
})
|
|
125
|
+
})]
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
Tip.displayName = 'PostcodeSearchModal.Tip';
|
|
129
|
+
const PostcodeSearchModal = _ref4 => {
|
|
130
|
+
let {
|
|
131
|
+
open,
|
|
132
|
+
onClose,
|
|
133
|
+
zIndex,
|
|
134
|
+
className,
|
|
135
|
+
searchQuery,
|
|
136
|
+
onSearchQueryChange,
|
|
137
|
+
onSearch,
|
|
138
|
+
results,
|
|
139
|
+
totalCount,
|
|
140
|
+
currentPage,
|
|
141
|
+
onPageChange,
|
|
142
|
+
pageSize = PAGE_SIZE,
|
|
143
|
+
loading = false,
|
|
144
|
+
errorCode,
|
|
145
|
+
onSelect
|
|
146
|
+
} = _ref4;
|
|
147
|
+
const isMobile = useIsMobileViewport();
|
|
148
|
+
// 선택 표시는 컴포넌트가 직접 들고 있는다. 사용처는 onSelect 로 값만 받으면 된다.
|
|
149
|
+
// 우편번호는 한 페이지에 중복될 수 있어 주소 전체를 키로 쓴다.
|
|
150
|
+
const [selectedKey, setSelectedKey] = (0, _react.useState)();
|
|
151
|
+
// 검색이 실행된 검색어. 입력 중에는 갱신되지 않는다.
|
|
152
|
+
// 초기값은 마운트 시점의 searchQuery — 사용처가 검색어를 채운 채로 열면 그 검색은 이미 실행된 것으로 본다.
|
|
153
|
+
const [searchedQuery, setSearchedQuery] = (0, _react.useState)(searchQuery);
|
|
154
|
+
// Modal 은 닫혀도 이 컴포넌트를 언마운트하지 않아 내부 상태가 다음 열기까지 남는다.
|
|
155
|
+
// 열리는 순간 이전 세션의 선택·검색 상태를 지운다.
|
|
156
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: searchQuery 를 deps 에 넣으면 입력할 때마다 초기화된다
|
|
157
|
+
(0, _react.useEffect)(() => {
|
|
158
|
+
if (!open) return;
|
|
159
|
+
setSelectedKey(undefined);
|
|
160
|
+
setSearchedQuery(searchQuery);
|
|
161
|
+
}, [open]);
|
|
162
|
+
const hasError = Boolean(errorCode);
|
|
163
|
+
const hasResults = !hasError && results.length > 0;
|
|
164
|
+
// 검색을 실행한 검색어와 현재 입력값이 같을 때만 "결과 없음"으로 본다.
|
|
165
|
+
// 입력 중에는 두 값이 달라지고, 응답을 기다리는 동안에는 loading 이 막는다.
|
|
166
|
+
const showEmptyState = !hasError && !loading && results.length === 0 && searchQuery !== '' && searchQuery === searchedQuery;
|
|
167
|
+
const tipVariant = resolveTipVariant(hasResults, totalCount);
|
|
168
|
+
const handleSearchQueryChange = event => {
|
|
169
|
+
onSearchQueryChange(event.target.value);
|
|
170
|
+
};
|
|
171
|
+
const handleSearch = () => {
|
|
172
|
+
setSearchedQuery(searchQuery);
|
|
173
|
+
onSearch();
|
|
174
|
+
};
|
|
175
|
+
const handleSearchKeyDown = event => {
|
|
176
|
+
// 한글 조합 중의 Enter 는 글자 확정이므로 검색으로 보지 않는다.
|
|
177
|
+
if (event.key !== 'Enter' || event.nativeEvent.isComposing) return;
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
handleSearch();
|
|
180
|
+
};
|
|
181
|
+
return (0, _jsxRuntime.jsxs)(_modal.Modal, {
|
|
182
|
+
isOpen: open,
|
|
183
|
+
onClose: onClose,
|
|
184
|
+
size: "md",
|
|
185
|
+
zIndex: zIndex,
|
|
186
|
+
className: className,
|
|
187
|
+
children: [(0, _jsxRuntime.jsx)(_modal.Modal.Header, {
|
|
188
|
+
title: MODAL_TITLE,
|
|
189
|
+
onClose: onClose,
|
|
190
|
+
showDivider: true
|
|
191
|
+
}), (0, _jsxRuntime.jsx)(_modal.Modal.Content, {
|
|
192
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
193
|
+
className: "ncua-postcode-search-modal",
|
|
194
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
195
|
+
className: "ncua-postcode-search-modal__search",
|
|
196
|
+
children: [(0, _jsxRuntime.jsx)(_inputBase.InputBase, {
|
|
197
|
+
className: "ncua-postcode-search-modal__search-input",
|
|
198
|
+
size: "sm",
|
|
199
|
+
fullWidth: true,
|
|
200
|
+
value: searchQuery,
|
|
201
|
+
onChange: handleSearchQueryChange,
|
|
202
|
+
onKeyDown: handleSearchKeyDown,
|
|
203
|
+
placeholder: SEARCH_PLACEHOLDER,
|
|
204
|
+
destructive: hasError,
|
|
205
|
+
hintText: errorCode ? ERROR_HINT[errorCode] ?? DEFAULT_ERROR_HINT : undefined
|
|
206
|
+
}), (0, _jsxRuntime.jsx)(_button.Button, {
|
|
207
|
+
className: "ncua-postcode-search-modal__search-button",
|
|
208
|
+
label: SEARCH_BUTTON_LABEL,
|
|
209
|
+
size: "sm",
|
|
210
|
+
hierarchy: "secondary",
|
|
211
|
+
onClick: handleSearch
|
|
212
|
+
})]
|
|
213
|
+
}), tipVariant && (0, _jsxRuntime.jsx)(PostcodeSearchModal.Tip, {
|
|
214
|
+
compact: tipVariant === 'compact'
|
|
215
|
+
}), hasResults && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
216
|
+
children: [(0, _jsxRuntime.jsxs)("p", {
|
|
217
|
+
className: "ncua-postcode-search-modal__count",
|
|
218
|
+
children: ["\uAC80\uC0C9 ", (0, _jsxRuntime.jsx)("b", {
|
|
219
|
+
children: totalCount
|
|
220
|
+
}), "\uAC1C"]
|
|
221
|
+
}), (0, _jsxRuntime.jsx)("ul", {
|
|
222
|
+
className: "ncua-postcode-search-modal__list",
|
|
223
|
+
children: results.map((result, index) => (0, _jsxRuntime.jsx)("li", {
|
|
224
|
+
className: "ncua-postcode-search-modal__item",
|
|
225
|
+
children: (0, _jsxRuntime.jsx)(_radio.Radio, {
|
|
226
|
+
name: RESULT_RADIO_NAME,
|
|
227
|
+
value: result.zipCode,
|
|
228
|
+
checked: selectedKey === resultKey(result),
|
|
229
|
+
onChange: () => {
|
|
230
|
+
setSelectedKey(resultKey(result));
|
|
231
|
+
onSelect(result);
|
|
232
|
+
},
|
|
233
|
+
text: (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
234
|
+
children: [(0, _jsxRuntime.jsxs)("span", {
|
|
235
|
+
className: "ncua-postcode-search-modal__addr-line",
|
|
236
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
237
|
+
className: "ncua-postcode-search-modal__badge",
|
|
238
|
+
children: ROAD_BADGE_LABEL
|
|
239
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
240
|
+
className: "ncua-postcode-search-modal__item-road",
|
|
241
|
+
children: result.roadAddress
|
|
242
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
243
|
+
className: "ncua-postcode-search-modal__item-zip",
|
|
244
|
+
children: result.zipCode
|
|
245
|
+
})]
|
|
246
|
+
}), (0, _jsxRuntime.jsxs)("span", {
|
|
247
|
+
className: "ncua-postcode-search-modal__addr-line",
|
|
248
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
249
|
+
className: "ncua-postcode-search-modal__badge",
|
|
250
|
+
children: JIBUN_BADGE_LABEL
|
|
251
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
252
|
+
className: "ncua-postcode-search-modal__item-jibun",
|
|
253
|
+
children: result.jibunAddress
|
|
254
|
+
})]
|
|
255
|
+
})]
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
}, `${result.zipCode}-${index}`))
|
|
259
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
260
|
+
className: "ncua-postcode-search-modal__pagination",
|
|
261
|
+
children: (0, _jsxRuntime.jsx)(_pagination.Pagination, {
|
|
262
|
+
totalCount: totalCount,
|
|
263
|
+
itemCountPerPage: pageSize,
|
|
264
|
+
pageCount: PAGER_WINDOW,
|
|
265
|
+
currentPage: currentPage,
|
|
266
|
+
breakPoint: isMobile ? 'mo' : 'pc',
|
|
267
|
+
onPageChange: onPageChange
|
|
268
|
+
})
|
|
269
|
+
})]
|
|
270
|
+
}), showEmptyState && (0, _jsxRuntime.jsx)("div", {
|
|
271
|
+
className: "ncua-postcode-search-modal__empty",
|
|
272
|
+
children: (0, _jsxRuntime.jsx)(_emptyState.EmptyState, {
|
|
273
|
+
title: EMPTY_TITLE,
|
|
274
|
+
description: EMPTY_DESCRIPTION
|
|
275
|
+
})
|
|
276
|
+
})]
|
|
277
|
+
})
|
|
278
|
+
})]
|
|
279
|
+
});
|
|
280
|
+
};
|
|
281
|
+
exports.PostcodeSearchModal = PostcodeSearchModal;
|
|
282
|
+
PostcodeSearchModal.displayName = 'PostcodeSearchModal';
|
|
283
|
+
PostcodeSearchModal.Tip = Tip;
|