@wipco/sdui 1.5.0 → 1.6.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.
- package/dist/{DatePicker-C_TT_SOw.d.ts → DatePicker-DX9juElE.d.ts} +10 -1
- package/dist/{chunk-GZBY7I4Y.js → chunk-2KQL6DYG.js} +3 -3
- package/dist/{chunk-RYBBPFI7.js → chunk-2QXA52DG.js} +4 -4
- package/dist/{chunk-DMLDKW7K.js → chunk-37BNG4DT.js} +1 -1
- package/dist/{chunk-5WW4MBRO.js → chunk-3JTBOABA.js} +6 -2
- package/dist/{chunk-UV6HHFEW.js → chunk-4OABUPIU.js} +129 -68
- package/dist/{chunk-ZORQPB6B.js → chunk-53KS4E5N.js} +318 -359
- package/dist/{chunk-I5SD7XRA.js → chunk-6TI4WF5Y.js} +3 -3
- package/dist/{chunk-44TDRCKR.js → chunk-6XI2VF2O.js} +5 -5
- package/dist/{chunk-HBIIEYKW.js → chunk-7C54CKFZ.js} +4 -4
- package/dist/{chunk-IZ3JA2BR.js → chunk-7JP52QQO.js} +3 -3
- package/dist/{chunk-I45EUZC6.js → chunk-AY4GM6KQ.js} +4 -2
- package/dist/{chunk-SAPBDJJQ.js → chunk-AZSLSAJB.js} +2 -2
- package/dist/chunk-BITS7UJY.js +333 -0
- package/dist/{chunk-RNOUXUBO.js → chunk-BLFJMMBW.js} +306 -57
- package/dist/{chunk-YOZN35HD.js → chunk-CEVZAFPO.js} +3 -3
- package/dist/chunk-CI5OZ2QT.js +106 -0
- package/dist/{chunk-FNMS7OB7.js → chunk-CSE3PZOZ.js} +5 -5
- package/dist/chunk-CSZCWBOE.js +256 -0
- package/dist/{chunk-JIV4YHCZ.js → chunk-EJIWOD7W.js} +1 -1
- package/dist/{chunk-JZXU22PE.js → chunk-FEKKOBPX.js} +208 -117
- package/dist/chunk-GSM664TX.js +38 -0
- package/dist/{chunk-JYAR7D5U.js → chunk-HRHKQOOF.js} +2 -2
- package/dist/{chunk-CXW6KT6X.js → chunk-HXLQSO66.js} +3 -3
- package/dist/{chunk-O4IISNE7.js → chunk-IB2ZPUTF.js} +51 -12
- package/dist/{chunk-MPT7WJG2.js → chunk-IQXLNICY.js} +5 -5
- package/dist/{chunk-OQ52XMGG.js → chunk-K6RE23XX.js} +4 -4
- package/dist/{chunk-VY7MVBSE.js → chunk-KZ6U6FKB.js} +2 -2
- package/dist/{chunk-WPSK2CB5.js → chunk-LIZTK3HO.js} +16 -5
- package/dist/{chunk-Q4SWUINA.js → chunk-LKQJJSVJ.js} +1 -1
- package/dist/{chunk-E6ISNQK3.js → chunk-M6H3SHIS.js} +31 -8
- package/dist/chunk-MN4RZ2WP.js +380 -0
- package/dist/{chunk-GTGS2QRL.js → chunk-NA232CBX.js} +3 -3
- package/dist/{chunk-ZFNFPXPR.js → chunk-NAIWQQPW.js} +2 -2
- package/dist/{chunk-YVTV4ZV6.js → chunk-NWYYNE3Q.js} +1 -1
- package/dist/{chunk-DKVSM5HX.js → chunk-OUEJWC2Z.js} +6 -6
- package/dist/{chunk-DOL57OOP.js → chunk-OYDJHQNZ.js} +3 -3
- package/dist/{chunk-YWUDBLO6.js → chunk-QVS6K4FP.js} +2 -2
- package/dist/{chunk-N5RKM6IC.js → chunk-RU5U2YMT.js} +4 -4
- package/dist/{chunk-A6LAIGUS.js → chunk-V7BWMOHO.js} +7 -4
- package/dist/{chunk-2HLXCKK7.js → chunk-VPOOIEKT.js} +2 -2
- package/dist/{chunk-2YP5N4VV.js → chunk-VZOQRQAR.js} +1 -1
- package/dist/{chunk-GNA6SX2H.js → chunk-W4VA76QO.js} +2 -2
- package/dist/{chunk-BEM2YS7U.js → chunk-WEG3V7ZB.js} +3 -3
- package/dist/{chunk-XGFDY43I.js → chunk-WTIYILY3.js} +88 -18
- package/dist/{chunk-RWSH2MBU.js → chunk-X2NIRVLN.js} +73 -19
- package/dist/{chunk-AXGF4M57.js → chunk-XAXROQKB.js} +1 -1
- package/dist/{chunk-NIJUVTEW.js → chunk-XG22XKKD.js} +3 -3
- package/dist/{chunk-A5XQOEVH.js → chunk-YN7X7BEO.js} +4 -4
- package/dist/{chunk-KO6OEY3G.js → chunk-YNEEJCSZ.js} +3 -13
- package/dist/{chunk-7P7N43JV.js → chunk-YZTTFEL4.js} +2 -2
- package/dist/index.d.ts +418 -90
- package/dist/index.js +997 -123
- package/dist/{layout-C3nRXMwb.d.ts → layout-DmRikwZb.d.ts} +5 -4
- package/dist/meta.d.ts +1 -1
- package/dist/meta.js +236 -22
- package/dist/rich/ExcelUploadCard.d.ts +1 -1
- package/dist/rich/ExcelUploadCard.js +5 -4
- package/dist/rich.d.ts +21 -3
- package/dist/rich.js +277 -35
- package/dist/styles.css +102 -4
- package/dist/{types-COjGKgmd.d.ts → types-CYfIthux.d.ts} +57 -1
- 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 +1 -1
- 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,9 +1,9 @@
|
|
|
1
|
-
import { TagMultiSelect } from './chunk-
|
|
2
|
-
import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-
|
|
3
|
-
import { orderCircleStyle, unwrapRows, uid } from './chunk-
|
|
4
|
-
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-
|
|
5
|
-
import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-
|
|
6
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { TagMultiSelect } from './chunk-6TI4WF5Y.js';
|
|
2
|
+
import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-IQXLNICY.js';
|
|
3
|
+
import { orderCircleStyle, unwrapRows, uid } from './chunk-LKQJJSVJ.js';
|
|
4
|
+
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-YNEEJCSZ.js';
|
|
5
|
+
import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fetchAllJobPositions } from './chunk-XRHR452N.js';
|
|
2
|
-
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-
|
|
3
|
-
import { Select, Button } from './chunk-
|
|
4
|
-
import { boxed } from './chunk-
|
|
2
|
+
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-YNEEJCSZ.js';
|
|
3
|
+
import { Select, Button } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
7
7
|
|
|
@@ -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-BLFJMMBW.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,7 +1,7 @@
|
|
|
1
|
-
import { ImageLightbox } from './chunk-
|
|
2
|
-
import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-
|
|
3
|
-
import { Spinner, Icon, IconButton } from './chunk-
|
|
4
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { ImageLightbox } from './chunk-KZ6U6FKB.js';
|
|
2
|
+
import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-YNEEJCSZ.js';
|
|
3
|
+
import { Spinner, Icon, IconButton } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { usePanZoomCanvas, MIN_ZOOM, MAX_ZOOM } from './chunk-
|
|
2
|
-
import { IconButton, Badge } from './chunk-
|
|
3
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { usePanZoomCanvas, MIN_ZOOM, MAX_ZOOM } from './chunk-CSZCWBOE.js';
|
|
2
|
+
import { IconButton, Badge } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
6
6
|
|
|
@@ -112,6 +112,7 @@ function OrgChartImpl({
|
|
|
112
112
|
setView,
|
|
113
113
|
dragging,
|
|
114
114
|
isFullscreen,
|
|
115
|
+
pseudoFullscreen,
|
|
115
116
|
viewportCenter,
|
|
116
117
|
zoomAt,
|
|
117
118
|
toggleFullscreen,
|
|
@@ -161,7 +162,9 @@ function OrgChartImpl({
|
|
|
161
162
|
cursor: dragging ? "grabbing" : "grab",
|
|
162
163
|
touchAction: "none",
|
|
163
164
|
overscrollBehavior: "contain",
|
|
164
|
-
userSelect: "none"
|
|
165
|
+
userSelect: "none",
|
|
166
|
+
// 요소 전체화면이 없는 브라우저(iPhone Safari)의 대체 — 화면을 덮는 고정 배치
|
|
167
|
+
...pseudoFullscreen ? { position: "fixed", inset: 0, zIndex: "var(--wp-z-dialog)", height: "100dvh", borderRadius: 0 } : null
|
|
165
168
|
},
|
|
166
169
|
children: [
|
|
167
170
|
/* @__PURE__ */ jsxs(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Icon } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { Icon } from './chunk-BLFJMMBW.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import { useState, useId, useCallback } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HoistedStyle } from './chunk-RIZRM7OO.js';
|
|
2
|
-
import { Tag } from './chunk-
|
|
3
|
-
import { boxed } from './chunk-
|
|
2
|
+
import { Tag } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Text } from './chunk-
|
|
2
|
-
import { Switch, Field, Select, Input } from './chunk-
|
|
3
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { Text } from './chunk-LIZTK3HO.js';
|
|
2
|
+
import { Switch, Field, Select, Input } from './chunk-BLFJMMBW.js';
|
|
3
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Icon, Badge, Tooltip } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { Icon, Badge, Tooltip } from './chunk-BLFJMMBW.js';
|
|
2
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -25,6 +25,14 @@ var STATUS_META = {
|
|
|
25
25
|
border: "var(--wp-status-neutral-border)",
|
|
26
26
|
fg: "var(--wp-status-neutral-fg)"
|
|
27
27
|
},
|
|
28
|
+
// 취소 — 신청자가 거둬들인 문서의 단계. 반려(빨강 x)와 달리 회색이라 판정이 아닌 종료로 읽힌다.
|
|
29
|
+
cancelled: {
|
|
30
|
+
icon: "circle-x",
|
|
31
|
+
label: "\uCDE8\uC18C",
|
|
32
|
+
bg: "var(--wp-status-neutral-bg)",
|
|
33
|
+
border: "var(--wp-status-neutral-border)",
|
|
34
|
+
fg: "var(--wp-status-neutral-fg)"
|
|
35
|
+
},
|
|
28
36
|
current: {
|
|
29
37
|
icon: "circle-dot",
|
|
30
38
|
label: "\uC9C4\uD589 \uC911",
|
|
@@ -40,6 +48,9 @@ var STATUS_META = {
|
|
|
40
48
|
fg: "var(--wp-text-muted)"
|
|
41
49
|
}
|
|
42
50
|
};
|
|
51
|
+
function normalizeStepStatus(status) {
|
|
52
|
+
return status && Object.prototype.hasOwnProperty.call(STATUS_META, status) ? status : "pending";
|
|
53
|
+
}
|
|
43
54
|
function stepTitle(step, index, typeLabels) {
|
|
44
55
|
const name = step.name?.trim();
|
|
45
56
|
if (name) return name;
|
|
@@ -84,6 +95,15 @@ var nodeTextStyle = {
|
|
|
84
95
|
whiteSpace: "nowrap",
|
|
85
96
|
textAlign: "center"
|
|
86
97
|
};
|
|
98
|
+
var noticeNodeStyle = { ...nodeStyle, maxWidth: 240 };
|
|
99
|
+
var noticeTextStyle = {
|
|
100
|
+
display: "block",
|
|
101
|
+
maxWidth: "100%",
|
|
102
|
+
textAlign: "center",
|
|
103
|
+
whiteSpace: "normal",
|
|
104
|
+
wordBreak: "keep-all",
|
|
105
|
+
overflowWrap: "anywhere"
|
|
106
|
+
};
|
|
87
107
|
var connectorStyle = {
|
|
88
108
|
flex: "none",
|
|
89
109
|
width: "var(--wp-space-6)",
|
|
@@ -93,7 +113,7 @@ var connectorStyle = {
|
|
|
93
113
|
marginTop: "calc(var(--wp-space-1) + 16px)"
|
|
94
114
|
};
|
|
95
115
|
function stepTooltip(step, index, typeLabels) {
|
|
96
|
-
const meta = STATUS_META[step.status
|
|
116
|
+
const meta = STATUS_META[normalizeStepStatus(step.status)];
|
|
97
117
|
const lines = [`${stepTitle(step, index, typeLabels)} \u2014 ${meta.label}`];
|
|
98
118
|
if (step.approver) lines.push(`\uCC98\uB9AC\uC790: ${step.approver}`);
|
|
99
119
|
if (step.processedAt) lines.push(`\uCC98\uB9AC \uC77C\uC2DC: ${formatDateTime(step.processedAt)}`);
|
|
@@ -102,14 +122,53 @@ function stepTooltip(step, index, typeLabels) {
|
|
|
102
122
|
}
|
|
103
123
|
return /* @__PURE__ */ jsx(Fragment, { children: lines.map((line) => /* @__PURE__ */ jsx("span", { style: { display: "block" }, children: line }, line)) });
|
|
104
124
|
}
|
|
125
|
+
var OUTCOME_NOTICE = {
|
|
126
|
+
approved: {
|
|
127
|
+
tone: "success",
|
|
128
|
+
icon: "check-check",
|
|
129
|
+
badge: "\uC790\uB3D9 \uC2B9\uC778",
|
|
130
|
+
text: "\uACB0\uC7AC \uB2E8\uACC4 \uC5C6\uC774 \uC790\uB3D9 \uC2B9\uC778\uB418\uC5C8\uC2B5\uB2C8\uB2E4"
|
|
131
|
+
},
|
|
132
|
+
pending: {
|
|
133
|
+
tone: "success",
|
|
134
|
+
icon: "check-check",
|
|
135
|
+
badge: "\uC790\uB3D9 \uC2B9\uC778",
|
|
136
|
+
text: "\uACB0\uC7AC \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uC62C\uB9AC\uB294 \uC989\uC2DC \uC2B9\uC778\uB429\uB2C8\uB2E4"
|
|
137
|
+
},
|
|
138
|
+
rejected: { tone: "danger", icon: "x", badge: "\uBC18\uB824", text: "\uACB0\uC7AC \uB2E8\uACC4 \uC5C6\uC774 \uBC18\uB824\uB418\uC5C8\uC2B5\uB2C8\uB2E4" },
|
|
139
|
+
cancelled: { tone: "neutral", icon: "circle-x", badge: "\uCDE8\uC18C", text: "\uACB0\uC7AC\uAC00 \uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4" }
|
|
140
|
+
};
|
|
141
|
+
var OUTCOME_STATUS = {
|
|
142
|
+
approved: "approved",
|
|
143
|
+
pending: "pending",
|
|
144
|
+
rejected: "rejected",
|
|
145
|
+
cancelled: "cancelled"
|
|
146
|
+
};
|
|
147
|
+
function normalizeOutcome(outcome) {
|
|
148
|
+
return outcome && Object.prototype.hasOwnProperty.call(OUTCOME_NOTICE, outcome) ? outcome : "approved";
|
|
149
|
+
}
|
|
105
150
|
function ApprovalStepperImpl({
|
|
106
151
|
requester,
|
|
107
152
|
steps,
|
|
153
|
+
decidedBy,
|
|
154
|
+
decidedAt,
|
|
155
|
+
outcome,
|
|
108
156
|
onStepClick,
|
|
109
157
|
typeLabels
|
|
110
158
|
}) {
|
|
111
|
-
const safeSteps = steps ?? [];
|
|
112
159
|
const clickable = typeof onStepClick === "function";
|
|
160
|
+
const result = normalizeOutcome(outcome);
|
|
161
|
+
const decider = decidedBy?.trim();
|
|
162
|
+
if (steps === null || steps === void 0) return null;
|
|
163
|
+
const safeSteps = steps.length > 0 ? steps : decider ? [
|
|
164
|
+
{
|
|
165
|
+
id: "__decision",
|
|
166
|
+
name: "\uACB0\uC7AC",
|
|
167
|
+
status: OUTCOME_STATUS[result],
|
|
168
|
+
approver: decider,
|
|
169
|
+
processedAt: decidedAt?.trim() || void 0
|
|
170
|
+
}
|
|
171
|
+
] : [];
|
|
113
172
|
const requesterNode = requester ? /* @__PURE__ */ jsxs("div", { style: nodeStyle, children: [
|
|
114
173
|
/* @__PURE__ */ jsx(
|
|
115
174
|
"span",
|
|
@@ -127,17 +186,27 @@ function ApprovalStepperImpl({
|
|
|
127
186
|
/* @__PURE__ */ jsx("span", { className: "wp-caption", style: nodeTextStyle, children: requester.sub?.trim() || "\uC2E0\uCCAD\uC790" })
|
|
128
187
|
] }) : null;
|
|
129
188
|
if (safeSteps.length === 0) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
189
|
+
const notice = OUTCOME_NOTICE[result];
|
|
190
|
+
const when = decidedAt?.trim();
|
|
191
|
+
return /* @__PURE__ */ jsxs(
|
|
192
|
+
"div",
|
|
193
|
+
{
|
|
194
|
+
className: "wp-row",
|
|
195
|
+
style: { alignItems: "flex-start", overflowX: "auto", paddingBottom: "var(--wp-space-1)" },
|
|
196
|
+
children: [
|
|
197
|
+
requesterNode,
|
|
198
|
+
requesterNode ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, style: connectorStyle }) : null,
|
|
199
|
+
/* @__PURE__ */ jsxs("div", { style: noticeNodeStyle, "data-outcome": result, children: [
|
|
200
|
+
/* @__PURE__ */ jsxs(Badge, { tone: notice.tone, size: "lg", children: [
|
|
201
|
+
/* @__PURE__ */ jsx(Icon, { name: notice.icon, size: 14, style: { marginRight: "var(--wp-space-1)" } }),
|
|
202
|
+
notice.badge
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ jsx("span", { className: "wp-caption", style: noticeTextStyle, children: notice.text }),
|
|
205
|
+
when ? /* @__PURE__ */ jsx("span", { className: "wp-caption", style: { ...noticeTextStyle, color: "var(--wp-text-muted)" }, children: formatDateTime(when) }) : null
|
|
206
|
+
] })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
141
210
|
}
|
|
142
211
|
return /* @__PURE__ */ jsxs(
|
|
143
212
|
"div",
|
|
@@ -154,8 +223,9 @@ function ApprovalStepperImpl({
|
|
|
154
223
|
children: [
|
|
155
224
|
requesterNode,
|
|
156
225
|
safeSteps.map((step, index) => {
|
|
157
|
-
const status = step.status
|
|
226
|
+
const status = normalizeStepStatus(step.status);
|
|
158
227
|
const meta = STATUS_META[status];
|
|
228
|
+
const muted = status === "skipped" || status === "cancelled";
|
|
159
229
|
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
160
230
|
/* @__PURE__ */ jsx("span", { style: circleStyle(meta.bg, meta.border, meta.fg, status === "current"), children: /* @__PURE__ */ jsx(Icon, { name: meta.icon, size: 16 }) }),
|
|
161
231
|
/* @__PURE__ */ jsx(
|
|
@@ -164,7 +234,7 @@ function ApprovalStepperImpl({
|
|
|
164
234
|
className: "wp-body-sm",
|
|
165
235
|
style: {
|
|
166
236
|
...nodeTextStyle,
|
|
167
|
-
color:
|
|
237
|
+
color: muted ? "var(--wp-text-muted)" : "var(--wp-text-strong)"
|
|
168
238
|
},
|
|
169
239
|
children: stepTitle(step, index, typeLabels)
|
|
170
240
|
}
|
|
@@ -208,4 +278,4 @@ function ApprovalStepperImpl({
|
|
|
208
278
|
}
|
|
209
279
|
var ApprovalStepper = boxed(ApprovalStepperImpl, "ApprovalStepper");
|
|
210
280
|
|
|
211
|
-
export { ApprovalStepper };
|
|
281
|
+
export { ApprovalStepper, normalizeStepStatus };
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
+
import { useOverlayLayer, OverlayContainerContext, getOverlayRoot } from './chunk-BITS7UJY.js';
|
|
1
2
|
import { HoistedStyle } from './chunk-RIZRM7OO.js';
|
|
2
|
-
import {
|
|
3
|
-
import { Icon } from './chunk-
|
|
4
|
-
import { boxed } from './chunk-
|
|
3
|
+
import { useIsMobile } from './chunk-GSM664TX.js';
|
|
4
|
+
import { Icon } from './chunk-BLFJMMBW.js';
|
|
5
|
+
import { boxed } from './chunk-3JTBOABA.js';
|
|
5
6
|
import React, { useState, useRef, useEffect, useMemo, useCallback, useLayoutEffect } from 'react';
|
|
6
7
|
import { createPortal } from 'react-dom';
|
|
7
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var ANCHOR_GAP = 8;
|
|
10
11
|
var VIEWPORT_EDGE = 8;
|
|
11
|
-
function anchorTo(
|
|
12
|
-
|
|
13
|
-
const rect = host.getBoundingClientRect();
|
|
14
|
-
const below = window.innerHeight - rect.bottom;
|
|
12
|
+
function anchorTo(rect, viewportHeight, height) {
|
|
13
|
+
const below = viewportHeight - rect.bottom;
|
|
15
14
|
const up = below < height && rect.top > below;
|
|
15
|
+
const room = (up ? rect.top : below) - ANCHOR_GAP - VIEWPORT_EDGE;
|
|
16
16
|
return {
|
|
17
17
|
left: rect.left,
|
|
18
18
|
top: up ? void 0 : rect.bottom + ANCHOR_GAP,
|
|
19
|
-
bottom: up ?
|
|
20
|
-
minWidth: rect.width
|
|
19
|
+
bottom: up ? viewportHeight - rect.top + ANCHOR_GAP : void 0,
|
|
20
|
+
minWidth: rect.width,
|
|
21
|
+
available: Math.max(MIN_AVAILABLE, Math.floor(room))
|
|
21
22
|
};
|
|
22
23
|
}
|
|
24
|
+
var MIN_AVAILABLE = 120;
|
|
25
|
+
function anchorToHost(host, height) {
|
|
26
|
+
if (!host || typeof window === "undefined") return null;
|
|
27
|
+
return anchorTo(host.getBoundingClientRect(), window.innerHeight, height);
|
|
28
|
+
}
|
|
23
29
|
function usePopoverAnchor(open, hostRef, popRef, height) {
|
|
24
30
|
const [anchor, setAnchor] = useState(null);
|
|
25
31
|
useLayoutEffect(() => {
|
|
@@ -27,7 +33,7 @@ function usePopoverAnchor(open, hostRef, popRef, height) {
|
|
|
27
33
|
setAnchor(null);
|
|
28
34
|
return;
|
|
29
35
|
}
|
|
30
|
-
const place = () => setAnchor(
|
|
36
|
+
const place = () => setAnchor(anchorToHost(hostRef.current, height));
|
|
31
37
|
place();
|
|
32
38
|
window.addEventListener("scroll", place, true);
|
|
33
39
|
window.addEventListener("resize", place);
|
|
@@ -57,7 +63,14 @@ var ANCHORED_POP_CSS = `
|
|
|
57
63
|
`;
|
|
58
64
|
function anchorStyle(anchor) {
|
|
59
65
|
if (!anchor) return void 0;
|
|
60
|
-
|
|
66
|
+
const style = {
|
|
67
|
+
left: anchor.left,
|
|
68
|
+
top: anchor.top,
|
|
69
|
+
bottom: anchor.bottom,
|
|
70
|
+
minWidth: anchor.minWidth
|
|
71
|
+
};
|
|
72
|
+
if (anchor.available !== void 0) style["--wp-pop-avail"] = `${anchor.available}px`;
|
|
73
|
+
return style;
|
|
61
74
|
}
|
|
62
75
|
function usePortalTo() {
|
|
63
76
|
const container = React.useContext(OverlayContainerContext);
|
|
@@ -279,7 +292,7 @@ function TimePickerImpl({
|
|
|
279
292
|
var TP_CSS = `
|
|
280
293
|
.wp-tp-host{position:relative}
|
|
281
294
|
.wp-tp-input{padding-right:6px;min-width:calc(5ch + 36px)}
|
|
282
|
-
.wp-tp-pop{padding:var(--wp-space-1);max-height:260px;overflow-y:auto;overscroll-behavior:contain}
|
|
295
|
+
.wp-tp-pop{padding:var(--wp-space-1);max-height:min(260px,var(--wp-pop-avail,260px));overflow-y:auto;overscroll-behavior:contain}
|
|
283
296
|
.wp-tp-opt{display:block;width:100%;padding:6px 10px;border:none;background:transparent;border-radius:var(--wp-radius-sm);font:inherit;font-family:var(--wp-font-mono);font-size:12.5px;color:var(--wp-text-default);text-align:left;cursor:pointer}
|
|
284
297
|
.wp-tp-opt:hover{background:var(--wp-surface-hover)}
|
|
285
298
|
.wp-tp-opt:focus-visible{outline:2px solid var(--wp-border-focus);outline-offset:-2px}
|
|
@@ -360,6 +373,33 @@ function splitDateTime(value) {
|
|
|
360
373
|
const [date = "", time = ""] = value.split(/[T ]/, 2);
|
|
361
374
|
return [date, time.slice(0, 5)];
|
|
362
375
|
}
|
|
376
|
+
var ZONED_RE = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?\s*(Z|[+-]\d{2}(?::?\d{2})?)$/i;
|
|
377
|
+
function isZonedDateTime(value) {
|
|
378
|
+
return typeof value === "string" && ZONED_RE.test(value.trim());
|
|
379
|
+
}
|
|
380
|
+
function toLocalWallClock(value) {
|
|
381
|
+
const match = ZONED_RE.exec(value.trim());
|
|
382
|
+
if (!match) return value;
|
|
383
|
+
const [, date, hh, mm, ss = "00", zone] = match;
|
|
384
|
+
const offset = zone.toUpperCase() === "Z" ? "Z" : `${zone.slice(0, 3)}:${zone.length > 3 ? zone.slice(-2) : "00"}`;
|
|
385
|
+
const instant = /* @__PURE__ */ new Date(`${date}T${hh}:${mm}:${ss}${offset}`);
|
|
386
|
+
if (Number.isNaN(instant.getTime())) return value;
|
|
387
|
+
const h = String(instant.getHours()).padStart(2, "0");
|
|
388
|
+
const m = String(instant.getMinutes()).padStart(2, "0");
|
|
389
|
+
return `${formatYmd(instant)}T${h}:${m}`;
|
|
390
|
+
}
|
|
391
|
+
function withLocalOffset(wall) {
|
|
392
|
+
const [date, time] = splitDateTime(wall);
|
|
393
|
+
const day = parseYmd(date);
|
|
394
|
+
const minuteOfDay = parseHm(time);
|
|
395
|
+
if (!day || minuteOfDay === void 0) return wall;
|
|
396
|
+
const local = new Date(day.getFullYear(), day.getMonth(), day.getDate(), Math.floor(minuteOfDay / 60), minuteOfDay % 60, 0, 0);
|
|
397
|
+
const minutes = -local.getTimezoneOffset();
|
|
398
|
+
const sign = minutes >= 0 ? "+" : "-";
|
|
399
|
+
const abs = Math.abs(minutes);
|
|
400
|
+
const zone = `${sign}${String(Math.floor(abs / 60)).padStart(2, "0")}:${String(abs % 60).padStart(2, "0")}`;
|
|
401
|
+
return `${date}T${time}:00${zone}`;
|
|
402
|
+
}
|
|
363
403
|
function toFieldText(value, withTime) {
|
|
364
404
|
if (!withTime) return splitDateTime(value)[0];
|
|
365
405
|
const [date, time] = splitDateTime(value);
|
|
@@ -617,6 +657,7 @@ function DatePickerImpl({
|
|
|
617
657
|
disabled = false,
|
|
618
658
|
size = "md",
|
|
619
659
|
withTime = false,
|
|
660
|
+
zoned,
|
|
620
661
|
locale
|
|
621
662
|
}) {
|
|
622
663
|
const loc = resolveLocale(locale, KO_LOCALE.calendarLabel);
|
|
@@ -626,7 +667,10 @@ function DatePickerImpl({
|
|
|
626
667
|
const popRef = useRef(null);
|
|
627
668
|
const inputRef = useRef(null);
|
|
628
669
|
const isControlled = value !== void 0;
|
|
629
|
-
const
|
|
670
|
+
const rawValue = (isControlled ? value : innerValue) ?? "";
|
|
671
|
+
const currentValue = useMemo(() => toLocalWallClock(String(rawValue)), [rawValue]);
|
|
672
|
+
const sawZone = useRef(false);
|
|
673
|
+
if (isZonedDateTime(rawValue)) sawZone.current = true;
|
|
630
674
|
const fieldText = useMemo(() => toFieldText(currentValue, withTime), [currentValue, withTime]);
|
|
631
675
|
const [text, setText] = useState(fieldText);
|
|
632
676
|
useEffect(() => {
|
|
@@ -645,7 +689,9 @@ function DatePickerImpl({
|
|
|
645
689
|
const anchor = usePopoverAnchor(open, hostRef, popRef, CALENDAR_HEIGHT);
|
|
646
690
|
const portal = usePortalTo();
|
|
647
691
|
const isInvalid = Boolean(invalid);
|
|
648
|
-
const commit = (
|
|
692
|
+
const commit = (wall) => {
|
|
693
|
+
const emitZone = withTime && wall !== "" && (zoned ?? sawZone.current);
|
|
694
|
+
const next = emitZone ? withLocalOffset(wall) : wall;
|
|
649
695
|
if (!isControlled) setInnerValue(next);
|
|
650
696
|
onChange?.(next);
|
|
651
697
|
};
|
|
@@ -744,6 +790,10 @@ function DatePickerImpl({
|
|
|
744
790
|
)
|
|
745
791
|
] });
|
|
746
792
|
}
|
|
793
|
+
function rangeEndText(value) {
|
|
794
|
+
if (typeof value !== "string") return "";
|
|
795
|
+
return isZonedDateTime(value) ? toLocalWallClock(value).slice(0, 10) : value;
|
|
796
|
+
}
|
|
747
797
|
function DateRangePickerImpl({
|
|
748
798
|
value,
|
|
749
799
|
onChange,
|
|
@@ -763,8 +813,10 @@ function DateRangePickerImpl({
|
|
|
763
813
|
const toRef = useRef(null);
|
|
764
814
|
const isControlled = value !== void 0;
|
|
765
815
|
const currentRange = (isControlled ? value : innerRange) ?? {};
|
|
766
|
-
const fromValue = currentRange.from
|
|
767
|
-
const toValue = currentRange.to
|
|
816
|
+
const fromValue = rangeEndText(currentRange.from);
|
|
817
|
+
const toValue = rangeEndText(currentRange.to);
|
|
818
|
+
const isMobile = useIsMobile();
|
|
819
|
+
const monthCount = isMobile ? 1 : 2;
|
|
768
820
|
const [fromText, setFromText] = useState(fromValue);
|
|
769
821
|
const [toText, setToText] = useState(toValue);
|
|
770
822
|
useEffect(() => {
|
|
@@ -915,14 +967,14 @@ function DateRangePickerImpl({
|
|
|
915
967
|
"div",
|
|
916
968
|
{
|
|
917
969
|
ref: popRef,
|
|
918
|
-
className: "wp-anchored-pop wp-dp-pop wp-dp-pop--wide",
|
|
970
|
+
className: monthCount > 1 ? "wp-anchored-pop wp-dp-pop wp-dp-pop--wide" : "wp-anchored-pop wp-dp-pop",
|
|
919
971
|
style: anchorStyle(anchor),
|
|
920
972
|
role: "dialog",
|
|
921
973
|
"aria-label": loc.calendarLabel,
|
|
922
974
|
children: /* @__PURE__ */ jsx("div", { className: "wp-dp-pop__body", children: /* @__PURE__ */ jsx(
|
|
923
975
|
Calendar,
|
|
924
976
|
{
|
|
925
|
-
monthCount
|
|
977
|
+
monthCount,
|
|
926
978
|
minDate,
|
|
927
979
|
maxDate,
|
|
928
980
|
focusDate,
|
|
@@ -952,7 +1004,9 @@ function DateRangePickerImpl({
|
|
|
952
1004
|
var DP_CSS = `
|
|
953
1005
|
.wp-dp-host{position:relative}
|
|
954
1006
|
.wp-dp-pop--wide{max-width:min(92vw,720px)}
|
|
955
|
-
|
|
1007
|
+
/* \uC0C1\uD55C\uC740 \uD654\uBA74 60% \uC640 **\uD3B8 \uCABD\uC5D0 \uB0A8\uC740 \uB192\uC774**(anchored-popover \uAC00 --wp-pop-avail \uB85C \uC2E3\uB294\uB2E4) \uC911
|
|
1008
|
+
\uC791\uC740 \uCABD \u2014 \uCE78\uC774 \uD654\uBA74 \uC544\uB798\uCABD\uC774\uBA74 \uD328\uB110\uC774 \uBDF0\uD3EC\uD2B8 \uBC16\uC73C\uB85C \uB118\uCE58\uC9C0 \uC54A\uACE0 \uC548\uC5D0\uC11C \uC2A4\uD06C\uB864\uD55C\uB2E4. */
|
|
1009
|
+
.wp-dp-pop__body{padding:var(--wp-space-4);max-height:min(60vh,calc(var(--wp-pop-avail,100vh) - 2px));overflow:auto}
|
|
956
1010
|
.wp-dp-range{display:flex;align-items:center;gap:var(--wp-space-1)}
|
|
957
1011
|
.wp-dp-range>*{flex:1 1 0;min-width:0}
|
|
958
1012
|
.wp-dp-range__sep{flex:none;color:var(--wp-text-subtle)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DatePicker, TimePicker } from './chunk-
|
|
2
|
-
import { Field } from './chunk-
|
|
3
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { DatePicker, TimePicker } from './chunk-X2NIRVLN.js';
|
|
2
|
+
import { Field } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { fetchAllPages } from './chunk-
|
|
2
|
-
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-
|
|
3
|
-
import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-
|
|
4
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { fetchAllPages } from './chunk-LKQJJSVJ.js';
|
|
2
|
+
import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-YNEEJCSZ.js';
|
|
3
|
+
import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-BLFJMMBW.js';
|
|
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';
|
|
7
7
|
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEV } from './chunk-GSM664TX.js';
|
|
2
|
+
import { warnOnce } from './chunk-BLFJMMBW.js';
|
|
2
3
|
import { createContext, useContext } from 'react';
|
|
3
4
|
|
|
4
|
-
// src/env.ts
|
|
5
|
-
var DEV = (() => {
|
|
6
|
-
try {
|
|
7
|
-
const meta = import.meta;
|
|
8
|
-
return Boolean(meta.env?.DEV);
|
|
9
|
-
} catch {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
})();
|
|
13
|
-
|
|
14
|
-
// src/adapter.ts
|
|
15
5
|
function isSafeNavigationTarget(to) {
|
|
16
6
|
if (typeof to !== "string") return false;
|
|
17
7
|
const value = to.replace(/[\u0000-\u0020]/g, "");
|
|
@@ -115,4 +105,4 @@ function hostRawFetchOf(adapter) {
|
|
|
115
105
|
};
|
|
116
106
|
}
|
|
117
107
|
|
|
118
|
-
export {
|
|
108
|
+
export { SduiAdapterContext, assetResolverOf, defaultAdapter, hostFetchOf, hostRawFetchOf, isSafeNavigationTarget, resolveAdapter, useSduiAdapter, useSduiAssetResolver, useSduiSandbox };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconButton, Input } from './chunk-
|
|
2
|
-
import { boxed } from './chunk-
|
|
1
|
+
import { IconButton, Input } from './chunk-BLFJMMBW.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
|
|