@knockout-js/layout 0.0.4-beta.0 → 0.1.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/es2017/components/_util/index.d.ts +40 -0
- package/es2017/components/_util/index.js +69 -0
- package/es2017/components/_util/index.js.map +1 -0
- package/es2017/components/aggregate-menu/index.d.ts +37 -0
- package/es2017/components/aggregate-menu/index.js +372 -0
- package/es2017/components/aggregate-menu/index.js.map +1 -0
- package/es2017/components/aggregate-menu/index.module.css +190 -0
- package/es2017/components/aggregate-menu/locale/en_US.d.ts +3 -0
- package/es2017/components/{gather-menu → aggregate-menu}/locale/en_US.js +3 -1
- package/es2017/components/aggregate-menu/locale/en_US.js.map +1 -0
- package/es2017/components/aggregate-menu/locale/zh_CN.d.ts +3 -0
- package/es2017/components/{gather-menu → aggregate-menu}/locale/zh_CN.js +3 -1
- package/es2017/components/aggregate-menu/locale/zh_CN.js.map +1 -0
- package/es2017/components/collect-providers/index.d.ts +9 -1
- package/es2017/components/collect-providers/index.js +5 -3
- package/es2017/components/collect-providers/index.js.map +1 -1
- package/es2017/components/i18n-dropdown/index.d.ts +1 -1
- package/es2017/components/i18n-dropdown/index.js +2 -2
- package/es2017/components/i18n-dropdown/index.js.map +1 -1
- package/es2017/components/index.d.ts +7 -2
- package/es2017/components/index.js +8 -2
- package/es2017/components/index.js.map +1 -1
- package/es2017/components/layout/index.d.ts +12 -6
- package/es2017/components/layout/index.js +26 -39
- package/es2017/components/layout/index.js.map +1 -1
- package/es2017/components/locale/en_US.js +4 -2
- package/es2017/components/locale/en_US.js.map +1 -1
- package/es2017/components/locale/index.d.ts +4 -17
- package/es2017/components/locale/index.js +3 -23
- package/es2017/components/locale/index.js.map +1 -1
- package/es2017/components/locale/zh_CN.js +4 -2
- package/es2017/components/locale/zh_CN.js.map +1 -1
- package/es2017/components/provider/index.d.ts +33 -0
- package/es2017/components/provider/index.js +49 -0
- package/es2017/components/provider/index.js.map +1 -0
- package/es2017/components/tenant-dropdown/index.js +1 -1
- package/es2017/components/tenant-dropdown/index.js.map +1 -1
- package/es2017/components/upload-file/index.d.ts +57 -0
- package/es2017/components/upload-file/index.js +3 -0
- package/es2017/components/upload-file/index.js.map +1 -0
- package/es2017/components/upload-file/index.module.css +13 -0
- package/es2017/components/upload-file/locale/en_US.d.ts +3 -0
- package/es2017/components/upload-file/locale/en_US.js +14 -0
- package/es2017/components/upload-file/locale/en_US.js.map +1 -0
- package/es2017/components/upload-file/locale/zh_CN.d.ts +3 -0
- package/es2017/components/upload-file/locale/zh_CN.js +14 -0
- package/es2017/components/upload-file/locale/zh_CN.js.map +1 -0
- package/es2017/components/upload-file/uploadAvatar.d.ts +4 -0
- package/es2017/components/upload-file/uploadAvatar.js +93 -0
- package/es2017/components/upload-file/uploadAvatar.js.map +1 -0
- package/es2017/components/upload-file/uploadMultiple.d.ts +4 -0
- package/es2017/components/upload-file/uploadMultiple.js +155 -0
- package/es2017/components/upload-file/uploadMultiple.js.map +1 -0
- package/es2017/components/upload-file/uploadTemp.d.ts +9 -0
- package/es2017/components/upload-file/uploadTemp.js +167 -0
- package/es2017/components/upload-file/uploadTemp.js.map +1 -0
- package/esm/components/_util/index.d.ts +40 -0
- package/esm/components/_util/index.js +75 -0
- package/esm/components/_util/index.js.map +1 -0
- package/esm/components/aggregate-menu/index.d.ts +37 -0
- package/esm/components/aggregate-menu/index.js +521 -0
- package/esm/components/aggregate-menu/index.js.map +1 -0
- package/esm/components/aggregate-menu/index.module.css +190 -0
- package/esm/components/aggregate-menu/locale/en_US.d.ts +3 -0
- package/esm/components/{gather-menu → aggregate-menu}/locale/en_US.js +3 -1
- package/esm/components/aggregate-menu/locale/en_US.js.map +1 -0
- package/esm/components/aggregate-menu/locale/zh_CN.d.ts +3 -0
- package/esm/components/{gather-menu → aggregate-menu}/locale/zh_CN.js +3 -1
- package/esm/components/aggregate-menu/locale/zh_CN.js.map +1 -0
- package/esm/components/collect-providers/index.d.ts +9 -1
- package/esm/components/collect-providers/index.js +5 -3
- package/esm/components/collect-providers/index.js.map +1 -1
- package/esm/components/i18n-dropdown/index.d.ts +1 -1
- package/esm/components/i18n-dropdown/index.js +2 -2
- package/esm/components/i18n-dropdown/index.js.map +1 -1
- package/esm/components/index.d.ts +7 -2
- package/esm/components/index.js +8 -2
- package/esm/components/index.js.map +1 -1
- package/esm/components/layout/index.d.ts +12 -6
- package/esm/components/layout/index.js +26 -44
- package/esm/components/layout/index.js.map +1 -1
- package/esm/components/locale/en_US.js +4 -2
- package/esm/components/locale/en_US.js.map +1 -1
- package/esm/components/locale/index.d.ts +4 -17
- package/esm/components/locale/index.js +3 -23
- package/esm/components/locale/index.js.map +1 -1
- package/esm/components/locale/zh_CN.js +4 -2
- package/esm/components/locale/zh_CN.js.map +1 -1
- package/esm/components/provider/index.d.ts +33 -0
- package/esm/components/provider/index.js +49 -0
- package/esm/components/provider/index.js.map +1 -0
- package/esm/components/tenant-dropdown/index.js +1 -1
- package/esm/components/tenant-dropdown/index.js.map +1 -1
- package/esm/components/upload-file/index.d.ts +57 -0
- package/esm/components/upload-file/index.js +3 -0
- package/esm/components/upload-file/index.js.map +1 -0
- package/esm/components/upload-file/index.module.css +13 -0
- package/esm/components/upload-file/locale/en_US.d.ts +3 -0
- package/esm/components/upload-file/locale/en_US.js +14 -0
- package/esm/components/upload-file/locale/en_US.js.map +1 -0
- package/esm/components/upload-file/locale/zh_CN.d.ts +3 -0
- package/esm/components/upload-file/locale/zh_CN.js +14 -0
- package/esm/components/upload-file/locale/zh_CN.js.map +1 -0
- package/esm/components/upload-file/uploadAvatar.d.ts +4 -0
- package/esm/components/upload-file/uploadAvatar.js +191 -0
- package/esm/components/upload-file/uploadAvatar.js.map +1 -0
- package/esm/components/upload-file/uploadMultiple.d.ts +4 -0
- package/esm/components/upload-file/uploadMultiple.js +308 -0
- package/esm/components/upload-file/uploadMultiple.js.map +1 -0
- package/esm/components/upload-file/uploadTemp.d.ts +9 -0
- package/esm/components/upload-file/uploadTemp.js +293 -0
- package/esm/components/upload-file/uploadTemp.js.map +1 -0
- package/package.json +8 -4
- package/es2017/components/gather-menu/index.d.ts +0 -34
- package/es2017/components/gather-menu/index.js +0 -278
- package/es2017/components/gather-menu/index.js.map +0 -1
- package/es2017/components/gather-menu/index.module.css +0 -120
- package/es2017/components/gather-menu/locale/en_US.d.ts +0 -3
- package/es2017/components/gather-menu/locale/en_US.js.map +0 -1
- package/es2017/components/gather-menu/locale/zh_CN.d.ts +0 -3
- package/es2017/components/gather-menu/locale/zh_CN.js.map +0 -1
- package/esm/components/gather-menu/index.d.ts +0 -34
- package/esm/components/gather-menu/index.js +0 -320
- package/esm/components/gather-menu/index.js.map +0 -1
- package/esm/components/gather-menu/index.module.css +0 -120
- package/esm/components/gather-menu/locale/en_US.d.ts +0 -3
- package/esm/components/gather-menu/locale/en_US.js.map +0 -1
- package/esm/components/gather-menu/locale/zh_CN.d.ts +0 -3
- package/esm/components/gather-menu/locale/zh_CN.js.map +0 -1
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
|
2
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
3
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
4
|
+
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
5
|
+
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
|
|
6
|
+
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ice/jsx-runtime/jsx-runtime";
|
|
8
|
+
import { CloseOutlined, DragOutlined, SearchOutlined, StarOutlined } from "@ant-design/icons";
|
|
9
|
+
import { useCallback, useEffect, useState } from "react";
|
|
10
|
+
import styles from "./index.module.css";
|
|
11
|
+
import { Drawer, Empty, Input, Space } from "antd";
|
|
12
|
+
import { gql, mutation, paging, query } from "@knockout-js/ice-urql/request";
|
|
13
|
+
import { AppMenuKind } from "@knockout-js/api";
|
|
14
|
+
import { iceUrqlInstance } from "../index";
|
|
15
|
+
import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
16
|
+
import { arrayMove, SortableContext, useSortable, sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
17
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
18
|
+
import { useLocale } from "../locale/index";
|
|
19
|
+
import { useDark } from "../provider/index";
|
|
20
|
+
import { listFormatTreeData, treeFormatList } from "../_util/index";
|
|
21
|
+
import { OpenWin } from "../icons/index";
|
|
22
|
+
var userMenuListQuery = gql("query layoutPkgUserMenuList($appCode:String!){\n userMenus(appCode: $appCode){\n id,name,route,appID,parentID,displaySort,kind\n }\n}");
|
|
23
|
+
var userAppsQuery = gql("query layoutPkgUserAppList{\n userApps{\n id,name,code\n }\n}");
|
|
24
|
+
var userPreferenceQuery = gql("query layoutPkgUserPreference{\n orgUserPreference{\n id,menuFavorite,menuRecent,\n }\n}");
|
|
25
|
+
var userPreferenceMut = gql("mutation layoutPkgSaveUserPreference($input:OrgUserPreferenceInput!){\n saveOrgUserPreference(input: $input){ id }\n}");
|
|
26
|
+
/**
|
|
27
|
+
* 排序拖拽使用的控件
|
|
28
|
+
* https://docs.dndkit.com/
|
|
29
|
+
* @param props
|
|
30
|
+
* @returns
|
|
31
|
+
*/ var DargItem = function(props) {
|
|
32
|
+
var id = "".concat(props.value.id, "-").concat(props.value.appID);
|
|
33
|
+
var _useSortable = useSortable({
|
|
34
|
+
id: id
|
|
35
|
+
}), setNodeRef = _useSortable.setNodeRef, listeners = _useSortable.listeners, attributes = _useSortable.attributes, transform = _useSortable.transform, transition = _useSortable.transition;
|
|
36
|
+
var style = {
|
|
37
|
+
transform: CSS.Transform.toString(transform),
|
|
38
|
+
transition: transition
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/ _jsxs("div", _object_spread_props(_object_spread({
|
|
41
|
+
ref: setNodeRef,
|
|
42
|
+
style: style
|
|
43
|
+
}, attributes), {
|
|
44
|
+
className: styles.aggregateMenuDrawerMenuItem,
|
|
45
|
+
onClick: function() {
|
|
46
|
+
props.onClick();
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ _jsx("div", {
|
|
50
|
+
className: styles.aggregateMenuDrawerMenuItemName,
|
|
51
|
+
children: props.value.name
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsx("div", {
|
|
54
|
+
className: styles.aggregateMenuDrawerMenuItemIcons,
|
|
55
|
+
children: /*#__PURE__*/ _jsxs(Space, {
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ _jsx(OpenWin, {
|
|
58
|
+
className: "anticon",
|
|
59
|
+
onClick: function(event) {
|
|
60
|
+
event.stopPropagation();
|
|
61
|
+
props.onClick(true);
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx(CloseOutlined, {
|
|
65
|
+
rev: undefined,
|
|
66
|
+
onClick: function(event) {
|
|
67
|
+
event.stopPropagation();
|
|
68
|
+
props.onDel();
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx(DragOutlined, _object_spread_props(_object_spread({
|
|
72
|
+
rev: undefined
|
|
73
|
+
}, listeners), {
|
|
74
|
+
className: "dragIcon"
|
|
75
|
+
}))
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
}));
|
|
81
|
+
};
|
|
82
|
+
export default function(props) {
|
|
83
|
+
var _useState = _sliced_to_array(useState([]), 2), all = _useState[0], setAll = _useState[1], _useState1 = _sliced_to_array(useState([]), 2), filterList = _useState1[0], setFilterList = _useState1[1], _useState2 = _sliced_to_array(useState([]), 2), collects = _useState2[0], setCollects = _useState2[1], _useState3 = _sliced_to_array(useState([]), 2), latelys = _useState3[0], setLately = _useState3[1], locale = useLocale("AggregateMenu"), isDark = useDark(), sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
84
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
85
|
+
}));
|
|
86
|
+
var request = useCallback(/*#__PURE__*/ _async_to_generator(function() {
|
|
87
|
+
var _appsResult_data, _preferenceResult_data, _preferenceResult_data_orgUserPreference, appsResult, apps, newAll, _tmp, _tmp1, _i, i, _menuResult_data, menuResult, menu, preferenceResult, menuFavorite, menuRecent, collectsList, latelyList;
|
|
88
|
+
return _ts_generator(this, function(_state) {
|
|
89
|
+
switch(_state.label){
|
|
90
|
+
case 0:
|
|
91
|
+
return [
|
|
92
|
+
4,
|
|
93
|
+
paging(userAppsQuery, {}, 1, {
|
|
94
|
+
instanceName: iceUrqlInstance.ucenter
|
|
95
|
+
})
|
|
96
|
+
];
|
|
97
|
+
case 1:
|
|
98
|
+
appsResult = _state.sent(), apps = [];
|
|
99
|
+
if ((_appsResult_data = appsResult.data) === null || _appsResult_data === void 0 ? void 0 : _appsResult_data.userApps) appsResult.data.userApps.forEach(function(app) {
|
|
100
|
+
apps.push(app);
|
|
101
|
+
});
|
|
102
|
+
newAll = [];
|
|
103
|
+
_tmp = [];
|
|
104
|
+
for(_tmp1 in apps)_tmp.push(_tmp1);
|
|
105
|
+
_i = 0;
|
|
106
|
+
_state.label = 2;
|
|
107
|
+
case 2:
|
|
108
|
+
if (!(_i < _tmp.length)) return [
|
|
109
|
+
3,
|
|
110
|
+
5
|
|
111
|
+
];
|
|
112
|
+
i = _tmp[_i];
|
|
113
|
+
return [
|
|
114
|
+
4,
|
|
115
|
+
query(userMenuListQuery, {
|
|
116
|
+
appCode: apps[i].code
|
|
117
|
+
}, {
|
|
118
|
+
instanceName: iceUrqlInstance.ucenter
|
|
119
|
+
})
|
|
120
|
+
];
|
|
121
|
+
case 3:
|
|
122
|
+
menuResult = _state.sent();
|
|
123
|
+
if ((_menuResult_data = menuResult.data) === null || _menuResult_data === void 0 ? void 0 : _menuResult_data.userMenus) {
|
|
124
|
+
menu = menuResult.data.userMenus.sort(function(d1, d2) {
|
|
125
|
+
var d1Sort = d1.displaySort || 0, d2Sort = d2.displaySort || 0;
|
|
126
|
+
return d1.parentID < d2.parentID ? -1 : d1.parentID > d2.parentID ? 1 : d1Sort < d2Sort ? -1 : d1Sort > d2Sort ? 1 : 0;
|
|
127
|
+
});
|
|
128
|
+
newAll.push({
|
|
129
|
+
app: apps[i],
|
|
130
|
+
menu: treeFormatList(listFormatTreeData(menu, undefined, {
|
|
131
|
+
key: "id",
|
|
132
|
+
parentId: "parentID"
|
|
133
|
+
}))
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
_state.label = 4;
|
|
137
|
+
case 4:
|
|
138
|
+
_i++;
|
|
139
|
+
return [
|
|
140
|
+
3,
|
|
141
|
+
2
|
|
142
|
+
];
|
|
143
|
+
case 5:
|
|
144
|
+
setAll(newAll);
|
|
145
|
+
setFilterList(newAll);
|
|
146
|
+
return [
|
|
147
|
+
4,
|
|
148
|
+
query(userPreferenceQuery, {}, {
|
|
149
|
+
instanceName: iceUrqlInstance.ucenter
|
|
150
|
+
})
|
|
151
|
+
];
|
|
152
|
+
case 6:
|
|
153
|
+
preferenceResult = _state.sent();
|
|
154
|
+
if ((_preferenceResult_data = preferenceResult.data) === null || _preferenceResult_data === void 0 ? void 0 : (_preferenceResult_data_orgUserPreference = _preferenceResult_data.orgUserPreference) === null || _preferenceResult_data_orgUserPreference === void 0 ? void 0 : _preferenceResult_data_orgUserPreference.id) {
|
|
155
|
+
menuFavorite = preferenceResult.data.orgUserPreference.menuFavorite, menuRecent = preferenceResult.data.orgUserPreference.menuRecent, collectsList = [], latelyList = [];
|
|
156
|
+
if (menuFavorite) menuFavorite.forEach(function(id) {
|
|
157
|
+
for(var i in newAll){
|
|
158
|
+
var menuItem = newAll[i].menu.find(function(item) {
|
|
159
|
+
return item.id == id;
|
|
160
|
+
});
|
|
161
|
+
if (menuItem) {
|
|
162
|
+
collectsList.push(menuItem);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
if (menuRecent) menuRecent.forEach(function(id) {
|
|
168
|
+
for(var i in newAll){
|
|
169
|
+
var menuItem = newAll[i].menu.find(function(item) {
|
|
170
|
+
return item.id == id;
|
|
171
|
+
});
|
|
172
|
+
if (menuItem) {
|
|
173
|
+
latelyList.push(menuItem);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
setCollects(collectsList);
|
|
179
|
+
setLately(latelyList);
|
|
180
|
+
}
|
|
181
|
+
return [
|
|
182
|
+
2
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}), []), requestFavorite = function() {
|
|
187
|
+
var _ref = _async_to_generator(function(list) {
|
|
188
|
+
return _ts_generator(this, function(_state) {
|
|
189
|
+
switch(_state.label){
|
|
190
|
+
case 0:
|
|
191
|
+
// 异步存储收藏
|
|
192
|
+
return [
|
|
193
|
+
4,
|
|
194
|
+
mutation(userPreferenceMut, {
|
|
195
|
+
input: {
|
|
196
|
+
menuFavorite: list.map(function(item) {
|
|
197
|
+
return item.id;
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
instanceName: iceUrqlInstance.ucenter
|
|
202
|
+
})
|
|
203
|
+
];
|
|
204
|
+
case 1:
|
|
205
|
+
_state.sent();
|
|
206
|
+
return [
|
|
207
|
+
2
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
return function requestFavorite(list) {
|
|
213
|
+
return _ref.apply(this, arguments);
|
|
214
|
+
};
|
|
215
|
+
}(), requestRecent = function() {
|
|
216
|
+
var _ref = _async_to_generator(function(ids) {
|
|
217
|
+
return _ts_generator(this, function(_state) {
|
|
218
|
+
switch(_state.label){
|
|
219
|
+
case 0:
|
|
220
|
+
// 异步存储访问菜单记录
|
|
221
|
+
return [
|
|
222
|
+
4,
|
|
223
|
+
mutation(userPreferenceMut, {
|
|
224
|
+
input: {
|
|
225
|
+
menuRecent: ids
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
instanceName: iceUrqlInstance.ucenter
|
|
229
|
+
})
|
|
230
|
+
];
|
|
231
|
+
case 1:
|
|
232
|
+
_state.sent();
|
|
233
|
+
return [
|
|
234
|
+
2
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
return function requestRecent(ids) {
|
|
240
|
+
return _ref.apply(this, arguments);
|
|
241
|
+
};
|
|
242
|
+
}(), checkCollect = useCallback(function(menuItem) {
|
|
243
|
+
return !!collects.find(function(item) {
|
|
244
|
+
return item.id === menuItem.id && item.appID === menuItem.appID;
|
|
245
|
+
});
|
|
246
|
+
}, [
|
|
247
|
+
collects
|
|
248
|
+
]), onClickItem = function() {
|
|
249
|
+
var _ref = _async_to_generator(function(menuItem, isOpen) {
|
|
250
|
+
var allApp, _props_onClick, latelyList, oldIdx;
|
|
251
|
+
return _ts_generator(this, function(_state) {
|
|
252
|
+
switch(_state.label){
|
|
253
|
+
case 0:
|
|
254
|
+
allApp = all.find(function(allItem) {
|
|
255
|
+
return allItem.app.id == menuItem.appID;
|
|
256
|
+
});
|
|
257
|
+
if (!allApp) return [
|
|
258
|
+
3,
|
|
259
|
+
2
|
|
260
|
+
];
|
|
261
|
+
latelyList = _to_consumable_array(latelys);
|
|
262
|
+
oldIdx = latelyList.findIndex(function(lately) {
|
|
263
|
+
return lately.id == menuItem.id;
|
|
264
|
+
});
|
|
265
|
+
if (oldIdx > -1) latelyList.splice(oldIdx, 1);
|
|
266
|
+
latelyList.unshift(menuItem);
|
|
267
|
+
latelyList.splice(6);
|
|
268
|
+
return [
|
|
269
|
+
4,
|
|
270
|
+
requestRecent(latelyList.map(function(item) {
|
|
271
|
+
return item.id;
|
|
272
|
+
}))
|
|
273
|
+
];
|
|
274
|
+
case 1:
|
|
275
|
+
_state.sent();
|
|
276
|
+
setLately(latelyList);
|
|
277
|
+
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, menuItem, allApp.app, isOpen);
|
|
278
|
+
_state.label = 2;
|
|
279
|
+
case 2:
|
|
280
|
+
return [
|
|
281
|
+
2
|
|
282
|
+
];
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
return function onClickItem(menuItem, isOpen) {
|
|
287
|
+
return _ref.apply(this, arguments);
|
|
288
|
+
};
|
|
289
|
+
}(), menuItemRender = function(menuItem) {
|
|
290
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
291
|
+
className: styles.aggregateMenuDrawerAllMenuItem,
|
|
292
|
+
onClick: function() {
|
|
293
|
+
onClickItem(menuItem);
|
|
294
|
+
},
|
|
295
|
+
children: [
|
|
296
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
297
|
+
className: styles.aggregateMenuDrawerAllMenuItemName,
|
|
298
|
+
children: [
|
|
299
|
+
" ",
|
|
300
|
+
menuItem.name
|
|
301
|
+
]
|
|
302
|
+
}),
|
|
303
|
+
/*#__PURE__*/ _jsx("div", {
|
|
304
|
+
className: styles.aggregateMenuDrawerAllMenuItemIcons,
|
|
305
|
+
children: /*#__PURE__*/ _jsxs(Space, {
|
|
306
|
+
children: [
|
|
307
|
+
/*#__PURE__*/ _jsx(OpenWin, {
|
|
308
|
+
className: "anticon",
|
|
309
|
+
onClick: function(event) {
|
|
310
|
+
event.stopPropagation();
|
|
311
|
+
onClickItem(menuItem, true);
|
|
312
|
+
}
|
|
313
|
+
}),
|
|
314
|
+
/*#__PURE__*/ _jsx(StarOutlined, {
|
|
315
|
+
rev: undefined,
|
|
316
|
+
className: checkCollect(menuItem) ? "collect" : "",
|
|
317
|
+
onClick: function() {
|
|
318
|
+
var _ref = _async_to_generator(function(event) {
|
|
319
|
+
var collectList;
|
|
320
|
+
return _ts_generator(this, function(_state) {
|
|
321
|
+
switch(_state.label){
|
|
322
|
+
case 0:
|
|
323
|
+
event.stopPropagation();
|
|
324
|
+
collectList = [];
|
|
325
|
+
if (checkCollect(menuItem)) collectList = collects.filter(function(c) {
|
|
326
|
+
return !(c.id === menuItem.id && c.appID === menuItem.appID);
|
|
327
|
+
});
|
|
328
|
+
else collectList = _to_consumable_array(collects).concat([
|
|
329
|
+
menuItem
|
|
330
|
+
]);
|
|
331
|
+
return [
|
|
332
|
+
4,
|
|
333
|
+
requestFavorite(collectList)
|
|
334
|
+
];
|
|
335
|
+
case 1:
|
|
336
|
+
_state.sent();
|
|
337
|
+
setCollects(collectList);
|
|
338
|
+
return [
|
|
339
|
+
2
|
|
340
|
+
];
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
return function(event) {
|
|
345
|
+
return _ref.apply(this, arguments);
|
|
346
|
+
};
|
|
347
|
+
}()
|
|
348
|
+
})
|
|
349
|
+
]
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
]
|
|
353
|
+
}, "".concat(menuItem.id, "-").concat(menuItem.appID));
|
|
354
|
+
};
|
|
355
|
+
useEffect(function() {
|
|
356
|
+
if (props.dataSource) {
|
|
357
|
+
setAll(props.dataSource);
|
|
358
|
+
setFilterList(props.dataSource);
|
|
359
|
+
} else request();
|
|
360
|
+
}, [
|
|
361
|
+
props.dataSource
|
|
362
|
+
]);
|
|
363
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
364
|
+
children: /*#__PURE__*/ _jsx(Drawer, _object_spread_props(_object_spread({
|
|
365
|
+
title: locale.title,
|
|
366
|
+
maskClosable: false,
|
|
367
|
+
placement: "left",
|
|
368
|
+
width: 1060
|
|
369
|
+
}, props.drawerProps), {
|
|
370
|
+
className: "".concat(styles.aggregateMenuDrawer, " ").concat(isDark ? styles.aggregateMenuDark : ""),
|
|
371
|
+
open: props.open,
|
|
372
|
+
onClose: function() {
|
|
373
|
+
var _props_onChangeOpen;
|
|
374
|
+
(_props_onChangeOpen = props.onChangeOpen) === null || _props_onChangeOpen === void 0 ? void 0 : _props_onChangeOpen.call(props, false);
|
|
375
|
+
},
|
|
376
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
377
|
+
className: styles.aggregateMenuDrawerRow,
|
|
378
|
+
children: [
|
|
379
|
+
/*#__PURE__*/ _jsx("div", {
|
|
380
|
+
style: {
|
|
381
|
+
width: 240
|
|
382
|
+
},
|
|
383
|
+
className: styles.aggregateMenuDrawerMenu,
|
|
384
|
+
children: collects.length ? /*#__PURE__*/ _jsx(DndContext, {
|
|
385
|
+
sensors: sensors,
|
|
386
|
+
collisionDetection: closestCenter,
|
|
387
|
+
onDragEnd: function(event) {
|
|
388
|
+
var active = event.active, over = event.over;
|
|
389
|
+
if (over && active.id !== over.id) setCollects(function(items) {
|
|
390
|
+
var oldIndex = items.findIndex(function(oItem) {
|
|
391
|
+
return "".concat(oItem.id, "-").concat(oItem.appID) == active.id;
|
|
392
|
+
});
|
|
393
|
+
var newIndex = items.findIndex(function(nItem) {
|
|
394
|
+
return "".concat(nItem.id, "-").concat(nItem.appID) == over.id;
|
|
395
|
+
});
|
|
396
|
+
var collectList = arrayMove(items, oldIndex, newIndex);
|
|
397
|
+
requestFavorite(collectList);
|
|
398
|
+
return collectList;
|
|
399
|
+
});
|
|
400
|
+
},
|
|
401
|
+
children: /*#__PURE__*/ _jsx(SortableContext, {
|
|
402
|
+
items: collects.map(function(item) {
|
|
403
|
+
return "".concat(item.id, "-").concat(item.appID);
|
|
404
|
+
}),
|
|
405
|
+
strategy: verticalListSortingStrategy,
|
|
406
|
+
children: collects.map(function(item) {
|
|
407
|
+
return /*#__PURE__*/ _jsx(DargItem, {
|
|
408
|
+
value: item,
|
|
409
|
+
onDel: /*#__PURE__*/ _async_to_generator(function() {
|
|
410
|
+
var collectList;
|
|
411
|
+
return _ts_generator(this, function(_state) {
|
|
412
|
+
switch(_state.label){
|
|
413
|
+
case 0:
|
|
414
|
+
collectList = collects.filter(function(c) {
|
|
415
|
+
return !(c.id === item.id && c.appID === item.appID);
|
|
416
|
+
});
|
|
417
|
+
return [
|
|
418
|
+
4,
|
|
419
|
+
requestFavorite(collectList)
|
|
420
|
+
];
|
|
421
|
+
case 1:
|
|
422
|
+
_state.sent();
|
|
423
|
+
setCollects(collectList);
|
|
424
|
+
return [
|
|
425
|
+
2
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
}),
|
|
430
|
+
onClick: function(isOpen) {
|
|
431
|
+
onClickItem(item, isOpen);
|
|
432
|
+
}
|
|
433
|
+
}, "c".concat(item.id, "-").concat(item.appID));
|
|
434
|
+
})
|
|
435
|
+
})
|
|
436
|
+
}) : /*#__PURE__*/ _jsx(Empty, {
|
|
437
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
438
|
+
description: locale.notText
|
|
439
|
+
})
|
|
440
|
+
}),
|
|
441
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
442
|
+
style: {
|
|
443
|
+
width: 820
|
|
444
|
+
},
|
|
445
|
+
children: [
|
|
446
|
+
/*#__PURE__*/ _jsx("div", {
|
|
447
|
+
className: styles.aggregateMenuDrawerAllInput,
|
|
448
|
+
children: /*#__PURE__*/ _jsx(Input, {
|
|
449
|
+
bordered: false,
|
|
450
|
+
prefix: /*#__PURE__*/ _jsx(SearchOutlined, {
|
|
451
|
+
rev: undefined
|
|
452
|
+
}),
|
|
453
|
+
placeholder: locale.searchPlaceholder,
|
|
454
|
+
onChange: function(event) {
|
|
455
|
+
var keyword = event.target.value;
|
|
456
|
+
if (keyword) {
|
|
457
|
+
var fList = all.map(function(f) {
|
|
458
|
+
return {
|
|
459
|
+
app: f.app,
|
|
460
|
+
menu: f.menu.filter(function(fMenuItem) {
|
|
461
|
+
return fMenuItem.name.indexOf(keyword) > -1;
|
|
462
|
+
})
|
|
463
|
+
};
|
|
464
|
+
}).filter(function(f) {
|
|
465
|
+
return f.menu.length;
|
|
466
|
+
});
|
|
467
|
+
setFilterList(fList);
|
|
468
|
+
} else setFilterList(_to_consumable_array(all));
|
|
469
|
+
}
|
|
470
|
+
})
|
|
471
|
+
}),
|
|
472
|
+
latelys.length ? /*#__PURE__*/ _jsxs("div", {
|
|
473
|
+
className: styles.aggregateMenuLatelys,
|
|
474
|
+
children: [
|
|
475
|
+
/*#__PURE__*/ _jsx("div", {
|
|
476
|
+
className: styles.aggregateMenuDrawerAllMenuItemDir,
|
|
477
|
+
children: locale.latelyTitle
|
|
478
|
+
}),
|
|
479
|
+
/*#__PURE__*/ _jsx("div", {
|
|
480
|
+
className: styles.aggregateMenuLatelysColumn,
|
|
481
|
+
children: latelys.map(function(menuItem) {
|
|
482
|
+
return menuItemRender(menuItem);
|
|
483
|
+
})
|
|
484
|
+
})
|
|
485
|
+
]
|
|
486
|
+
}) : /*#__PURE__*/ _jsx(_Fragment, {}),
|
|
487
|
+
/*#__PURE__*/ _jsx("div", {
|
|
488
|
+
className: styles.aggregateMenuDrawerAllMenu,
|
|
489
|
+
style: {
|
|
490
|
+
height: latelys.length ? "calc(100% - 164px)" : "calc(100% - 52px)"
|
|
491
|
+
},
|
|
492
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
493
|
+
className: styles.aggregateMenuDrawerAllMenuColumn,
|
|
494
|
+
children: filterList.map(function(item) {
|
|
495
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
496
|
+
className: styles.aggregateMenuDrawerAllMenuColumnItem,
|
|
497
|
+
children: [
|
|
498
|
+
/*#__PURE__*/ _jsx("div", {
|
|
499
|
+
className: styles.aggregateMenuDrawerAllAppTitle,
|
|
500
|
+
children: item.app.name
|
|
501
|
+
}),
|
|
502
|
+
item.menu.map(function(menuItem) {
|
|
503
|
+
return menuItem.kind === AppMenuKind.Menu ? menuItemRender(menuItem) : /*#__PURE__*/ _jsx("div", {
|
|
504
|
+
className: styles.aggregateMenuDrawerAllMenuItemDir,
|
|
505
|
+
children: menuItem.name
|
|
506
|
+
}, "".concat(menuItem.appID, "-").concat(menuItem.id));
|
|
507
|
+
})
|
|
508
|
+
]
|
|
509
|
+
}, item.app.code);
|
|
510
|
+
})
|
|
511
|
+
})
|
|
512
|
+
})
|
|
513
|
+
]
|
|
514
|
+
})
|
|
515
|
+
]
|
|
516
|
+
})
|
|
517
|
+
}))
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
//# sourceMappingURL=D:\codeing\git\github\knockout-js\packages\layout\esm\components\aggregate-menu\index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["D:\\codeing\\git\\github\\knockout-js\\packages\\layout\\src\\components\\aggregate-menu\\index.tsx"],"sourcesContent":["import { CloseOutlined, DragOutlined, SearchOutlined, StarOutlined } from \"@ant-design/icons\"\r\nimport { useCallback, useEffect, useState } from \"react\"\r\nimport styles from \"./index.module.css\"\r\nimport { Drawer, DrawerProps, Empty, Input, Space } from \"antd\";\r\nimport { gql, mutation, paging, query } from \"@knockout-js/ice-urql/request\";\r\nimport { App, AppMenu, AppMenuKind, LayoutPkgSaveUserPreferenceMutation, LayoutPkgSaveUserPreferenceMutationVariables, LayoutPkgUserMenuListQuery, LayoutPkgUserMenuListQueryVariables, LayoutPkgUserPreferenceQuery, LayoutPkgUserPreferenceQueryVariables, LayoutPkgUserAppListQuery, LayoutPkgUserAppListQueryVariables } from \"@knockout-js/api\";\r\nimport { iceUrqlInstance } from \"..\";\r\nimport { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors, } from \"@dnd-kit/core\";\r\nimport { arrayMove, SortableContext, useSortable, sortableKeyboardCoordinates, verticalListSortingStrategy } from \"@dnd-kit/sortable\";\r\nimport { CSS } from '@dnd-kit/utilities';\r\nimport { useLocale } from \"../locale\";\r\nimport { useDark } from \"../provider\";\r\nimport { listFormatTreeData, treeFormatList } from \"../_util\";\r\nimport { OpenWin } from \"../icons\";\r\n\r\nconst userMenuListQuery = gql(/* GraphQL */`query layoutPkgUserMenuList($appCode:String!){\r\n userMenus(appCode: $appCode){\r\n id,name,route,appID,parentID,displaySort,kind\r\n }\r\n}`);\r\n\r\nconst userAppsQuery = gql(/* GraphQL */`query layoutPkgUserAppList{\r\n userApps{\r\n id,name,code\r\n }\r\n}`);\r\n\r\nconst userPreferenceQuery = gql(/* GraphQL */`query layoutPkgUserPreference{\r\n orgUserPreference{\r\n id,menuFavorite,menuRecent,\r\n }\r\n}`);\r\n\r\nconst userPreferenceMut = gql(/* GraphQL */`mutation layoutPkgSaveUserPreference($input:OrgUserPreferenceInput!){\r\n saveOrgUserPreference(input: $input){ id }\r\n}`);\r\n\r\nexport type AggregateMenuLocale = {\r\n title: string;\r\n latelyTitle: string;\r\n notText: string;\r\n searchPlaceholder: string;\r\n}\r\n\r\nexport type AggregateMenuDataSource = {\r\n app: App;\r\n menu: AppMenu[];\r\n}[]\r\n\r\nexport interface AggregateMenuProps {\r\n /**\r\n * 弹出开关\r\n */\r\n open?: boolean;\r\n /**\r\n * 数据源\r\n */\r\n dataSource?: AggregateMenuDataSource;\r\n /**\r\n * 弹框设置\r\n */\r\n drawerProps?: DrawerProps;\r\n /**\r\n * 弹出开关变更\r\n */\r\n onChangeOpen?: (open: boolean) => void;\r\n /**\r\n * 选中菜单\r\n */\r\n onClick?: (menuItem: AppMenu, app: App, isOpen?: boolean) => void;\r\n}\r\n\r\n/**\r\n * 排序拖拽使用的控件\r\n * https://docs.dndkit.com/\r\n * @param props\r\n * @returns\r\n */\r\nconst DargItem = (props: {\r\n value: AppMenu;\r\n onDel: () => void;\r\n onClick: (isOpen?: boolean) => void;\r\n}) => {\r\n const id = `${props.value.id}-${props.value.appID}`;\r\n const { setNodeRef, listeners, attributes, transform, transition } = useSortable({ id });\r\n const style = {\r\n transform: CSS.Transform.toString(transform),\r\n transition,\r\n };\r\n\r\n return <div\r\n ref={setNodeRef}\r\n style={style}\r\n {...attributes}\r\n className={styles.aggregateMenuDrawerMenuItem}\r\n onClick={() => {\r\n props.onClick();\r\n }}\r\n >\r\n <div className={styles.aggregateMenuDrawerMenuItemName}>{props.value.name}</div>\r\n <div className={styles.aggregateMenuDrawerMenuItemIcons}>\r\n <Space>\r\n <OpenWin className=\"anticon\" onClick={(event) => {\r\n event.stopPropagation();\r\n props.onClick(true);\r\n }} />\r\n <CloseOutlined rev={undefined} onClick={(event) => {\r\n event.stopPropagation();\r\n props.onDel();\r\n }} />\r\n <DragOutlined rev={undefined} {...listeners} className=\"dragIcon\" />\r\n </Space>\r\n </div>\r\n </div>\r\n}\r\n\r\nexport default (props: AggregateMenuProps) => {\r\n const [all, setAll] = useState<AggregateMenuDataSource>([]),\r\n [filterList, setFilterList] = useState<AggregateMenuDataSource>([]),\r\n [collects, setCollects] = useState<AppMenu[]>([]),\r\n [latelys, setLately] = useState<AppMenu[]>([]),\r\n locale = useLocale('AggregateMenu'),\r\n isDark = useDark(),\r\n sensors = useSensors(\r\n useSensor(PointerSensor),\r\n useSensor(KeyboardSensor, {\r\n coordinateGetter: sortableKeyboardCoordinates,\r\n })\r\n );\r\n\r\n const\r\n request = useCallback(async () => {\r\n const appsResult = await paging<LayoutPkgUserAppListQuery, LayoutPkgUserAppListQueryVariables>(userAppsQuery, {}, 1, {\r\n instanceName: iceUrqlInstance.ucenter\r\n }), apps: App[] = [];\r\n if (appsResult.data?.userApps) {\r\n appsResult.data.userApps.forEach(app => {\r\n apps.push(app as App)\r\n })\r\n }\r\n const newAll: AggregateMenuDataSource = [];\r\n for (let i in apps) {\r\n const menuResult = await query<LayoutPkgUserMenuListQuery, LayoutPkgUserMenuListQueryVariables>(userMenuListQuery, {\r\n appCode: apps[i].code,\r\n }, { instanceName: iceUrqlInstance.ucenter });\r\n if (menuResult.data?.userMenus) {\r\n const menu = menuResult.data.userMenus.sort((d1, d2) => {\r\n const d1Sort = d1.displaySort || 0, d2Sort = d2.displaySort || 0;\r\n return d1.parentID < d2.parentID ? -1 : d1.parentID > d2.parentID ? 1 : d1Sort < d2Sort ? -1 : d1Sort > d2Sort ? 1 : 0;\r\n }) as AppMenu[];\r\n newAll.push({\r\n app: apps[i],\r\n menu: treeFormatList(listFormatTreeData(menu, undefined, { key: 'id', parentId: 'parentID' })),\r\n })\r\n }\r\n }\r\n setAll(newAll);\r\n setFilterList(newAll);\r\n // 初始化收藏和初始化最近数据\r\n const preferenceResult = await query<LayoutPkgUserPreferenceQuery, LayoutPkgUserPreferenceQueryVariables>(userPreferenceQuery, {}, { instanceName: iceUrqlInstance.ucenter });\r\n if (preferenceResult.data?.orgUserPreference?.id) {\r\n const menuFavorite = preferenceResult.data.orgUserPreference.menuFavorite,\r\n menuRecent = preferenceResult.data.orgUserPreference.menuRecent,\r\n collectsList: AppMenu[] = [],\r\n latelyList: AppMenu[] = [];\r\n if (menuFavorite) {\r\n menuFavorite.forEach(id => {\r\n for (let i in newAll) {\r\n const menuItem = newAll[i].menu.find(item => item.id == id);\r\n if (menuItem) {\r\n collectsList.push(menuItem);\r\n break;\r\n }\r\n }\r\n\r\n })\r\n }\r\n if (menuRecent) {\r\n menuRecent.forEach(id => {\r\n for (let i in newAll) {\r\n const menuItem = newAll[i].menu.find(item => item.id == id);\r\n if (menuItem) {\r\n latelyList.push(menuItem);\r\n break;\r\n }\r\n }\r\n\r\n })\r\n }\r\n setCollects(collectsList);\r\n setLately(latelyList);\r\n }\r\n }, []),\r\n requestFavorite = async (list: AppMenu[]) => {\r\n // 异步存储收藏\r\n await mutation<LayoutPkgSaveUserPreferenceMutation, LayoutPkgSaveUserPreferenceMutationVariables>(userPreferenceMut, {\r\n input: {\r\n menuFavorite: list.map(item => item.id),\r\n }\r\n }, {\r\n instanceName: iceUrqlInstance.ucenter\r\n });\r\n },\r\n requestRecent = async (ids: string[]) => {\r\n // 异步存储访问菜单记录\r\n await mutation<LayoutPkgSaveUserPreferenceMutation, LayoutPkgSaveUserPreferenceMutationVariables>(userPreferenceMut, {\r\n input: {\r\n menuRecent: ids,\r\n }\r\n }, {\r\n instanceName: iceUrqlInstance.ucenter\r\n });\r\n },\r\n checkCollect = useCallback((menuItem: AppMenu) => {\r\n return !!collects.find(item => item.id === menuItem.id && item.appID === menuItem.appID);\r\n }, [collects]),\r\n onClickItem = async (menuItem: AppMenu, isOpen?: boolean) => {\r\n const allApp = all.find(allItem => allItem.app.id == menuItem.appID);\r\n if (allApp) {\r\n const latelyList = [...latelys];\r\n const oldIdx = latelyList.findIndex(lately => lately.id == menuItem.id);\r\n if (oldIdx > -1) {\r\n latelyList.splice(oldIdx, 1);\r\n }\r\n latelyList.unshift(menuItem);\r\n latelyList.splice(6);\r\n await requestRecent(latelyList.map(item => item.id));\r\n setLately(latelyList);\r\n props.onClick?.(menuItem, allApp.app, isOpen);\r\n }\r\n },\r\n menuItemRender = (menuItem: AppMenu) => {\r\n return <div\r\n key={`${menuItem.id}-${menuItem.appID}`}\r\n className={styles.aggregateMenuDrawerAllMenuItem}\r\n onClick={() => {\r\n onClickItem(menuItem)\r\n }}\r\n >\r\n <div className={styles.aggregateMenuDrawerAllMenuItemName}> {menuItem.name}</div>\r\n <div className={styles.aggregateMenuDrawerAllMenuItemIcons}>\r\n <Space>\r\n <OpenWin className=\"anticon\" onClick={(event) => {\r\n event.stopPropagation();\r\n onClickItem(menuItem, true)\r\n }} />\r\n <StarOutlined rev={undefined} className={checkCollect(menuItem) ? 'collect' : ''} onClick={async (event) => {\r\n event.stopPropagation();\r\n let collectList: AppMenu[] = [];\r\n if (checkCollect(menuItem)) {\r\n collectList = collects.filter(c => !(c.id === menuItem.id && c.appID === menuItem.appID))\r\n } else {\r\n collectList = [...collects, menuItem]\r\n }\r\n await requestFavorite(collectList)\r\n setCollects(collectList);\r\n }} />\r\n </Space>\r\n </div>\r\n </div>\r\n }\r\n\r\n useEffect(() => {\r\n if (props.dataSource) {\r\n setAll(props.dataSource);\r\n setFilterList(props.dataSource);\r\n } else {\r\n request();\r\n }\r\n }, [props.dataSource]);\r\n\r\n return <>\r\n <Drawer\r\n title={locale.title}\r\n maskClosable={false}\r\n placement=\"left\"\r\n width={1060}\r\n {...props.drawerProps}\r\n className={`${styles.aggregateMenuDrawer} ${isDark ? styles.aggregateMenuDark : ''}`}\r\n open={props.open}\r\n onClose={() => {\r\n props.onChangeOpen?.(false);\r\n }}\r\n >\r\n <div className={styles.aggregateMenuDrawerRow}>\r\n <div style={{ width: 240 }} className={styles.aggregateMenuDrawerMenu}>\r\n {/* 收藏 */}\r\n {collects.length ?\r\n <DndContext sensors={sensors}\r\n collisionDetection={closestCenter}\r\n onDragEnd={(event) => {\r\n const { active, over } = event;\r\n if (over && active.id !== over.id) {\r\n setCollects((items) => {\r\n const oldIndex = items.findIndex(oItem => `${oItem.id}-${oItem.appID}` == active.id);\r\n const newIndex = items.findIndex(nItem => `${nItem.id}-${nItem.appID}` == over.id);\r\n const collectList = arrayMove(items, oldIndex, newIndex);\r\n requestFavorite(collectList);\r\n return collectList;\r\n });\r\n }\r\n }}\r\n >\r\n <SortableContext items={collects.map(item => `${item.id}-${item.appID}`)} strategy={verticalListSortingStrategy}>\r\n {\r\n collects.map(item => (<DargItem\r\n key={`c${item.id}-${item.appID}`}\r\n value={item}\r\n onDel={async () => {\r\n const collectList = collects.filter(c => !(c.id === item.id && c.appID === item.appID))\r\n await requestFavorite(collectList);\r\n setCollects(collectList);\r\n }}\r\n onClick={(isOpen) => {\r\n onClickItem(item, isOpen)\r\n }}\r\n />))\r\n }\r\n </SortableContext>\r\n </DndContext>\r\n : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={locale.notText} />\r\n }\r\n </div>\r\n <div style={{ width: 820 }}>\r\n {/* 过滤 */}\r\n <div className={styles.aggregateMenuDrawerAllInput}>\r\n <Input\r\n bordered={false}\r\n prefix={<SearchOutlined rev={undefined} />}\r\n placeholder={locale.searchPlaceholder}\r\n onChange={(event) => {\r\n const keyword = event.target.value;\r\n if (keyword) {\r\n const fList = all.map(f => {\r\n return {\r\n app: f.app,\r\n menu: f.menu.filter(fMenuItem => fMenuItem.name.indexOf(keyword) > -1),\r\n };\r\n }).filter(f => f.menu.length);\r\n setFilterList(fList);\r\n } else {\r\n setFilterList([...all]);\r\n }\r\n }}\r\n />\r\n </div>\r\n {/* 最近访问 */}\r\n {latelys.length ?\r\n <div className={styles.aggregateMenuLatelys}>\r\n <div className={styles.aggregateMenuDrawerAllMenuItemDir}>{locale.latelyTitle}</div>\r\n <div className={styles.aggregateMenuLatelysColumn}>\r\n {latelys.map(menuItem => (\r\n menuItemRender(menuItem)\r\n ))}\r\n </div>\r\n </div> : <></>\r\n }\r\n {/* all应用菜单 */}\r\n <div className={styles.aggregateMenuDrawerAllMenu} style={{ height: latelys.length ? \"calc(100% - 164px)\" : \"calc(100% - 52px)\" }}>\r\n <div className={styles.aggregateMenuDrawerAllMenuColumn}>\r\n {filterList.map(item => (\r\n <div key={item.app.code} className={styles.aggregateMenuDrawerAllMenuColumnItem}>\r\n <div className={styles.aggregateMenuDrawerAllAppTitle}>{item.app.name}</div>\r\n {item.menu.map(menuItem => (menuItem.kind === AppMenuKind.Menu ?\r\n menuItemRender(menuItem)\r\n : <div\r\n key={`${menuItem.appID}-${menuItem.id}`}\r\n className={styles.aggregateMenuDrawerAllMenuItemDir}\r\n >\r\n {menuItem.name}\r\n </div>\r\n ))}\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </Drawer>\r\n </>\r\n}\r\n"],"names":["CloseOutlined","DragOutlined","SearchOutlined","StarOutlined","useCallback","useEffect","useState","styles","Drawer","Empty","Input","Space","gql","mutation","paging","query","AppMenuKind","iceUrqlInstance","DndContext","closestCenter","KeyboardSensor","PointerSensor","useSensor","useSensors","arrayMove","SortableContext","useSortable","sortableKeyboardCoordinates","verticalListSortingStrategy","CSS","useLocale","useDark","listFormatTreeData","treeFormatList","OpenWin","userMenuListQuery","userAppsQuery","userPreferenceQuery","userPreferenceMut","DargItem","props","id","value","appID","setNodeRef","listeners","attributes","transform","transition","style","Transform","toString","div","ref","className","aggregateMenuDrawerMenuItem","onClick","aggregateMenuDrawerMenuItemName","name","aggregateMenuDrawerMenuItemIcons","event","stopPropagation","rev","undefined","onDel","all","setAll","filterList","setFilterList","collects","setCollects","latelys","setLately","locale","isDark","sensors","coordinateGetter","request","appsResult","preferenceResult","apps","newAll","i","menuResult","menu","menuFavorite","menuRecent","collectsList","latelyList","instanceName","ucenter","data","userApps","forEach","app","push","appCode","code","userMenus","sort","d1","d2","d1Sort","displaySort","d2Sort","parentID","key","parentId","orgUserPreference","menuItem","find","item","requestFavorite","list","input","map","requestRecent","ids","checkCollect","onClickItem","isOpen","allApp","oldIdx","allItem","findIndex","lately","splice","unshift","menuItemRender","aggregateMenuDrawerAllMenuItem","aggregateMenuDrawerAllMenuItemName","aggregateMenuDrawerAllMenuItemIcons","collectList","filter","c","dataSource","title","maskClosable","placement","width","drawerProps","aggregateMenuDrawer","aggregateMenuDark","open","onClose","onChangeOpen","aggregateMenuDrawerRow","aggregateMenuDrawerMenu","length","collisionDetection","onDragEnd","active","over","items","oldIndex","oItem","newIndex","nItem","strategy","image","PRESENTED_IMAGE_SIMPLE","description","notText","aggregateMenuDrawerAllInput","bordered","prefix","placeholder","searchPlaceholder","onChange","keyword","target","fList","f","fMenuItem","indexOf","aggregateMenuLatelys","aggregateMenuDrawerAllMenuItemDir","latelyTitle","aggregateMenuLatelysColumn","aggregateMenuDrawerAllMenu","height","aggregateMenuDrawerAllMenuColumn","aggregateMenuDrawerAllMenuColumnItem","aggregateMenuDrawerAllAppTitle","kind","Menu"],"mappings":";;;;;;;AAAA,SAASA,aAAa,EAAEC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,oBAAmB;AAC7F,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AACxD,OAAOC,YAAY,qBAAoB;AACvC,SAASC,MAAM,EAAeC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,OAAO;AAChE,SAASC,GAAG,EAAEC,QAAQ,EAAEC,MAAM,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