@uniai-fe/uds-templates 0.3.0 → 0.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-templates",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "UNIAI Design System; UI Templates Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"module:typecheck": "pnpm typecheck",
|
|
46
46
|
"module:build": "pnpm build",
|
|
47
47
|
"design-templates:build": "pnpm run build",
|
|
48
|
-
"design-templates:dev": "pnpm run dev"
|
|
48
|
+
"design-templates:dev": "pnpm run dev",
|
|
49
|
+
"publish:public": "bash ../../../scripts/npm-publish.sh"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
52
|
"@tanstack/react-query": "^5",
|
|
@@ -6,7 +6,10 @@ import { usePathname } from "next/navigation";
|
|
|
6
6
|
import assetUrl from "../../../../../../asset-url";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { Dropdown } from "@uniai-fe/uds-primitives";
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
DropdownTemplateChangePayload,
|
|
11
|
+
DropdownTemplateItem,
|
|
12
|
+
} from "@uniai-fe/uds-primitives";
|
|
10
13
|
import { getClosestRoute } from "@uniai-fe/util-functions";
|
|
11
14
|
|
|
12
15
|
import PageHeaderUtilityItem from "../Item";
|
|
@@ -61,11 +64,13 @@ export default function PageHeaderSettingButton({
|
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
66
|
* dropdown 항목을 선택했을 때 routeKey에 대응하는 onSelect를 실행한다.
|
|
64
|
-
* @param {
|
|
67
|
+
* @param {DropdownTemplateChangePayload} payload 선택 결과 payload
|
|
65
68
|
*/
|
|
66
69
|
const handleSelect = useCallback(
|
|
67
|
-
(
|
|
68
|
-
const target = menuItems.find(
|
|
70
|
+
(payload: DropdownTemplateChangePayload) => {
|
|
71
|
+
const target = menuItems.find(
|
|
72
|
+
item => item.routeKey === payload.currentItem.id,
|
|
73
|
+
);
|
|
69
74
|
target?.onSelect?.();
|
|
70
75
|
},
|
|
71
76
|
[menuItems],
|
|
@@ -94,7 +99,8 @@ export default function PageHeaderSettingButton({
|
|
|
94
99
|
width={170}
|
|
95
100
|
size="small"
|
|
96
101
|
selectedIds={selectedIds}
|
|
97
|
-
|
|
102
|
+
// Dropdown.Template 신규 계약(onChange payload)을 우선 사용한다.
|
|
103
|
+
onChange={handleSelect}
|
|
98
104
|
containerProps={{
|
|
99
105
|
align: "end",
|
|
100
106
|
sideOffset: 8,
|