@wipco/sdui 0.26.0 → 0.27.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.
@@ -0,0 +1,43 @@
1
+ import { S as SduiBoxProps } from '../layout-B1QrIBm6.js';
2
+ import React__default from 'react';
3
+
4
+ /** 저장 JSON 계약(approval-line) — 키 이름 변경 금지. */
5
+ interface CustomApprover {
6
+ id: string;
7
+ name: string;
8
+ type: 'user' | 'group';
9
+ }
10
+ /** 저장 JSON 계약(approval-line) — 키 이름 변경 금지. */
11
+ interface ApprovalLineStep {
12
+ id: string;
13
+ /** 없으면 백엔드가 custom으로 취급한다(마이그레이션 이관 스텝 호환). */
14
+ type?: 'team_leader' | 'division_head' | 'custom';
15
+ /** 스텝 표시명 — 백엔드가 결재 단계 설명으로 그대로 쓴다(없으면 type). */
16
+ name?: string;
17
+ customApprovers?: CustomApprover[];
18
+ order: number;
19
+ }
20
+ interface ApprovalLineEditorProps {
21
+ value: ApprovalLineStep[];
22
+ onChange: (steps: ApprovalLineStep[]) => void;
23
+ /** 직원·부서 통합 검색 경로 — GET {endpoint}?q=… (어댑터 fetch). */
24
+ searchEndpoint?: string;
25
+ /**
26
+ * 부서(그룹) 검색 경로 — 주면 searchEndpoint 와 **병렬로** 조회해 결과를 합친다.
27
+ * v2 원본이 이 모양이다: `/employees?q=` 와 `/departments?q=` 를 동시에 던져
28
+ * 사용자·그룹을 한 목록으로 보여 준다(approval-step-editor.tsx:167-168).
29
+ * 이 경로의 응답은 전부 `type:'group'` 으로 정규화한다 — 부서 행에는 type 필드가
30
+ * 없어 기본값(user)으로 잘못 접히기 때문이다.
31
+ */
32
+ groupSearchEndpoint?: string;
33
+ /** 정적 데모 폴백 — searchEndpoint가 없을 때 로컬 검색 대상. */
34
+ options?: CustomApprover[];
35
+ disabled?: boolean;
36
+ }
37
+ declare const stepTypeIcon: (type: ApprovalLineStep["type"]) => "user" | "users" | "building-2";
38
+ /** 스텝 표시 라벨 — 운영자가 붙인 이름 > 유형 > 커스텀 결재자 나열(30자 말줄임). */
39
+ declare const stepLabel: (step: ApprovalLineStep) => string;
40
+ /** 바깥에서 온 `style`·`className`을 뿌리에 얹어 내보낸다 — 자기 축(폭·여백)이 닿게 하는 통로. */
41
+ declare const ApprovalLineEditor: React__default.FC<ApprovalLineEditorProps & SduiBoxProps>;
42
+
43
+ export { ApprovalLineEditor, type ApprovalLineEditorProps, type ApprovalLineStep, type CustomApprover, stepLabel, stepTypeIcon };
@@ -0,0 +1,7 @@
1
+ export { ApprovalLineEditor, stepLabel, stepTypeIcon } from '../chunk-SAPJVLZM.js';
2
+ import '../chunk-BD75U73S.js';
3
+ import '../chunk-DVOPZFQS.js';
4
+ import '../chunk-EFMKWPZ3.js';
5
+ import '../chunk-XQPTSEJC.js';
6
+ import '../chunk-WIDDHR7L.js';
7
+ import '../chunk-SAN4IX6N.js';
@@ -0,0 +1,42 @@
1
+ import { S as SduiBoxProps } from '../layout-B1QrIBm6.js';
2
+ import React__default from 'react';
3
+ import { ApprovalLineStep, CustomApprover } from './ApprovalLineEditor.js';
4
+
5
+ /** 저장 JSON 계약(approval-line) — 키 이름 변경 금지. */
6
+ interface ApprovalLineOverride {
7
+ id: string;
8
+ name: string;
9
+ jobTitles: string[];
10
+ grades: string[];
11
+ /** 레거시 이관 키(적용 업무유형) — 편집 금지, spread로 보존만 한다. */
12
+ entityTypes?: string[];
13
+ steps: ApprovalLineStep[];
14
+ }
15
+ interface ApprovalOverridesEditorProps {
16
+ value: ApprovalLineOverride[];
17
+ onChange: (value: ApprovalLineOverride[]) => void;
18
+ /** 선택 가능한 직책 목록(직원 데이터에서 distinct 추출한 문자열). */
19
+ jobTitleOptions: string[];
20
+ /** 선택 가능한 직급 목록. */
21
+ gradeOptions: string[];
22
+ /**
23
+ * 직책·직급 옵션을 스스로 끌어올 직원 목록 경로(예: `/employees?limit=500`).
24
+ * v2 는 편집기가 직접 `/employees` 를 distinct 추출했다(approval-line-overrides-
25
+ * editor.tsx) — 같은 방식이다. 주면 응답의 `job_title`·`grade` 를 모아
26
+ * jobTitleOptions/gradeOptions **에 합친다**(대체가 아니라 합집합 — 정적 폴백이
27
+ * 캔버스 샌드박스에서 살아남아야 한다). 실패는 조용히 무시한다: 폴백 목록이
28
+ * 그대로 남고, 저장된 값은 withSelected 가 어차피 살린다.
29
+ */
30
+ facetsEndpoint?: string;
31
+ /** 결재자 통합 검색 경로 — 중첩 결재선 편집기로 전달. */
32
+ searchEndpoint?: string;
33
+ /** 부서(그룹) 검색 경로 — 중첩 결재선 편집기로 전달. */
34
+ groupSearchEndpoint?: string;
35
+ /** 정적 데모 폴백 결재자 목록 — 중첩 결재선 편집기로 전달. */
36
+ searchOptions?: CustomApprover[];
37
+ disabled?: boolean;
38
+ }
39
+ /** 바깥에서 온 `style`·`className`을 뿌리에 얹어 내보낸다 — 자기 축(폭·여백)이 닿게 하는 통로. */
40
+ declare const ApprovalOverridesEditor: React__default.FC<ApprovalOverridesEditorProps & SduiBoxProps>;
41
+
42
+ export { type ApprovalLineOverride, ApprovalOverridesEditor, type ApprovalOverridesEditorProps };
@@ -0,0 +1,9 @@
1
+ export { ApprovalOverridesEditor } from '../chunk-ZDRERW4G.js';
2
+ import '../chunk-QDEZXA34.js';
3
+ import '../chunk-SAPJVLZM.js';
4
+ import '../chunk-BD75U73S.js';
5
+ import '../chunk-DVOPZFQS.js';
6
+ import '../chunk-EFMKWPZ3.js';
7
+ import '../chunk-XQPTSEJC.js';
8
+ import '../chunk-WIDDHR7L.js';
9
+ import '../chunk-SAN4IX6N.js';
@@ -42,10 +42,14 @@ import { DiffViewProps } from './DiffView.js';
42
42
  export { DiffField, DiffList, DiffView } from './DiffView.js';
