@wipco/sdui 1.8.3 → 1.9.0

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 (82) hide show
  1. package/dist/{chunk-DTCZPXOT.js → chunk-33LRJ25P.js} +199 -21
  2. package/dist/{chunk-PN5IJPA5.js → chunk-3LPLTD66.js} +1 -1
  3. package/dist/{chunk-TCHXA35K.js → chunk-3M64LBYZ.js} +2 -2
  4. package/dist/{chunk-ZDWCLHIY.js → chunk-4FQB6O4T.js} +5 -5
  5. package/dist/{chunk-TK3WS7XE.js → chunk-55524GIB.js} +2 -2
  6. package/dist/{chunk-JDTVNS3H.js → chunk-5NDYDUMJ.js} +1 -1
  7. package/dist/{chunk-YOLT2TPX.js → chunk-A2PG44CM.js} +1 -1
  8. package/dist/{chunk-YK7ZNV2C.js → chunk-CZMSQ3B3.js} +1 -1
  9. package/dist/{chunk-KVQXQLAP.js → chunk-DE3HYL4K.js} +2 -2
  10. package/dist/{chunk-3PGKBTBZ.js → chunk-DELAII7K.js} +2 -2
  11. package/dist/{chunk-ZW42VDR3.js → chunk-F2ICWCV3.js} +1 -1
  12. package/dist/{chunk-KJDHF6VU.js → chunk-FR7S52ZL.js} +1 -1
  13. package/dist/{chunk-HAK2YXSF.js → chunk-GHKRT7EA.js} +1 -1
  14. package/dist/{chunk-JRCHWX2B.js → chunk-GUXKGL76.js} +1 -1
  15. package/dist/{chunk-37CLBWCE.js → chunk-GW2LSUA4.js} +1 -1
  16. package/dist/{chunk-B6U2YWUP.js → chunk-HKYLKLF6.js} +2 -2
  17. package/dist/{chunk-UNQ6VAVD.js → chunk-I45MRYCE.js} +2 -2
  18. package/dist/{chunk-CFFSCGDV.js → chunk-IOQNDAWT.js} +3 -3
  19. package/dist/{chunk-YJJMK5R5.js → chunk-J2SPMIMO.js} +2 -2
  20. package/dist/{chunk-UDJVLMDH.js → chunk-JHWJSVZH.js} +2 -2
  21. package/dist/{chunk-5JXXCRXA.js → chunk-LDIEWJNP.js} +2 -2
  22. package/dist/{chunk-K7K6WOIG.js → chunk-LEYVJAXU.js} +3 -3
  23. package/dist/{chunk-OI2GPBIL.js → chunk-LK7MHTJO.js} +2 -2
  24. package/dist/{chunk-QP7AQEGZ.js → chunk-LNEFMVHL.js} +3 -3
  25. package/dist/{chunk-I2URQNZZ.js → chunk-MIFCOTLQ.js} +9 -7
  26. package/dist/{chunk-TQV4M3SB.js → chunk-MRCTYYBS.js} +2 -2
  27. package/dist/{chunk-DNUO63VZ.js → chunk-NHKQZDBX.js} +2 -2
  28. package/dist/{chunk-KIHN7DGA.js → chunk-NKRZVRGH.js} +206 -6
  29. package/dist/{chunk-4SVSS7VO.js → chunk-NTMFLJEE.js} +4 -4
  30. package/dist/{chunk-XFNHHGFR.js → chunk-RMYGRGKS.js} +1 -1
  31. package/dist/{chunk-O3SD2HS6.js → chunk-RT2I2U45.js} +1 -1
  32. package/dist/{chunk-ITFSPOOB.js → chunk-SANCYRIQ.js} +1 -1
  33. package/dist/{chunk-H7RLEDKJ.js → chunk-SMVPMDWO.js} +2 -2
  34. package/dist/{chunk-PGAP2RLS.js → chunk-TYPNHH3I.js} +1 -1
  35. package/dist/{chunk-6TWP3E2L.js → chunk-UX37MB4P.js} +3 -3
  36. package/dist/{chunk-LONXOEZY.js → chunk-UYOQ3SEG.js} +1 -1
  37. package/dist/{chunk-CUAGMSSG.js → chunk-VGNLXT3A.js} +1 -1
  38. package/dist/{chunk-LGKLA22B.js → chunk-VSCAW4LS.js} +1 -1
  39. package/dist/{chunk-AMKIMOTU.js → chunk-YMJUK3V4.js} +2 -2
  40. package/dist/{chunk-FXEKHHEA.js → chunk-Z2SOMUZF.js} +1 -1
  41. package/dist/{chunk-DDX7KJAW.js → chunk-Z5Q44VXX.js} +1 -1
  42. package/dist/{chunk-WW65XEEE.js → chunk-ZHWBTWHS.js} +2 -2
  43. package/dist/index.d.ts +40 -5
  44. package/dist/index.js +16 -16
  45. package/dist/meta.js +59 -6
  46. package/dist/rich/ExcelUploadCard.js +3 -3
  47. package/dist/rich.js +5 -5
  48. package/dist/widgets/ApprovalLineEditor.js +7 -7
  49. package/dist/widgets/ApprovalOverridesEditor.js +9 -9
  50. package/dist/widgets/ApprovalStepper.js +2 -2
  51. package/dist/widgets/AutocompleteField.d.ts +29 -3
  52. package/dist/widgets/AutocompleteField.js +7 -7
  53. package/dist/widgets/ColumnBoard.js +2 -2
  54. package/dist/widgets/DiffView.js +2 -2
  55. package/dist/widgets/Disclosure.js +2 -2
  56. package/dist/widgets/EventCalendar.js +3 -3
  57. package/dist/widgets/FileDropzone.js +5 -5
  58. package/dist/widgets/ImageLightbox.js +3 -3
  59. package/dist/widgets/InlineEdit.js +2 -2
  60. package/dist/widgets/JsonField.js +2 -2
  61. package/dist/widgets/OptionSchemaEditor.js +3 -3
  62. package/dist/widgets/OptionValueFields.js +3 -3
  63. package/dist/widgets/OrgChart.js +2 -2
  64. package/dist/widgets/OrgChartBoard.js +5 -5
  65. package/dist/widgets/PeriodFilter.js +4 -4
  66. package/dist/widgets/PermissionMatrixEditor.js +3 -3
  67. package/dist/widgets/PositionSelect.js +3 -3
  68. package/dist/widgets/PrintSheet.js +2 -2
  69. package/dist/widgets/ProfileEditDiffCard.js +3 -3
  70. package/dist/widgets/QRDisplay.js +3 -3
  71. package/dist/widgets/RankBoard.js +4 -4
  72. package/dist/widgets/RoleMemberPicker.js +4 -4
  73. package/dist/widgets/SearchableMultiPicker.js +5 -5
  74. package/dist/widgets/SecureScreen.js +2 -2
  75. package/dist/widgets/StagePeriodEditor.js +4 -4
  76. package/dist/widgets/TagInput.js +2 -2
  77. package/dist/widgets/TagMultiSelect.js +3 -3
  78. package/dist/widgets/Timeline.js +3 -3
  79. package/dist/widgets/TreePicker.js +6 -6
  80. package/dist/widgets/TreeView.js +5 -5
  81. package/dist/widgets/index.js +71 -71
  82. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { ellipsisStyle, unwrapRows } from './chunk-YOLT2TPX.js';
