@wipco/sdui 0.18.0 → 0.18.2
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/{chunk-3MS4UWWZ.js → chunk-IXC547V6.js} +18 -1
- package/dist/{chunk-RK64BOF5.js → chunk-J532YYGP.js} +1 -1
- package/dist/{chunk-54UHTU6R.js → chunk-WXBOQRD6.js} +1 -1
- package/dist/{chunk-JOAUXZZA.js → chunk-XQPTSEJC.js} +19 -7
- package/dist/{chunk-HYSYJO3Q.js → chunk-YJSOC5KM.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/rich.js +3 -3
- package/dist/widgets/AutocompleteField.js +1 -1
- package/dist/widgets/SearchableMultiPicker.js +2 -2
- package/dist/widgets/TreePicker.js +2 -2
- package/dist/widgets/index.js +6 -6
- package/package.json +1 -1
|
@@ -66,6 +66,17 @@ function AutocompleteFieldImpl({
|
|
|
66
66
|
const [results, setResults] = useState([]);
|
|
67
67
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
68
68
|
const [focusPending, setFocusPending] = useState(false);
|
|
69
|
+
const listRef = useRef(null);
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!open) return;
|
|
72
|
+
const box = listRef.current;
|
|
73
|
+
const active = box?.querySelector(`#${CSS.escape(`${listId}-opt-${activeIndex}`)}`);
|
|
74
|
+
if (!box || !active) return;
|
|
75
|
+
const top = active.offsetTop;
|
|
76
|
+
const bottom = top + active.offsetHeight;
|
|
77
|
+
if (top < box.scrollTop) box.scrollTop = top;
|
|
78
|
+
else if (bottom > box.scrollTop + box.clientHeight) box.scrollTop = bottom - box.clientHeight;
|
|
79
|
+
}, [open, activeIndex, listId, results]);
|
|
69
80
|
useEffect(() => {
|
|
70
81
|
if (disabled || hasSelection) return;
|
|
71
82
|
const keyword = query.trim();
|
|
@@ -235,9 +246,15 @@ function AutocompleteFieldImpl({
|
|
|
235
246
|
"div",
|
|
236
247
|
{
|
|
237
248
|
id: listId,
|
|
249
|
+
ref: listRef,
|
|
238
250
|
role: "listbox",
|
|
239
251
|
className: "erp-popover__body",
|
|
240
|
-
style: {
|
|
252
|
+
style: {
|
|
253
|
+
maxHeight: 280,
|
|
254
|
+
overflowY: "auto",
|
|
255
|
+
overscrollBehavior: "contain",
|
|
256
|
+
padding: "var(--wp-space-1)"
|
|
257
|
+
},
|
|
241
258
|
children: 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: [
|
|
242
259
|
/* @__PURE__ */ jsx(Icon, { name: "unplug", size: 16, style: { color: "var(--wp-text-muted)", flex: "none" } }),
|
|
243
260
|
/* @__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" })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveTreeNodes, TreeView } from './chunk-PYSTET2C.js';
|
|
2
|
-
import { OverlayLayer } from './chunk-
|
|
2
|
+
import { OverlayLayer } from './chunk-XQPTSEJC.js';
|
|
3
3
|
import { Field, Dialog, Icon, Button, Input } from './chunk-WIDDHR7L.js';
|
|
4
4
|
import { boxed } from './chunk-SAN4IX6N.js';
|
|
5
5
|
import { useState, useMemo, useEffect } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OverlayLayer } from './chunk-
|
|
1
|
+
import { OverlayLayer } from './chunk-XQPTSEJC.js';
|
|
2
2
|
import { includesLooseSearch } from './chunk-GZB6YLUI.js';
|
|
3
3
|
import { Button, Dialog, Input, Tag, Checkbox } from './chunk-WIDDHR7L.js';
|
|
4
4
|
import { boxed } from './chunk-SAN4IX6N.js';
|
|
@@ -45,6 +45,14 @@ function topLayer(list) {
|
|
|
45
45
|
}
|
|
46
46
|
return best;
|
|
47
47
|
}
|
|
48
|
+
function layerHoldsTop(list, id) {
|
|
49
|
+
const top = topLayer(list);
|
|
50
|
+
if (!top) return false;
|
|
51
|
+
if (top.id === id) return true;
|
|
52
|
+
const mine = list.find((l) => l.id === id)?.node();
|
|
53
|
+
const topNode = top.node();
|
|
54
|
+
return !!mine && !!topNode && mine.contains(topNode);
|
|
55
|
+
}
|
|
48
56
|
function escapeTopmost() {
|
|
49
57
|
topLayer(layers)?.onEscape();
|
|
50
58
|
}
|
|
@@ -81,16 +89,20 @@ function useOverlayLayer(active, onEscape, nodeRef) {
|
|
|
81
89
|
nodeRefRef.current = nodeRef;
|
|
82
90
|
useEffect(() => {
|
|
83
91
|
if (!active) return;
|
|
84
|
-
const
|
|
92
|
+
const id2 = idRef.current;
|
|
85
93
|
push({
|
|
86
|
-
id,
|
|
94
|
+
id: id2,
|
|
87
95
|
onEscape: () => escapeRef.current?.(),
|
|
88
96
|
node: () => nodeRefRef.current?.current ?? null
|
|
89
97
|
});
|
|
90
|
-
return () => remove(
|
|
98
|
+
return () => remove(id2);
|
|
91
99
|
}, [active]);
|
|
92
100
|
const current = useSyncExternalStore(subscribe, snapshot, serverSnapshot);
|
|
93
|
-
|
|
101
|
+
const id = idRef.current;
|
|
102
|
+
return {
|
|
103
|
+
isTop: active && topLayer(current)?.id === id,
|
|
104
|
+
holdsTop: active && layerHoldsTop(current, id)
|
|
105
|
+
};
|
|
94
106
|
}
|
|
95
107
|
var OverlayContainerContext = React.createContext(null);
|
|
96
108
|
function OverlayLayer({
|
|
@@ -99,10 +111,10 @@ function OverlayLayer({
|
|
|
99
111
|
}) {
|
|
100
112
|
const ref = useRef(null);
|
|
101
113
|
const container = React.useContext(OverlayContainerContext);
|
|
102
|
-
const {
|
|
114
|
+
const { holdsTop } = useOverlayLayer(true, onClose, ref);
|
|
103
115
|
useEffect(() => {
|
|
104
|
-
ref.current?.toggleAttribute("inert", !
|
|
105
|
-
}, [
|
|
116
|
+
ref.current?.toggleAttribute("inert", !holdsTop);
|
|
117
|
+
}, [holdsTop]);
|
|
106
118
|
const layer = /* @__PURE__ */ jsx(
|
|
107
119
|
"div",
|
|
108
120
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useOverlayLayer } from './chunk-
|
|
1
|
+
import { useOverlayLayer } from './chunk-XQPTSEJC.js';
|
|
2
2
|
import { Icon } from './chunk-WIDDHR7L.js';
|
|
3
3
|
import { boxed } from './chunk-SAN4IX6N.js';
|
|
4
4
|
import { createContext, useState, useRef, useMemo, useCallback, useEffect, useLayoutEffect, useContext } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1760,6 +1760,7 @@ declare function getOverlayRoot(): HTMLElement | null;
|
|
|
1760
1760
|
*/
|
|
1761
1761
|
declare function useOverlayLayer(active: boolean, onEscape?: () => void, nodeRef?: React__default.RefObject<HTMLElement | null>): {
|
|
1762
1762
|
isTop: boolean;
|
|
1763
|
+
holdsTop: boolean;
|
|
1763
1764
|
};
|
|
1764
1765
|
/**
|
|
1765
1766
|
* 겹을 담을 곳을 바꾼다. 기본은 body 밑 단일 루트지만, **화면 일부에 페이지를
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DEV, HoistedStyle, isSafeNavigationTarget, useSduiAdapter, hostFetchOf, DateRangePicker, DatePicker, useSduiSandbox, resolveAdapter, assetResolverOf, SduiAdapterContext } from './chunk-
|
|
2
|
-
export { DatePicker, DateRangePicker, defaultAdapter, useSduiAssetResolver, useSduiSandbox } from './chunk-
|
|
1
|
+
import { DEV, HoistedStyle, isSafeNavigationTarget, useSduiAdapter, hostFetchOf, DateRangePicker, DatePicker, useSduiSandbox, resolveAdapter, assetResolverOf, SduiAdapterContext } from './chunk-YJSOC5KM.js';
|
|
2
|
+
export { DatePicker, DateRangePicker, defaultAdapter, useSduiAssetResolver, useSduiSandbox } from './chunk-YJSOC5KM.js';
|
|
3
3
|
import { ImageViewer } from './chunk-THEP3VWY.js';
|
|
4
4
|
export { ImageViewer } from './chunk-THEP3VWY.js';
|
|
5
|
-
import { OverlayLayer } from './chunk-
|
|
6
|
-
export { OverlayContainerContext, OverlayLayer, getOverlayRoot, useOverlayLayer } from './chunk-
|
|
5
|
+
import { OverlayLayer } from './chunk-XQPTSEJC.js';
|
|
6
|
+
export { OverlayContainerContext, OverlayLayer, getOverlayRoot, useOverlayLayer } from './chunk-XQPTSEJC.js';
|
|
7
7
|
import { normalizeSearchFields, searchValuesFromParams, splitMultiValue, includesLooseSearch, cascadingValuePaths, SearchToolbar, searchFieldKeys, Popover } from './chunk-GZB6YLUI.js';
|
|
8
8
|
export { SearchToolbar, cascadingValuePaths, cleanSearchValues, includesLooseSearch, joinMultiValue, normalizeSearchText, searchFieldKeys, searchValuesFromParams, splitMultiValue } from './chunk-GZB6YLUI.js';
|
|
9
9
|
import { EmptyState, Button, Checkbox, SegmentedControl, Spinner, Select, Pagination, Icon, Card, Badge, ProgressBar, Tag, Toast, Textarea, Tabs, Table, Switch, StatCard, Input, IconButton, Field, Alert, warnOnce, Dialog } from './chunk-WIDDHR7L.js';
|
package/dist/rich.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useSduiAssetResolver, HoistedStyle } from './chunk-
|
|
2
|
-
export { DatePicker, DateRangePicker } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { useSduiAssetResolver, HoistedStyle } from './chunk-YJSOC5KM.js';
|
|
2
|
+
export { DatePicker, DateRangePicker } from './chunk-YJSOC5KM.js';
|
|
3
|
+
import './chunk-XQPTSEJC.js';
|
|
4
4
|
import { Spinner, EmptyState } from './chunk-WIDDHR7L.js';
|
|
5
5
|
import './chunk-SAN4IX6N.js';
|
|
6
6
|
import { useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SearchableMultiPicker } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { SearchableMultiPicker } from '../chunk-WXBOQRD6.js';
|
|
2
|
+
import '../chunk-XQPTSEJC.js';
|
|
3
3
|
import '../chunk-GZB6YLUI.js';
|
|
4
4
|
import '../chunk-WIDDHR7L.js';
|
|
5
5
|
import '../chunk-SAN4IX6N.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { TreePicker } from '../chunk-
|
|
1
|
+
export { TreePicker } from '../chunk-J532YYGP.js';
|
|
2
2
|
import '../chunk-PYSTET2C.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-XQPTSEJC.js';
|
|
4
4
|
import '../chunk-GZB6YLUI.js';
|
|
5
5
|
import '../chunk-WIDDHR7L.js';
|
|
6
6
|
import '../chunk-SAN4IX6N.js';
|
package/dist/widgets/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchableMultiPicker } from '../chunk-
|
|
2
|
-
export { SearchableMultiPicker } from '../chunk-
|
|
1
|
+
import { SearchableMultiPicker } from '../chunk-WXBOQRD6.js';
|
|
2
|
+
export { SearchableMultiPicker } from '../chunk-WXBOQRD6.js';
|
|
3
3
|
import { SecureScreen } from '../chunk-IIRENCDS.js';
|
|
4
4
|
export { SecureScreen } from '../chunk-IIRENCDS.js';
|
|
5
5
|
import { StackedMeter } from '../chunk-BMZKZGJF.js';
|
|
@@ -12,8 +12,8 @@ import { TagMultiSelect } from '../chunk-QDEZXA34.js';
|
|
|
12
12
|
export { TagMultiSelect } from '../chunk-QDEZXA34.js';
|
|
13
13
|
import { Timeline } from '../chunk-EFYEOT47.js';
|
|
14
14
|
export { Timeline } from '../chunk-EFYEOT47.js';
|
|
15
|
-
import { TreePicker } from '../chunk-
|
|
16
|
-
export { TreePicker } from '../chunk-
|
|
15
|
+
import { TreePicker } from '../chunk-J532YYGP.js';
|
|
16
|
+
export { TreePicker } from '../chunk-J532YYGP.js';
|
|
17
17
|
import { TreeView } from '../chunk-PYSTET2C.js';
|
|
18
18
|
export { TreeView, buildTreeNodes } from '../chunk-PYSTET2C.js';
|
|
19
19
|
import { EventCalendar } from '../chunk-C3JY6GA3.js';
|
|
@@ -33,8 +33,8 @@ export { PeriodFilter } from '../chunk-M3TDEPD2.js';
|
|
|
33
33
|
import { PrintSheet } from '../chunk-MYJ2KEIP.js';
|
|
34
34
|
export { PrintSheet } from '../chunk-MYJ2KEIP.js';
|
|
35
35
|
import '../chunk-THEP3VWY.js';
|
|
36
|
-
import '../chunk-
|
|
37
|
-
export { AutocompleteField, toAutocompleteOptions } from '../chunk-
|
|
36
|
+
import '../chunk-XQPTSEJC.js';
|
|
37
|
+
export { AutocompleteField, toAutocompleteOptions } from '../chunk-IXC547V6.js';
|
|
38
38
|
import '../chunk-GZB6YLUI.js';
|
|
39
39
|
import { ColumnBoard } from '../chunk-C4JRSZGS.js';
|
|
40
40
|
export { ColumnBoard } from '../chunk-C4JRSZGS.js';
|