43
43
  import { ColumnBoardProps } from './ColumnBoard.js';
44
44
  export { ColumnBoard, ColumnBoardColumn, ColumnBoardItem, ColumnBoardTone } from './ColumnBoard.js';
45
- import * as React from 'react';
46
- import { S as SduiBoxProps } from '../layout-B1QrIBm6.js';
47
45
  import { ApprovalStepperProps } from './ApprovalStepper.js';
48
46
  export { ApprovalStepper, ApprovalStepperStep } from './ApprovalStepper.js';
47
+ import { ApprovalOverridesEditorProps } from './ApprovalOverridesEditor.js';
48
+ export { ApprovalLineOverride, ApprovalOverridesEditor } from './ApprovalOverridesEditor.js';
49
+ import * as React from 'react';
50
+ import { S as SduiBoxProps } from '../layout-B1QrIBm6.js';
51
+ import { ApprovalLineEditorProps } from './ApprovalLineEditor.js';
52
+ export { ApprovalLineEditor, ApprovalLineStep, CustomApprover } from './ApprovalLineEditor.js';
49
53
  export { AutocompleteField, AutocompleteFieldProps, AutocompleteOption, AutocompleteSearchFn, AutocompleteSearchResult, toAutocompleteOptions } from './AutocompleteField.js';
50
54
 
