@wipco/sdui 1.5.0 → 1.6.1
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/{DatePicker-C_TT_SOw.d.ts → DatePicker-DX9juElE.d.ts} +10 -1
- package/dist/{chunk-7P7N43JV.js → chunk-34BABTH4.js} +2 -2
- package/dist/{chunk-DMLDKW7K.js → chunk-37BNG4DT.js} +1 -1
- package/dist/{chunk-5WW4MBRO.js → chunk-3JTBOABA.js} +6 -2
- package/dist/{chunk-HBIIEYKW.js → chunk-3PCR73OC.js} +4 -4
- package/dist/{chunk-VY7MVBSE.js → chunk-3PT5OBOU.js} +2 -2
- package/dist/{chunk-YVTV4ZV6.js → chunk-4YPPL7JK.js} +1 -1
- package/dist/{chunk-E6ISNQK3.js → chunk-6YBSBC77.js} +31 -8
- package/dist/{chunk-YWUDBLO6.js → chunk-7G6J6QFC.js} +2 -2
- package/dist/{chunk-UV6HHFEW.js → chunk-A57GKV5F.js} +129 -68
- package/dist/{chunk-I45EUZC6.js → chunk-AJ3KDBEE.js} +4 -2
- package/dist/chunk-BITS7UJY.js +333 -0
- package/dist/{chunk-DOL57OOP.js → chunk-BV37UCDF.js} +3 -3
- package/dist/chunk-CSZCWBOE.js +256 -0
- package/dist/{chunk-XGFDY43I.js → chunk-CUFGH3LB.js} +88 -18
- package/dist/{chunk-A6LAIGUS.js → chunk-EGFDELSF.js} +7 -4
- package/dist/{chunk-JIV4YHCZ.js → chunk-EJIWOD7W.js} +1 -1
- package/dist/{chunk-CXW6KT6X.js → chunk-ESAFQXEU.js} +3 -3
- package/dist/{chunk-N5RKM6IC.js → chunk-EUSC5NMZ.js} +4 -4
- package/dist/{chunk-RWSH2MBU.js → chunk-FP32LNFK.js} +73 -19
- package/dist/{chunk-44TDRCKR.js → chunk-GKYUDTMI.js} +5 -5
- package/dist/chunk-GSM664TX.js +38 -0
- package/dist/{chunk-I5SD7XRA.js → chunk-GSXD52XG.js} +3 -3
- package/dist/{chunk-O4IISNE7.js → chunk-IB2ZPUTF.js} +51 -12
- package/dist/{chunk-YOZN35HD.js → chunk-IIRVHSNK.js} +3 -3
- package/dist/{chunk-FNMS7OB7.js → chunk-J7BZF4T4.js} +5 -5
- package/dist/{chunk-KO6OEY3G.js → chunk-JHFA5RDN.js} +3 -13
- package/dist/{chunk-DKVSM5HX.js → chunk-KDKRFWIF.js} +6 -6
- package/dist/chunk-KO3EUNWB.js +380 -0
- package/dist/{chunk-JYAR7D5U.js → chunk-NLSR3JYU.js} +2 -2
- package/dist/{chunk-ZORQPB6B.js → chunk-O4EMQWCV.js} +325 -360
- package/dist/{chunk-2HLXCKK7.js → chunk-OCYJ2ZOV.js} +2 -2
- package/dist/{chunk-OQ52XMGG.js → chunk-OKNF2SBB.js} +4 -4
- package/dist/{chunk-GNA6SX2H.js → chunk-OQ7A3SFM.js} +2 -2
- package/dist/{chunk-A5XQOEVH.js → chunk-PCFH74RD.js} +4 -4
- package/dist/{chunk-BEM2YS7U.js → chunk-SGGIWPP6.js} +3 -3
- package/dist/{chunk-NIJUVTEW.js → chunk-TB7G5DXQ.js} +3 -3
- package/dist/{chunk-GZBY7I4Y.js → chunk-TWUKNUUQ.js} +66 -10
- package/dist/{chunk-WPSK2CB5.js → chunk-UC725BGW.js} +16 -5
- package/dist/{chunk-ZFNFPXPR.js → chunk-US3K6Q5T.js} +2 -2
- package/dist/{chunk-MPT7WJG2.js → chunk-USNPJEXH.js} +5 -5
- package/dist/{chunk-SAPBDJJQ.js → chunk-UZZLMPRW.js} +2 -2
- package/dist/{chunk-Q4SWUINA.js → chunk-VAXRTBJH.js} +1 -1
- package/dist/{chunk-RYBBPFI7.js → chunk-VQKX5PJ4.js} +4 -4
- package/dist/chunk-VR5MFUD2.js +106 -0
- package/dist/{chunk-JZXU22PE.js → chunk-VSNHDHGS.js} +208 -117
- package/dist/{chunk-2YP5N4VV.js → chunk-VZOQRQAR.js} +1 -1
- package/dist/{chunk-AXGF4M57.js → chunk-XAXROQKB.js} +1 -1
- package/dist/{chunk-IZ3JA2BR.js → chunk-XFKNU6QN.js} +3 -3
- package/dist/{chunk-GTGS2QRL.js → chunk-XUVWIRZJ.js} +3 -3
- package/dist/{chunk-RNOUXUBO.js → chunk-YYAGE733.js} +323 -59
- package/dist/index.d.ts +449 -91
- package/dist/index.js +1060 -138
- package/dist/{layout-C3nRXMwb.d.ts → layout-DmRikwZb.d.ts} +5 -4
- package/dist/meta.d.ts +1 -1
- package/dist/meta.js +351 -25
- package/dist/rich/ExcelUploadCard.d.ts +1 -1
- package/dist/rich/ExcelUploadCard.js +5 -4
- package/dist/rich.d.ts +22 -3
- package/dist/rich.js +304 -35
- package/dist/styles.css +119 -4
- package/dist/{types-COjGKgmd.d.ts → types-CMikpoN5.d.ts} +65 -2
- package/dist/widgets/ApprovalLineEditor.d.ts +1 -1
- package/dist/widgets/ApprovalLineEditor.js +9 -8
- package/dist/widgets/ApprovalOverridesEditor.d.ts +1 -1
- package/dist/widgets/ApprovalOverridesEditor.js +11 -10
- package/dist/widgets/ApprovalStepper.d.ts +29 -4
- package/dist/widgets/ApprovalStepper.js +3 -3
- package/dist/widgets/AutocompleteField.d.ts +1 -1
- package/dist/widgets/AutocompleteField.js +9 -8
- package/dist/widgets/ColumnBoard.d.ts +1 -1
- package/dist/widgets/ColumnBoard.js +3 -3
- package/dist/widgets/DiffView.d.ts +1 -1
- package/dist/widgets/DiffView.js +3 -3
- package/dist/widgets/Disclosure.d.ts +1 -1
- package/dist/widgets/Disclosure.js +3 -3
- package/dist/widgets/EventCalendar.d.ts +5 -1
- package/dist/widgets/EventCalendar.js +5 -3
- package/dist/widgets/FileDropzone.d.ts +1 -1
- package/dist/widgets/FileDropzone.js +9 -7
- package/dist/widgets/ImageLightbox.d.ts +1 -1
- package/dist/widgets/ImageLightbox.js +7 -5
- package/dist/widgets/InlineEdit.d.ts +1 -1
- package/dist/widgets/InlineEdit.js +3 -3
- package/dist/widgets/JsonField.d.ts +1 -1
- package/dist/widgets/JsonField.js +3 -3
- package/dist/widgets/LiveClock.d.ts +1 -1
- package/dist/widgets/LiveClock.js +2 -2
- package/dist/widgets/OptionSchemaEditor.d.ts +1 -1
- package/dist/widgets/OptionSchemaEditor.js +4 -4
- package/dist/widgets/OptionValueFields.d.ts +1 -1
- package/dist/widgets/OptionValueFields.js +4 -4
- package/dist/widgets/OrgChart.d.ts +1 -1
- package/dist/widgets/OrgChart.js +4 -4
- package/dist/widgets/OrgChartBoard.d.ts +15 -33
- package/dist/widgets/OrgChartBoard.js +10 -8
- package/dist/widgets/PeriodFilter.d.ts +1 -1
- package/dist/widgets/PeriodFilter.js +6 -5
- package/dist/widgets/PermissionMatrixEditor.d.ts +34 -2
- package/dist/widgets/PermissionMatrixEditor.js +6 -4
- package/dist/widgets/PositionSelect.d.ts +1 -1
- package/dist/widgets/PositionSelect.js +5 -4
- package/dist/widgets/PrintSheet.d.ts +15 -2
- package/dist/widgets/PrintSheet.js +3 -3
- package/dist/widgets/ProfileEditDiffCard.d.ts +1 -1
- package/dist/widgets/ProfileEditDiffCard.js +5 -4
- package/dist/widgets/QRDisplay.d.ts +1 -1
- package/dist/widgets/QRDisplay.js +5 -4
- package/dist/widgets/RankBoard.d.ts +1 -1
- package/dist/widgets/RankBoard.js +8 -6
- package/dist/widgets/RecordSheet.d.ts +1 -1
- package/dist/widgets/RecordSheet.js +2 -2
- package/dist/widgets/RoleMemberPicker.d.ts +1 -1
- package/dist/widgets/RoleMemberPicker.js +6 -5
- package/dist/widgets/SearchableMultiPicker.d.ts +1 -1
- package/dist/widgets/SearchableMultiPicker.js +7 -6
- package/dist/widgets/SecureScreen.d.ts +1 -1
- package/dist/widgets/SecureScreen.js +3 -3
- package/dist/widgets/StackedMeter.d.ts +1 -1
- package/dist/widgets/StackedMeter.js +2 -2
- package/dist/widgets/StagePeriodEditor.d.ts +1 -1
- package/dist/widgets/StagePeriodEditor.js +6 -5
- package/dist/widgets/Strip.d.ts +1 -1
- package/dist/widgets/Strip.js +2 -2
- package/dist/widgets/SummaryTable.d.ts +1 -1
- package/dist/widgets/SummaryTable.js +2 -2
- package/dist/widgets/TagInput.d.ts +1 -1
- package/dist/widgets/TagInput.js +3 -3
- package/dist/widgets/TagMultiSelect.d.ts +1 -1
- package/dist/widgets/TagMultiSelect.js +5 -4
- package/dist/widgets/Timeline.d.ts +1 -1
- package/dist/widgets/Timeline.js +4 -4
- package/dist/widgets/TreePicker.d.ts +1 -1
- package/dist/widgets/TreePicker.js +8 -7
- package/dist/widgets/TreeView.d.ts +17 -3
- package/dist/widgets/TreeView.js +7 -6
- package/dist/widgets/index.d.ts +3 -3
- package/dist/widgets/index.js +84 -83
- package/package.json +1 -1
- package/dist/chunk-LFEJLOFN.js +0 -352
- package/dist/chunk-MMIGOPO5.js +0 -111
- package/dist/chunk-TFGNKFL2.js +0 -39
- package/dist/chunk-XQPTSEJC.js +0 -135
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SduiBoxProps } from './layout-
|
|
1
|
+
import { S as SduiBoxProps } from './layout-DmRikwZb.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
interface TimePickerProps {
|
|
@@ -57,6 +57,15 @@ interface DatePickerProps {
|
|
|
57
57
|
* 같은 모양이라 서버로 가는 문자열은 그대로다). 칸에는 `2026-08-18 14:30`으로 보인다.
|
|
58
58
|
*/
|
|
59
59
|
withTime?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 값을 **시간대를 붙여** 돌려준다(`withTime` 전용) — `2026-07-03T01:00:00+09:00`.
|
|
62
|
+
*
|
|
63
|
+
* 생략하면 들어온 값에 시간대가 붙어 있을 때만 붙인다(서버가 준 timestamptz 를 고치는 수정
|
|
64
|
+
* 창). 새로 입력하는 등록 창은 들어온 값이 없어 시간대 없는 `YYYY-MM-DDTHH:mm` 이 나가는데,
|
|
65
|
+
* 서버가 그것을 UTC 로 읽는 열(timestamptz)이면 9시간 어긋나 저장된다 — 그런 칸은 `true`
|
|
66
|
+
* 로 켠다. 시간대 없는 값만 받는 서버(벽시계 문자열을 직접 파싱하는 곳)는 켜지 않는다.
|
|
67
|
+
*/
|
|
68
|
+
zoned?: boolean;
|
|
60
69
|
/** 표시 로캘(요일·캡션·낭독 라벨·주 시작 요일). 기본 한국어·일요일 시작. 값 계약은 불변. */
|
|
61
70
|
locale?: DatePickerLocale;
|
|
62
71
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconButton, Input } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { IconButton, Input } from './chunk-YYAGE733.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -133,8 +133,12 @@ var LAYOUT_CSS = `
|
|
|
133
133
|
.wp-grid--1{grid-template-columns:minmax(0,1fr)}
|
|
134
134
|
.wp-grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}
|
|
135
135
|
.wp-grid--6{grid-template-columns:repeat(6,minmax(0,1fr))}
|
|
136
|
-
|
|
137
|
-
@media (max-width:
|
|
136
|
+
.wp-grid--custom{grid-template-columns:var(--wp-grid-template)}
|
|
137
|
+
@media screen and (max-width:1023.98px){.wp-grid--5:where(:not(.wp-grid--nocollapse)),.wp-grid--6:where(:not(.wp-grid--nocollapse)){grid-template-columns:repeat(2,minmax(0,1fr))}}
|
|
138
|
+
@media screen and (max-width:767.98px){.wp-grid--5:where(:not(.wp-grid--nocollapse)),.wp-grid--6:where(:not(.wp-grid--nocollapse)),.wp-grid--custom:where(:not(.wp-grid--nocollapse)){grid-template-columns:minmax(0,1fr)}}
|
|
139
|
+
.wp-kv__v{min-width:0;overflow-wrap:anywhere}
|
|
140
|
+
.wp-kv>.wp-kv__v--block{grid-column:1/-1;text-align:left;white-space:pre-wrap}
|
|
141
|
+
.wp-card--interactive[role=button]:focus-visible{outline:none;box-shadow:var(--wp-ring-focus)}
|
|
138
142
|
`;
|
|
139
143
|
var BOXED = /* @__PURE__ */ Symbol.for("wipco.sdui.boxed");
|
|
140
144
|
function apply(element, box) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { includesLooseSearch } from './chunk-
|
|
2
|
-
import { OverlayLayer } from './chunk-
|
|
3
|
-
import { Button, Dialog, Input, Tag, Checkbox } from './chunk-
|
|
4
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { includesLooseSearch } from './chunk-A57GKV5F.js';
|
|
2
|
+
import { OverlayLayer } from './chunk-BITS7UJY.js';
|
|
3
|
+
import { Button, Dialog, Input, Tag, Checkbox } from './chunk-YYAGE733.js';
|
|
4
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
5
5
|
import React, { useMemo, useState } from 'react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ImageViewer } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { ImageViewer } from './chunk-UZZLMPRW.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
3
|
-
import { useEffect } from 'react';
|
|
1
|
+
import { Button } from './chunk-YYAGE733.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
+
function canScriptCloseWindow(win) {
|
|
7
|
+
if (!win) return false;
|
|
8
|
+
try {
|
|
9
|
+
return Boolean(win.opener) || win.history.length <= 1;
|
|
10
|
+
} catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
6
14
|
var PRINT_CSS = `
|
|
7
15
|
.erp-print-shell{display:flex;flex-direction:column;align-items:center;gap:var(--wp-space-4);padding:var(--wp-space-6) var(--wp-space-4)}
|
|
8
|
-
.erp-print-toolbar{display:flex;justify-content:flex-end;gap:var(--wp-space-2);width:100%;max-width:210mm}
|
|
16
|
+
.erp-print-toolbar{display:flex;justify-content:flex-end;gap:var(--wp-space-2);width:100%;max-width:210mm;box-sizing:border-box}
|
|
9
17
|
.erp-print-sheet{width:100%;max-width:210mm;box-sizing:border-box;background:var(--wp-surface-card);border:var(--wp-border-w) solid var(--wp-border-subtle);border-radius:var(--wp-radius-lg);box-shadow:var(--wp-shadow-lg);padding:var(--wp-space-7)}
|
|
10
18
|
.erp-print-sheet table{border-collapse:collapse;width:100%}
|
|
11
19
|
.erp-print-sheet th,.erp-print-sheet td{border:var(--wp-border-w) solid var(--wp-border-default);padding:var(--wp-space-1) var(--wp-space-2)}
|
|
20
|
+
@media screen and (max-width:1023.98px){
|
|
21
|
+
.erp-print-sheet{padding:var(--wp-space-4)}
|
|
22
|
+
}
|
|
23
|
+
@media screen and (max-width:767.98px){
|
|
24
|
+
.erp-print-shell{padding:var(--wp-space-2) 0}
|
|
25
|
+
/* \uC2DC\uD2B8\uB294 \uC804\uD3ED\uC774\uC9C0\uB9CC \uB3C4\uAD6C\uC904\uC740 16px \uD648\uC744 \uC9C0\uD0A8\uB2E4 \u2014 '\uC778\uC1C4\uD558\uAE30'\uAC00 \uD654\uBA74 \uAC00\uC7A5\uC790\uB9AC\uC5D0 \uBD99\uC9C0 \uC54A\uAC8C. */
|
|
26
|
+
.erp-print-toolbar{padding-inline:var(--wp-space-4)}
|
|
27
|
+
.erp-print-sheet{padding:var(--wp-space-3);border-radius:var(--wp-radius-md);box-shadow:var(--wp-shadow-sm)}
|
|
28
|
+
}
|
|
12
29
|
@media print{
|
|
13
30
|
@page{size:A4;margin:1cm}
|
|
14
31
|
.erp-print-hidden{display:none !important}
|
|
@@ -19,17 +36,23 @@ var PRINT_CSS = `
|
|
|
19
36
|
function PrintStyles() {
|
|
20
37
|
return /* @__PURE__ */ jsx("style", { href: "erp-print", precedence: "medium", children: PRINT_CSS });
|
|
21
38
|
}
|
|
22
|
-
function PrintSheetImpl({ title, children, autoPrint = false }) {
|
|
39
|
+
function PrintSheetImpl({ title, children, autoPrint = false, toolbar = "auto" }) {
|
|
23
40
|
useEffect(() => {
|
|
24
41
|
if (!autoPrint || !window.opener) return;
|
|
25
42
|
const timer = window.setTimeout(() => window.print(), 500);
|
|
26
43
|
return () => window.clearTimeout(timer);
|
|
27
44
|
}, [autoPrint]);
|
|
45
|
+
const [closable, setClosable] = useState(false);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
setClosable(canScriptCloseWindow(typeof window === "undefined" ? void 0 : window));
|
|
48
|
+
}, []);
|
|
49
|
+
const mode = toolbar === "print" || toolbar === "none" ? toolbar : "auto";
|
|
50
|
+
const showClose = mode === "auto" && closable;
|
|
28
51
|
return /* @__PURE__ */ jsxs("div", { className: "erp-print-shell", children: [
|
|
29
52
|
/* @__PURE__ */ jsx(PrintStyles, {}),
|
|
30
|
-
/* @__PURE__ */ jsxs("div", { className: "erp-print-toolbar erp-print-hidden", children: [
|
|
53
|
+
mode === "none" ? null : /* @__PURE__ */ jsxs("div", { className: "erp-print-toolbar erp-print-hidden", children: [
|
|
31
54
|
/* @__PURE__ */ jsx(Button, { type: "button", variant: "primary", onClick: () => window.print(), children: "\uC778\uC1C4\uD558\uAE30" }),
|
|
32
|
-
/* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: () => window.close(), children: "\uB2EB\uAE30" })
|
|
55
|
+
showClose ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: () => window.close(), children: "\uB2EB\uAE30" }) : null
|
|
33
56
|
] }),
|
|
34
57
|
/* @__PURE__ */ jsxs("section", { className: "erp-print-sheet", children: [
|
|
35
58
|
title ? /* @__PURE__ */ jsx("h1", { className: "wp-h3", style: { margin: "0 0 var(--wp-space-5)" }, children: title }) : null,
|
|
@@ -39,4 +62,4 @@ function PrintSheetImpl({ title, children, autoPrint = false }) {
|
|
|
39
62
|
}
|
|
40
63
|
var PrintSheet = boxed(PrintSheetImpl, "PrintSheet");
|
|
41
64
|
|
|
42
|
-
export { PrintSheet };
|
|
65
|
+
export { PrintSheet, canScriptCloseWindow };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Badge, Checkbox, IconButton, Icon } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { Badge, Checkbox, IconButton, Icon } from './chunk-YYAGE733.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import { DateRangePicker } from './chunk-
|
|
2
|
-
import { useOverlayLayer } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { DateRangePicker } from './chunk-FP32LNFK.js';
|
|
2
|
+
import { useOverlayLayer } from './chunk-BITS7UJY.js';
|
|
3
|
+
import { HoistedStyle } from './chunk-RIZRM7OO.js';
|
|
4
|
+
import { Input, Button, IconButton, Tag, Field, Checkbox } from './chunk-YYAGE733.js';
|
|
4
5
|
import { useRef, useEffect, useState, useMemo } from 'react';
|
|
5
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
7
|
|
|
8
|
+
var POPOVER_CSS = ".wp-popover.wp-popover--wide{width:min(560px,80vw)}.wp-popover-inline{margin-top:var(--wp-space-2);background:var(--wp-surface-card);border:var(--wp-border-w) solid var(--wp-border-subtle);border-radius:var(--wp-radius-md)}.wp-popover-inline__body{padding:var(--wp-space-2) var(--wp-space-3)}.wp-popover-inline__foot{display:flex;align-items:center;justify-content:space-between;gap:var(--wp-space-2);padding:var(--wp-space-1) var(--wp-space-2);border-top:var(--wp-border-w) solid var(--wp-divider)}";
|
|
9
|
+
function swallowNextClick() {
|
|
10
|
+
if (typeof document === "undefined") return;
|
|
11
|
+
let timer;
|
|
12
|
+
const cleanup = () => {
|
|
13
|
+
document.removeEventListener("click", swallow, true);
|
|
14
|
+
document.removeEventListener("pointerdown", cleanup, true);
|
|
15
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
16
|
+
};
|
|
17
|
+
const swallow = (event) => {
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
cleanup();
|
|
21
|
+
};
|
|
22
|
+
document.addEventListener("click", swallow, true);
|
|
23
|
+
document.addEventListener("pointerdown", cleanup, true);
|
|
24
|
+
timer = setTimeout(cleanup, 800);
|
|
25
|
+
}
|
|
7
26
|
function Popover({
|
|
8
27
|
open,
|
|
9
28
|
onClose,
|
|
@@ -11,6 +30,8 @@ function Popover({
|
|
|
11
30
|
footer,
|
|
12
31
|
alignLeft = true,
|
|
13
32
|
width,
|
|
33
|
+
wide = false,
|
|
34
|
+
inline = false,
|
|
14
35
|
children
|
|
15
36
|
}) {
|
|
16
37
|
const hostRef = useRef(null);
|
|
@@ -22,23 +43,60 @@ function Popover({
|
|
|
22
43
|
if (event.target instanceof Node && hostRef.current?.contains(event.target)) return;
|
|
23
44
|
closeRef.current();
|
|
24
45
|
};
|
|
25
|
-
|
|
46
|
+
const type = inline ? "click" : "pointerdown";
|
|
47
|
+
document.addEventListener(type, closeOnOutside);
|
|
26
48
|
return () => {
|
|
27
|
-
document.removeEventListener(
|
|
49
|
+
document.removeEventListener(type, closeOnOutside);
|
|
28
50
|
};
|
|
29
|
-
}, [open]);
|
|
51
|
+
}, [open, inline]);
|
|
30
52
|
useOverlayLayer(open, () => closeRef.current(), hostRef);
|
|
53
|
+
if (inline) {
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { ref: hostRef, className: "wp-popover-host erp-popover-host", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(HoistedStyle, { id: "wp-popover", css: POPOVER_CSS }),
|
|
56
|
+
trigger,
|
|
57
|
+
open ? /* @__PURE__ */ jsxs("div", { className: "wp-popover-inline", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("div", { className: "wp-popover-inline__body", children }),
|
|
59
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "wp-popover-inline__foot", children: footer }) : null
|
|
60
|
+
] }) : null
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
31
63
|
return (
|
|
32
64
|
// 트리거와 패널을 함께 감싸는 기준 상자 — .wp-popover-host의 position:relative가
|
|
33
65
|
// 패널 absolute의 기준이 된다
|
|
34
66
|
/* @__PURE__ */ jsxs("div", { ref: hostRef, className: "wp-popover-host erp-popover-host", children: [
|
|
67
|
+
/* @__PURE__ */ jsx(HoistedStyle, { id: "wp-popover", css: POPOVER_CSS }),
|
|
35
68
|
trigger,
|
|
69
|
+
open ? (
|
|
70
|
+
/*
|
|
71
|
+
* 딤 막 — 패널의 형제. 데스크톱에서는 크기 0 인 빈 칸이다(규칙 없음). 모바일에서
|
|
72
|
+
* 소비자 CSS 가 화면을 덮는 딤으로 그리면(하단 시트) 바깥 탭이 여기에 떨어진다:
|
|
73
|
+
* 닫고, 같은 탭의 click 이 밑의 행으로 새지 않게 삼킨다. 호스트 안이라 문서 바깥
|
|
74
|
+
* 닫기 리스너는 이 탭을 무시한다 — 닫기는 여기서 한 번만 한다.
|
|
75
|
+
*/
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: "wp-popover-backdrop",
|
|
80
|
+
"aria-hidden": "true",
|
|
81
|
+
onPointerDown: () => {
|
|
82
|
+
swallowNextClick();
|
|
83
|
+
closeRef.current();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
) : null,
|
|
36
88
|
open ? (
|
|
37
89
|
// 기본은 오른쪽 기준(.wp-popover), --left가 붙으면 왼쪽 기준으로 뒤집힌다
|
|
38
90
|
/* @__PURE__ */ jsxs(
|
|
39
91
|
"div",
|
|
40
92
|
{
|
|
41
|
-
className:
|
|
93
|
+
className: [
|
|
94
|
+
"wp-popover",
|
|
95
|
+
alignLeft ? "wp-popover--left" : null,
|
|
96
|
+
wide ? "wp-popover--wide" : null,
|
|
97
|
+
"erp-popover",
|
|
98
|
+
alignLeft ? "erp-popover--left" : null
|
|
99
|
+
].filter(Boolean).join(" "),
|
|
42
100
|
style: width ? { width } : void 0,
|
|
43
101
|
children: [
|
|
44
102
|
/* @__PURE__ */ jsx("div", { className: "wp-popover__body erp-popover__body", children }),
|
|
@@ -311,7 +369,7 @@ function SearchToolbar({
|
|
|
311
369
|
open,
|
|
312
370
|
onClose: () => setOpen(false),
|
|
313
371
|
alignLeft: false,
|
|
314
|
-
|
|
372
|
+
wide: true,
|
|
315
373
|
trigger: (
|
|
316
374
|
// 검색 입력창 옆에 나란히 서는 자리라 테두리가 있어야 한 덩어리로 읽힌다.
|
|
317
375
|
// 열린 상태는 인라인 배경이 아니라 pressed(aria-pressed 틴트)로 알린다.
|
|
@@ -425,32 +483,37 @@ function MultiSelectInput({
|
|
|
425
483
|
const next = checked ? [...selected, value] : selected.filter((item) => item !== value);
|
|
426
484
|
onChange({ [field.key]: joinMultiValue(next) });
|
|
427
485
|
};
|
|
428
|
-
return
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
486
|
+
return (
|
|
487
|
+
// 상세검색 패널 안의 목록이라 제자리에서 펼친다 — 떠 있으면 패널의 '적용' 버튼을 덮는다
|
|
488
|
+
/* @__PURE__ */ jsx(
|
|
489
|
+
Popover,
|
|
490
|
+
{
|
|
491
|
+
open,
|
|
492
|
+
onClose: () => setOpen(false),
|
|
493
|
+
inline: true,
|
|
494
|
+
trigger: /* @__PURE__ */ jsx(
|
|
495
|
+
Button,
|
|
496
|
+
{
|
|
497
|
+
type: "button",
|
|
498
|
+
variant: "secondary",
|
|
499
|
+
block: true,
|
|
500
|
+
iconEnd: open ? "chevron-up" : "chevron-down",
|
|
501
|
+
"aria-expanded": open,
|
|
502
|
+
onClick: () => setOpen((value) => !value),
|
|
503
|
+
children: multiSelectLabel(field, selected)
|
|
504
|
+
}
|
|
505
|
+
),
|
|
506
|
+
children: /* @__PURE__ */ jsx("div", { className: "wp-col", style: { maxHeight: "min(320px, 40vh)", overflowY: "auto" }, children: field.options.map((option) => /* @__PURE__ */ jsx(
|
|
507
|
+
Checkbox,
|
|
508
|
+
{
|
|
509
|
+
label: option.label,
|
|
510
|
+
checked: selected.includes(option.value),
|
|
511
|
+
onChange: (e) => toggle(option.value, e.target.checked)
|
|
512
|
+
},
|
|
513
|
+
option.value
|
|
514
|
+
)) })
|
|
515
|
+
}
|
|
516
|
+
)
|
|
454
517
|
);
|
|
455
518
|
}
|
|
456
519
|
function uniqueCascadingOptions(options) {
|
|
@@ -570,40 +633,38 @@ function CascadingLevelSelect({
|
|
|
570
633
|
}) {
|
|
571
634
|
const [open, setOpen] = useState(false);
|
|
572
635
|
const selectedSet = new Set(selectedValues);
|
|
573
|
-
return
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
)
|
|
606
|
-
}
|
|
636
|
+
return (
|
|
637
|
+
// 상세검색 패널 안의 목록이라 제자리에서 펼친다(MultiSelectInput 과 같은 이유)
|
|
638
|
+
/* @__PURE__ */ jsx(
|
|
639
|
+
Popover,
|
|
640
|
+
{
|
|
641
|
+
open,
|
|
642
|
+
onClose: () => setOpen(false),
|
|
643
|
+
inline: true,
|
|
644
|
+
trigger: /* @__PURE__ */ jsx(
|
|
645
|
+
Button,
|
|
646
|
+
{
|
|
647
|
+
type: "button",
|
|
648
|
+
variant: "secondary",
|
|
649
|
+
block: true,
|
|
650
|
+
iconEnd: open ? "chevron-up" : "chevron-down",
|
|
651
|
+
"aria-expanded": open,
|
|
652
|
+
onClick: () => setOpen((value) => !value),
|
|
653
|
+
children: cascadingLevelLabel(selectedValues, allLabel, pathMap, showPathLabels)
|
|
654
|
+
}
|
|
655
|
+
),
|
|
656
|
+
footer: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "xs", icon: "refresh-cw", onClick: onClear, children: allLabel }),
|
|
657
|
+
children: /* @__PURE__ */ jsx("div", { className: "wp-col", style: { maxHeight: "min(320px, 40vh)", overflowY: "auto" }, children: options.map((option) => /* @__PURE__ */ jsx(
|
|
658
|
+
Checkbox,
|
|
659
|
+
{
|
|
660
|
+
label: cascadingOptionLabel(option, pathMap, showPathLabels),
|
|
661
|
+
checked: selectedSet.has(option.value),
|
|
662
|
+
onChange: (e) => onToggle(option, e.target.checked)
|
|
663
|
+
},
|
|
664
|
+
option.value
|
|
665
|
+
)) })
|
|
666
|
+
}
|
|
667
|
+
)
|
|
607
668
|
);
|
|
608
669
|
}
|
|
609
670
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Icon } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { Icon } from './chunk-YYAGE733.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -17,6 +17,8 @@ var SECURE_CSS = `
|
|
|
17
17
|
@media print{
|
|
18
18
|
.erp-secure--enabled .erp-secure__content{display:none !important}
|
|
19
19
|
.erp-secure--enabled .erp-secure__print-warning{display:flex !important;position:static;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;color:inherit;cursor:default}
|
|
20
|
+
/* \uBB38\uAD6C\uB294 \uD654\uBA74\uC6A9 \uBC18\uC804\uC0C9(\uD770 \uAE00\uC790)\uC744 \uB530\uB85C \uB4E4\uACE0 \uC788\uB2E4 \u2014 \uC885\uC774\uC5D0\uC11C\uB294 \uCEE8\uD14C\uC774\uB108 \uAE00\uC790\uC0C9\uC744 \uB530\uB77C\uC57C \uC77D\uD78C\uB2E4 */
|
|
21
|
+
.erp-secure--enabled .erp-secure__print-warning .erp-secure__cover-notice{color:inherit}
|
|
20
22
|
}
|
|
21
23
|
`;
|
|
22
24
|
function SecureStyles() {
|