2
- import { includesLooseSearch } from './chunk-I2URQNZZ.js';
3
- import { useSduiAdapter, hostFetchOf } from './chunk-XFNHHGFR.js';
4
- import { Icon, Button, Input, Spinner } from './chunk-KIHN7DGA.js';
1
+ import { ellipsisStyle, unwrapRows } from './chunk-A2PG44CM.js';
2
+ import { includesLooseSearch } from './chunk-MIFCOTLQ.js';
3
+ import { useSduiAdapter, hostFetchOf } from './chunk-RMYGRGKS.js';
4
+ import { Icon, Input, Spinner, Button } from './chunk-NKRZVRGH.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useId, useRef, useMemo, useState, useEffect } from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -32,6 +32,25 @@ function pickText(option, key) {
32
32
  var statusRowStyle = {
33
33
  padding: "var(--wp-space-2) var(--wp-space-3)"
34
34
  };
35
+ function optionRowStyle(active) {
36
+ return {
37
+ display: "block",
38
+ width: "100%",
39
+ textAlign: "left",
40
+ padding: "var(--wp-space-2) var(--wp-space-3)",
41
+ border: 0,
42
+ borderRadius: "var(--wp-radius-sm)",
43
+ background: active ? "var(--wp-surface-hover)" : "transparent",
44
+ color: "var(--wp-text-default)",
45
+ font: "inherit",
46
+ cursor: "pointer"
47
+ };
48
+ }
49
+ var DEFAULT_CREATE_LABEL = '\uC9C1\uC811\uC785\uB825: "{value}"';
50
+ function freeTextCreateLabel(template, text) {
51
+ const source = typeof template === "string" && template !== "" ? template : DEFAULT_CREATE_LABEL;
52
+ return source.split("{value}").join(text);
53
+ }
35
54
  function AutocompleteFieldImpl({
36
55
  search,
37
56
  endpoint,
@@ -47,7 +66,11 @@ function AutocompleteFieldImpl({
47
66
  minChars = 1,
48
67
  debounceMs = 300,
49
68
  invalid = false,
50
- disabled = false
69
+ disabled = false,
70
+ onSelect,
71
+ freeText = false,
72
+ selected,
73
+ createLabel
51
74
  }) {
52
75
  const listId = useId();
53
76
  const hostRef = useRef(null);
@@ -69,6 +92,8 @@ function AutocompleteFieldImpl({
69
92
  const [internalValue, setInternalValue] = useState("");
70
93
  const committed = (isControlled ? value : internalValue) ?? "";
71
94
  const hasSelection = committed !== "";
95
+ const cardMode = !freeText && hasSelection;
96
+ const freeTextValue = isControlled ? String(value ?? "") : internalValue;
72
97
  const [picked, setPicked] = useState(null);
73
98
  const [query, setQuery] = useState("");
74
99
  const [open, setOpen] = useState(false);
@@ -77,6 +102,13 @@ function AutocompleteFieldImpl({
77
102
  const [activeIndex, setActiveIndex] = useState(0);
78
103
  const [focusPending, setFocusPending] = useState(false);
79
104
  const listRef = useRef(null);
105
+ const [typedSeq, setTypedSeq] = useState(0);
106
+ const [ownLinked, setOwnLinked] = useState(false);
107
+ const linked = freeText && (selected ?? ownLinked);
108
+ const unlinkSentRef = useRef(false);
109
+ useEffect(() => {
110
+ if (linked) unlinkSentRef.current = false;
111
+ }, [linked]);
80
112
  useEffect(() => {
81
113
  if (!open) return;
82
114
  const box = listRef.current;
@@ -88,7 +120,7 @@ function AutocompleteFieldImpl({
88
120
  else if (bottom > box.scrollTop + box.clientHeight) box.scrollTop = bottom - box.clientHeight;
89
121
  }, [open, activeIndex, listId, results]);
90
122
  useEffect(() => {
91
- if (disabled || hasSelection) return;
123
+ if (disabled || cardMode) return;
92
124
  const keyword = query.trim();
93
125
  if (keyword.length < minChars) {
94
126
  seqRef.current += 1;
@@ -129,7 +161,7 @@ function AutocompleteFieldImpl({
129
161
  clearTimeout(timer);
130
162
  controller.abort();
131
163
  };
132
- }, [query, hasSearch, labelKey, subKey, minChars, debounceMs, disabled, hasSelection]);
164
+ }, [query, typedSeq, hasSearch, labelKey, subKey, minChars, debounceMs, disabled, cardMode]);
133
165
  useEffect(() => {
134
166
  if (!open) return;
135
167
  const closeOnOutsideClick = (event) => {
@@ -160,6 +192,7 @@ function AutocompleteFieldImpl({
160
192
  setStatus("idle");
161
193
  setResults([]);
162
194
  onChange?.(nextValue, option);
195
+ onSelect?.(option);
163
196
  };
164
197
  const clearSelection = () => {
165
198
  setPicked(null);
@@ -169,6 +202,71 @@ function AutocompleteFieldImpl({
169
202
  setResults([]);
170
203
  setFocusPending(true);
171
204
  onChange?.(null);
205
+ onSelect?.(null);
206
+ };
207
+ const closeFreeList = () => {
208
+ setQuery("");
209
+ setOpen(false);
210
+ };
211
+ const typeFreeText = (text) => {
212
+ if (linked && !unlinkSentRef.current) {
213
+ unlinkSentRef.current = true;
214
+ setOwnLinked(false);
215
+ onSelect?.(null);
216
+ }
217
+ if (!isControlled) setInternalValue(text);
218
+ setQuery(text);
219
+ setTypedSeq((n) => n + 1);
220
+ setActiveIndex(0);
221
+ onChange?.(text);
222
+ };
223
+ const pickFreeOption = (option) => {
224
+ const label = pickText(option, labelKey) || pickText(option, valueKey);
225
+ if (!isControlled) setInternalValue(label);
226
+ unlinkSentRef.current = false;
227
+ setOwnLinked(true);
228
+ closeFreeList();
229
+ onChange?.(label);
230
+ onSelect?.(option);
231
+ };
232
+ const chooseFreeRow = (index) => {
233
+ const option = index > 0 && status === "ready" ? results[index - 1] : void 0;
234
+ if (option) {
235
+ pickFreeOption(option);
236
+ return;
237
+ }
238
+ if (linked) {
239
+ unlinkSentRef.current = true;
240
+ setOwnLinked(false);
241
+ onSelect?.(null);
242
+ }
243
+ closeFreeList();
244
+ };
245
+ const freeRowCount = 1 + (status === "ready" ? results.length : 0);
246
+ const handleFreeKeyDown = (event) => {
247
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
248
+ event.preventDefault();
249
+ if (!open) return;
250
+ const delta = event.key === "ArrowDown" ? 1 : -1;
251
+ setActiveIndex((index) => (index + delta + freeRowCount) % freeRowCount);
252
+ return;
253
+ }
254
+ if (event.key === "Enter") {
255
+ if (!open) return;
256
+ event.preventDefault();
257
+ chooseFreeRow(activeIndex);
258
+ return;
259
+ }
260
+ if (event.key === "Tab") {
261
+ if (!open) return;
262
+ if (activeIndex > 0 && status === "ready" && results[activeIndex - 1]) {
263
+ pickFreeOption(results[activeIndex - 1]);
264
+ } else {
265
+ closeFreeList();
266
+ }
267
+ return;
268
+ }
269
+ if (event.key === "Escape") setOpen(false);
172
270
  };
173
271
  const handleKeyDown = (event) => {
174
272
  if (event.key === "ArrowDown" || event.key === "ArrowUp") {
@@ -197,7 +295,98 @@ function AutocompleteFieldImpl({
197
295
  const cardOption = pickedMatches ? picked : staticMatch;
198
296
  const cardLabel = (pickedMatches ? pickText(picked, labelKey) : "") || selectedLabel || (cardOption ? pickText(cardOption, labelKey) : "") || committed;
199
297
  const cardSub = cardOption ? pickText(cardOption, subKey) : "";
200
- if (hasSelection) {
298
+ if (freeText) {
299
+ const createText = freeTextCreateLabel(createLabel, freeTextValue);
300
+ return /* @__PURE__ */ jsxs("div", { ref: hostRef, className: "erp-popover-host", children: [
301
+ /* @__PURE__ */ jsxs("div", { className: "wp-inputwrap wp-inputwrap--lead", children: [
302
+ /* @__PURE__ */ jsx(
303
+ "span",
304
+ {
305
+ className: "wp-inputwrap__lead",
306
+ style: linked ? { color: "var(--wp-text-success)" } : void 0,
307
+ children: /* @__PURE__ */ jsx(Icon, { name: linked ? "circle-check" : "search", size: 15, title: linked ? "\uC120\uD0DD\uB428" : void 0 })
308
+ }
309
+ ),
310
+ /* @__PURE__ */ jsx(
311
+ Input,
312
+ {
313
+ role: "combobox",
314
+ "aria-expanded": open,
315
+ "aria-controls": listId,
316
+ "aria-autocomplete": "list",
317
+ "aria-activedescendant": open ? `${listId}-opt-${activeIndex}` : void 0,
318
+ autoComplete: "off",
319
+ invalid,
320
+ disabled,
321
+ placeholder,
322
+ value: freeTextValue,
323
+ onChange: (event) => typeFreeText(event.target.value),
324
+ onKeyDown: handleFreeKeyDown
325
+ }
326
+ )
327
+ ] }),
328
+ open ? /* @__PURE__ */ jsx("div", { className: "erp-popover erp-popover--left", style: { width: "100%" }, children: /* @__PURE__ */ jsxs(
329
+ "div",
330
+ {
331
+ id: listId,
332
+ ref: listRef,
333
+ role: "listbox",
334
+ className: "erp-popover__body",
335
+ style: {
336
+ maxHeight: 280,
337
+ overflowY: "auto",
338
+ overscrollBehavior: "contain",
339
+ padding: "var(--wp-space-1)"
340
+ },
341
+ onMouseDown: (event) => event.preventDefault(),
342
+ children: [
343
+ /* @__PURE__ */ jsx(
344
+ "button",
345
+ {
346
+ id: `${listId}-opt-0`,
347
+ type: "button",
348
+ role: "option",
349
+ "aria-selected": activeIndex === 0,
350
+ "data-create-row": "",
351
+ onClick: () => chooseFreeRow(0),
352
+ onPointerEnter: () => setActiveIndex(0),
353
+ style: optionRowStyle(activeIndex === 0),
354
+ children: /* @__PURE__ */ jsx("span", { className: "wp-body-sm", style: ellipsisStyle, children: createText })
355
+ }
356
+ ),
357
+ status === "loading" ? /* @__PURE__ */ jsx("div", { className: "wp-row", style: statusRowStyle, children: /* @__PURE__ */ jsx(Spinner, { size: "sm", label: "\uAC80\uC0C9 \uC911\u2026" }) }) : status === "offline" ? /* @__PURE__ */ jsxs("div", { className: "wp-row", style: statusRowStyle, children: [
358
+ /* @__PURE__ */ jsx(Icon, { name: "unplug", size: 16, style: { color: "var(--wp-text-muted)", flex: "none" } }),
359
+ /* @__PURE__ */ jsx("span", { className: "wp-caption", children: "\uBC31\uC5D4\uB4DC \uBBF8\uC5F0\uB3D9 \u2014 \uAC80\uC0C9 \uACB0\uACFC\uB97C \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" })
360
+ ] }) : status === "error" ? /* @__PURE__ */ jsxs("div", { className: "wp-row", style: statusRowStyle, children: [
361
+ /* @__PURE__ */ jsx(Icon, { name: "circle-alert", size: 16, style: { color: "var(--wp-text-danger)", flex: "none" } }),
362
+ /* @__PURE__ */ jsx("span", { className: "wp-caption", children: "\uAC80\uC0C9 \uC2E4\uD328 \u2014 \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694" })
363
+ ] }) : status === "ready" && results.length === 0 ? /* @__PURE__ */ jsx("div", { className: "wp-caption", style: { ...statusRowStyle, color: "var(--wp-text-subtle)" }, children: "\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9 \uC5C6\uC74C" }) : status === "ready" ? results.map((option, index) => {
364
+ const row = index + 1;
365
+ const optionSub = pickText(option, subKey);
366
+ return /* @__PURE__ */ jsxs(
367
+ "button",
368
+ {
369
+ id: `${listId}-opt-${row}`,
370
+ type: "button",
371
+ role: "option",
372
+ "aria-selected": row === activeIndex,
373
+ onClick: () => chooseFreeRow(row),
374
+ onPointerEnter: () => setActiveIndex(row),
375
+ style: optionRowStyle(row === activeIndex),
376
+ children: [
377
+ /* @__PURE__ */ jsx("span", { className: "wp-body-sm", style: ellipsisStyle, children: pickText(option, labelKey) || pickText(option, valueKey) }),
378
+ optionSub ? /* @__PURE__ */ jsx("span", { className: "wp-caption", style: ellipsisStyle, children: optionSub }) : null
379
+ ]
380
+ },
381
+ `${pickText(option, valueKey)}-${index}`
382
+ );
383
+ }) : null
384
+ ]
385
+ }
386
+ ) }) : null
387
+ ] });
388
+ }
389
+ if (cardMode) {
201
390
  return /* @__PURE__ */ jsxs(
202
391
  "div",
203
392
  {
@@ -282,18 +471,7 @@ function AutocompleteFieldImpl({
282
471
  "aria-selected": index === activeIndex,
283
472
  onClick: () => selectOption(option),
284
473
  onPointerEnter: () => setActiveIndex(index),
285
- style: {
286
- display: "block",
287
- width: "100%",
288
- textAlign: "left",
289
- padding: "var(--wp-space-2) var(--wp-space-3)",
290
- border: 0,
291
- borderRadius: "var(--wp-radius-sm)",
292
- background: index === activeIndex ? "var(--wp-surface-hover)" : "transparent",
293
- color: "var(--wp-text-default)",
294
- font: "inherit",
295
- cursor: "pointer"
296
- },
474
+ style: optionRowStyle(index === activeIndex),
297
475
  children: [
298
476
  /* @__PURE__ */ jsx("span", { className: "wp-body-sm", style: ellipsisStyle, children: pickText(option, labelKey) || pickText(option, valueKey) }),
299
477
  optionSub ? /* @__PURE__ */ jsx("span", { className: "wp-caption", style: ellipsisStyle, children: optionSub }) : null
@@ -308,4 +486,4 @@ function AutocompleteFieldImpl({
308
486
  }
309
487
  var AutocompleteField = boxed(AutocompleteFieldImpl, "AutocompleteField");
310
488
 
311
- export { AutocompleteField, endpointSearchFn, toAutocompleteOptions };
489
+ export { AutocompleteField, endpointSearchFn, freeTextCreateLabel, toAutocompleteOptions };
@@ -1,5 +1,5 @@
1
1
  import { useOverlayLayer, OverlayContainerContext, getOverlayRoot } from './chunk-R2ORCOTG.js';
2
- import { IconButton } from './chunk-KIHN7DGA.js';
2
+ import { IconButton } from './chunk-NKRZVRGH.js';
3
3
  import { useState, useRef, useCallback, useEffect, useContext } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { useSduiAdapter, hostFetchOf } from './chunk-XFNHHGFR.js';
2
- import { Badge, Tag } from './chunk-KIHN7DGA.js';
1
+ import { useSduiAdapter, hostFetchOf } from './chunk-RMYGRGKS.js';
2
+ import { Badge, Tag } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useRef, useEffect, useMemo, useState } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
- import { TagMultiSelect } from './chunk-TCHXA35K.js';
2
- import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-4SVSS7VO.js';
3
- import { orderCircleStyle, unwrapRows, uid } from './chunk-YOLT2TPX.js';
4
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
5
- import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-KIHN7DGA.js';
1
+ import { TagMultiSelect } from './chunk-3M64LBYZ.js';
2
+ import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-NTMFLJEE.js';
3
+ import { orderCircleStyle, unwrapRows, uid } from './chunk-A2PG44CM.js';
4
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-RMYGRGKS.js';
5
+ import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-NKRZVRGH.js';
6
6
  import { boxed } from './chunk-3JTBOABA.js';
7
7
  import React, { useRef, useState, useEffect } from 'react';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Text } from './chunk-YK7ZNV2C.js';
2
- import { Switch, Field, Select, Input } from './chunk-KIHN7DGA.js';
1
+ import { Text } from './chunk-CZMSQ3B3.js';
2
+ import { Switch, Field, Select, Input } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import React, { useMemo } from 'react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { ImageViewer } from './chunk-PN5IJPA5.js';
1
+ import { ImageViewer } from './chunk-3LPLTD66.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState } from 'react';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { isPlainObject } from './chunk-KIHN7DGA.js';
1
+ import { isPlainObject } from './chunk-NKRZVRGH.js';
2
2
 
3
3
  // src/widgets/shared.ts
4
4
  function unwrapRows(payload) {
@@ -1,4 +1,4 @@
1
- import { formatDisplayValue } from './chunk-KIHN7DGA.js';
1
+ import { formatDisplayValue } from './chunk-NKRZVRGH.js';
2
2
  import { mergeStyle, containerLayoutStyle, joinClass, columnsClass, typographyStyle, GAP_CSS } from './chunk-3JTBOABA.js';
3
3
  import React from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
- import { useDismiss, usePopoverAnchor, usePanelPointer, usePortalTo, CalendarNav, KO_CALENDAR_NAV_LOCALE, CalendarZoom, anchorStyle, AnchoredPopoverStyles } from './chunk-KJDHF6VU.js';
1
+ import { useDismiss, usePopoverAnchor, usePanelPointer, usePortalTo, CalendarNav, KO_CALENDAR_NAV_LOCALE, CalendarZoom, anchorStyle, AnchoredPopoverStyles } from './chunk-FR7S52ZL.js';
2
2
  import { tabbablesIn } from './chunk-R2ORCOTG.js';
3
3
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
4
4
  import { useIsMobile } from './chunk-TAVKGYH5.js';
5
- import { SegmentedControl, Button, Tag, EmptyState, Icon, Badge } from './chunk-KIHN7DGA.js';
5
+ import { SegmentedControl, Button, Tag, EmptyState, Icon, Badge } from './chunk-NKRZVRGH.js';
6
6
  import { boxed } from './chunk-3JTBOABA.js';
7
7
  import { useState, useMemo, useRef, useCallback } from 'react';
8
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { DatePicker, TimePicker } from './chunk-5JXXCRXA.js';
2
- import { Field } from './chunk-KIHN7DGA.js';
1
+ import { DatePicker, TimePicker } from './chunk-LDIEWJNP.js';
2
+ import { Field } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useRef, useEffect, useMemo } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { Tag } from './chunk-KIHN7DGA.js';
2
+ import { Tag } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo, useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { OverlayContainerContext, getOverlayRoot, useOverlayLayer } from './chunk-R2ORCOTG.js';
2
2
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
3
- import { IconButton } from './chunk-KIHN7DGA.js';
3
+ import { IconButton } from './chunk-NKRZVRGH.js';
4
4
  import React2, { useState, useRef, useEffect, useLayoutEffect, useCallback } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
  import { createPortal } from 'react-dom';
@@ -1,5 +1,5 @@
1
1
  import { usePanZoomCanvas, MIN_ZOOM, MAX_ZOOM } from './chunk-XDR6HC4U.js';
2
- import { IconButton, Badge } from './chunk-KIHN7DGA.js';
2
+ import { IconButton, Badge } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo, useCallback, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Spinner, EmptyState } from './chunk-KIHN7DGA.js';
1
+ import { Spinner, EmptyState } from './chunk-NKRZVRGH.js';
2
2
  import { useState, useEffect } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Icon, Badge, Tooltip } from './chunk-KIHN7DGA.js';
1
+ import { Icon, Badge, Tooltip } from './chunk-NKRZVRGH.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import React from 'react';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { fetchAllJobPositions } from './chunk-XRHR452N.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
3
- import { Select, Button } from './chunk-KIHN7DGA.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-RMYGRGKS.js';
3
+ import { Select, Button } from './chunk-NKRZVRGH.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useRef, useState, useEffect, useMemo } from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { DateRangePicker } from './chunk-5JXXCRXA.js';
2
- import { SegmentedControl, Select } from './chunk-KIHN7DGA.js';
1
+ import { DateRangePicker } from './chunk-LDIEWJNP.js';
2
+ import { SegmentedControl, Select } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { ImageLightbox } from './chunk-JDTVNS3H.js';
2
- import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-XFNHHGFR.js';
3
- import { Spinner, Icon, IconButton } from './chunk-KIHN7DGA.js';
1
+ import { ImageLightbox } from './chunk-5NDYDUMJ.js';
2
+ import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-RMYGRGKS.js';
3
+ import { Spinner, Icon, IconButton } from './chunk-NKRZVRGH.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useState, useRef, useEffect, useCallback } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Disclosure } from './chunk-LONXOEZY.js';
2
- import { Icon } from './chunk-KIHN7DGA.js';
1
+ import { Disclosure } from './chunk-UYOQ3SEG.js';
2
+ import { Icon } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -1,6 +1,6 @@
1
- import { resolveTreeNodes, TreeView } from './chunk-OI2GPBIL.js';
1
+ import { resolveTreeNodes, TreeView } from './chunk-LK7MHTJO.js';
2
2
  import { OverlayLayer } from './chunk-R2ORCOTG.js';
3
- import { Field, Dialog, Icon, Button, Input } from './chunk-KIHN7DGA.js';
3
+ import { Field, Dialog, Icon, Button, Input } from './chunk-NKRZVRGH.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useState, useMemo } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { KO_CALENDAR_NAV_LOCALE, useDismiss, usePopoverAnchor, usePortalTo, usePanelPointer, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-KJDHF6VU.js';
1
+ import { KO_CALENDAR_NAV_LOCALE, useDismiss, usePopoverAnchor, usePortalTo, usePanelPointer, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-FR7S52ZL.js';
2
2
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
3
3
  import { useIsMobile } from './chunk-TAVKGYH5.js';
4
- import { Icon } from './chunk-KIHN7DGA.js';
4
+ import { Icon } from './chunk-NKRZVRGH.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useState, useRef, useEffect, useMemo, useCallback, useLayoutEffect } from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
1
  import { fetchAllJobPositions } from './chunk-XRHR452N.js';
2
- import { useSduiDispatch, useSduiCan, SduiDialog } from './chunk-O3SD2HS6.js';
3
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
4
- import { Card, Input, Button, Icon, Badge, IconButton } from './chunk-KIHN7DGA.js';
2
+ import { useSduiDispatch, useSduiCan, SduiDialog } from './chunk-RT2I2U45.js';
3
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-RMYGRGKS.js';
4
+ import { Card, Input, Button, Icon, Badge, IconButton } from './chunk-NKRZVRGH.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import React, { useState, useEffect, useCallback, useMemo } from 'react';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { buildCascadingTree } from './chunk-I2URQNZZ.js';
2
- import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-KIHN7DGA.js';
1
+ import { buildCascadingTree } from './chunk-MIFCOTLQ.js';
2
+ import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import React, { useMemo, useState, useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { fetchAllPages } from './chunk-YOLT2TPX.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
3
- import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-KIHN7DGA.js';
1
+ import { fetchAllPages } from './chunk-A2PG44CM.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-RMYGRGKS.js';
3
+ import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-NKRZVRGH.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useRef, useMemo, useState, useCallback, useEffect } from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { DateRangePicker } from './chunk-5JXXCRXA.js';
1
+ import { DateRangePicker } from './chunk-LDIEWJNP.js';
2
2
  import { useOverlayLayer } from './chunk-R2ORCOTG.js';
3
3
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
4
- import { Input, Button, IconButton, Tag, Field, Checkbox } from './chunk-KIHN7DGA.js';
4
+ import { Input, Button, IconButton, Tag, Field, Checkbox, plainNumberText, formatNumberValue } from './chunk-NKRZVRGH.js';
5
5
  import { useRef, useEffect, useState, useMemo } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
 
@@ -272,9 +272,10 @@ function activeSearchCriteria(fields, values) {
272
272
  const from = values[fromKey];
273
273
  const to = values[toKey];
274
274
  if (from || to) {
275
+ const show = (v) => field.type === "numberRange" ? formatNumberValue(v ?? "") : v ?? "";
275
276
  criteria.push({
276
277
  key: field.key,
277
- label: `${field.label}: ${from ?? ""}~${to ?? ""}`,
278
+ label: `${field.label}: ${show(from)}~${show(to)}`,
278
279
  clearKeys: [fromKey, toKey]
279
280
  });
280
281
  }
@@ -438,26 +439,27 @@ function SearchFieldInput({
438
439
  if (field.type === "numberRange") {
439
440
  const fromKey = field.fromKey ?? `${field.key}Min`;
440
441
  const toKey = field.toKey ?? `${field.key}Max`;
442
+ const store = (key) => (next) => onChange({ [key]: next === null ? "" : plainNumberText(next) });
441
443
  return /* @__PURE__ */ jsx(Field, { label: field.label, children: /* @__PURE__ */ jsxs("div", { className: "wp-row", children: [
442
444
  /* @__PURE__ */ jsx(
443
445
  Input,
444
446
  {
445
- type: "number",
447
+ thousands: true,
446
448
  mono: true,
447
449
  placeholder: field.minPlaceholder ?? "\uCD5C\uC18C",
448
450
  value: values[fromKey] ?? "",
449
- onChange: (e) => onChange({ [fromKey]: e.target.value })
451
+ onChange: store(fromKey)
450
452
  }
451
453
  ),
452
454
  /* @__PURE__ */ jsx("span", { className: "wp-caption", children: "~" }),
453
455
  /* @__PURE__ */ jsx(
454
456
  Input,
455
457
  {
456
- type: "number",
458
+ thousands: true,
457
459
  mono: true,
458
460
  placeholder: field.maxPlaceholder ?? "\uCD5C\uB300",
459
461
  value: values[toKey] ?? "",
460
- onChange: (e) => onChange({ [toKey]: e.target.value })
462
+ onChange: store(toKey)
461
463
  }
462
464
  )
463
465
  ] }) });
@@ -1,5 +1,5 @@
1
- import { useSduiAssetResolver } from './chunk-XFNHHGFR.js';
2
- import { Spinner, Icon } from './chunk-KIHN7DGA.js';
1
+ import { useSduiAssetResolver } from './chunk-RMYGRGKS.js';
2
+ import { Spinner, Icon } from './chunk-NKRZVRGH.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-RMYGRGKS.js';
3
3
  import { MOBILE_MEDIA_QUERY } from './chunk-TAVKGYH5.js';
4
- import { Icon, Badge, Checkbox, Select, Button } from './chunk-KIHN7DGA.js';
4
+ import { Icon, Badge, Checkbox, Select, Button } from './chunk-NKRZVRGH.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useRef, useEffect, useState, useMemo } from 'react';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';