51
55
  /**
@@ -56,6 +60,8 @@ export { AutocompleteField, AutocompleteFieldProps, AutocompleteOption, Autocomp
56
60
  * `SduiWidgetComponentName`이 어휘 목록이 되게 한다.
57
61
  */
58
62
  declare const widgetComponents: {
63
+ ApprovalLineEditor: React.FC<ApprovalLineEditorProps & SduiBoxProps>;
64
+ ApprovalOverridesEditor: React.FC<ApprovalOverridesEditorProps & SduiBoxProps>;
59
65
  ApprovalStepper: React.FC<ApprovalStepperProps & SduiBoxProps>;
60
66
  ColumnBoard: React.FC<ColumnBoardProps & SduiBoxProps>;
61
67
  DiffView: React.FC<DiffViewProps & SduiBoxProps>;
@@ -83,4 +89,4 @@ declare const widgetComponents: {
83
89
  /** 위젯 어휘의 컴포넌트 이름 union — 메타데이터 대조에 쓴다(`@wipco/sdui/meta`). */
84
90
  type SduiWidgetComponentName = keyof typeof widgetComponents;
85
91
 
86
- export { ApprovalStepperProps, ColumnBoardProps, DiffViewProps, DisclosureProps, EventCalendarProps, ImageLightboxProps, InlineEditProps, JsonFieldProps, LiveClockProps, OrgChartProps, PeriodFilterProps, PrintSheetProps, RankBoardProps, RecordSheetProps, type SduiWidgetComponentName, SearchableMultiPickerProps, SecureScreenProps, StackedMeterProps, StripProps, SummaryTableProps, TagMultiSelectProps, TimelineProps, TreePickerProps, TreeViewProps, widgetComponents };
92
+ export { ApprovalLineEditorProps, ApprovalOverridesEditorProps, ApprovalStepperProps, ColumnBoardProps, DiffViewProps, DisclosureProps, EventCalendarProps, ImageLightboxProps, InlineEditProps, JsonFieldProps, LiveClockProps, OrgChartProps, PeriodFilterProps, PrintSheetProps, RankBoardProps, RecordSheetProps, type SduiWidgetComponentName, SearchableMultiPickerProps, SecureScreenProps, StackedMeterProps, StripProps, SummaryTableProps, TagMultiSelectProps, TimelineProps, TreePickerProps, TreeViewProps, widgetComponents };
@@ -1,11 +1,17 @@
1
- import { TagMultiSelect } from '../chunk-QDEZXA34.js';
2
- export { TagMultiSelect } from '../chunk-QDEZXA34.js';
1
+ import { Strip } from '../chunk-ZH5MLOZS.js';
2
+ export { Strip } from '../chunk-ZH5MLOZS.js';
3
+ import { SummaryTable } from '../chunk-O4U7Y3XL.js';
4
+ export { SummaryTable } from '../chunk-O4U7Y3XL.js';
3
5
  import { Timeline } from '../chunk-EFYEOT47.js';
4
6
  export { Timeline } from '../chunk-EFYEOT47.js';
5
7
  import { TreePicker } from '../chunk-U3HYQCFA.js';
6
8
  export { TreePicker } from '../chunk-U3HYQCFA.js';
7
9
  import { TreeView } from '../chunk-X5R2HHEN.js';
8
10
  export { TreeView, buildTreeNodes } from '../chunk-X5R2HHEN.js';
11
+ import { OrgChart } from '../chunk-QWJ3OBBL.js';
12
+ export { OrgChart } from '../chunk-QWJ3OBBL.js';
13
+ import { PeriodFilter } from '../chunk-INWASR2G.js';
14
+ export { PeriodFilter } from '../chunk-INWASR2G.js';
9
15
  import { PrintSheet } from '../chunk-MYJ2KEIP.js';
10
16
  export { PrintSheet } from '../chunk-MYJ2KEIP.js';
11
17
  import { RankBoard } from '../chunk-DIVN4TBW.js';
@@ -18,10 +24,10 @@ import { SecureScreen } from '../chunk-IIRENCDS.js';
18
24
  export { SecureScreen } from '../chunk-IIRENCDS.js';
19
25
  import { StackedMeter } from '../chunk-BMZKZGJF.js';
20
26
  export { StackedMeter } from '../chunk-BMZKZGJF.js';
21
- import { Strip } from '../chunk-ZH5MLOZS.js';
22
- export { Strip } from '../chunk-ZH5MLOZS.js';
23
- import { SummaryTable } from '../chunk-O4U7Y3XL.js';
24
- export { SummaryTable } from '../chunk-O4U7Y3XL.js';
27
+ import { ColumnBoard } from '../chunk-C4JRSZGS.js';
28
+ export { ColumnBoard } from '../chunk-C4JRSZGS.js';
29
+ import { DiffView } from '../chunk-LDJ2CFFH.js';
30
+ export { DiffView } from '../chunk-LDJ2CFFH.js';
25
31
  import { Disclosure } from '../chunk-HIZ2OVJA.js';
26
32
  export { Disclosure } from '../chunk-HIZ2OVJA.js';
27
33
  import { EventCalendar } from '../chunk-C3JY6GA3.js';
@@ -34,12 +40,14 @@ import { JsonField } from '../chunk-JVBZRDC2.js';
34
40
  export { JsonField } from '../chunk-JVBZRDC2.js';
35
41
  import { LiveClock } from '../chunk-Z3WGIFJP.js';
36
42
  export { LiveClock } from '../chunk-Z3WGIFJP.js';
37
- import { OrgChart } from '../chunk-QWJ3OBBL.js';
38
- export { OrgChart } from '../chunk-QWJ3OBBL.js';
39
- import { PeriodFilter } from '../chunk-INWASR2G.js';
40
- export { PeriodFilter } from '../chunk-INWASR2G.js';
41
43
  import '../chunk-QU7YVMFA.js';
42
44
  import '../chunk-THEP3VWY.js';
45
+ import { ApprovalOverridesEditor } from '../chunk-ZDRERW4G.js';
46
+ export { ApprovalOverridesEditor } from '../chunk-ZDRERW4G.js';
47
+ import { TagMultiSelect } from '../chunk-QDEZXA34.js';
48
+ export { TagMultiSelect } from '../chunk-QDEZXA34.js';
49
+ import { ApprovalLineEditor } from '../chunk-SAPJVLZM.js';
50
+ export { ApprovalLineEditor } from '../chunk-SAPJVLZM.js';
43
51
  import { ApprovalStepper } from '../chunk-ZTQEP3TR.js';
44
52
  export { ApprovalStepper } from '../chunk-ZTQEP3TR.js';
45
53
  export { AutocompleteField, toAutocompleteOptions } from '../chunk-6S5CFNFM.js';
@@ -47,15 +55,13 @@ import '../chunk-BD75U73S.js';
47
55
  import '../chunk-DVOPZFQS.js';
48
56
  import '../chunk-EFMKWPZ3.js';
49
57
  import '../chunk-XQPTSEJC.js';
50
- import { ColumnBoard } from '../chunk-C4JRSZGS.js';
51
- export { ColumnBoard } from '../chunk-C4JRSZGS.js';
52
- import { DiffView } from '../chunk-LDJ2CFFH.js';
53
- export { DiffView } from '../chunk-LDJ2CFFH.js';
54
58
  import '../chunk-WIDDHR7L.js';
55
59
  import '../chunk-SAN4IX6N.js';
56
60
 
57
61
  // src/widgets/index.ts
58
62
  var widgetComponents = {
63
+ ApprovalLineEditor,
64
+ ApprovalOverridesEditor,
59
65
  ApprovalStepper,
60
66
  ColumnBoard,
61
67
  DiffView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipco/sdui",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
5
5
  "keywords": [
6
6
  "sdui",
@@ -36,6 +36,14 @@
36
36
  "types": "./dist/widgets/index.d.ts",
37
37
  "default": "./dist/widgets/index.js"
38
38
  },
39
+ "./widgets/ApprovalLineEditor": {
40
+ "types": "./dist/widgets/ApprovalLineEditor.d.ts",
41
+ "default": "./dist/widgets/ApprovalLineEditor.js"
42
+ },
43
+ "./widgets/ApprovalOverridesEditor": {
44
+ "types": "./dist/widgets/ApprovalOverridesEditor.d.ts",
45
+ "default": "./dist/widgets/ApprovalOverridesEditor.js"
46
+ },
39
47
  "./widgets/ApprovalStepper": {
40
48
  "types": "./dist/widgets/ApprovalStepper.d.ts",
41
49
  "default": "./dist/widgets/ApprovalStepper.js"