@next-bricks/nav 1.24.1 → 1.24.3
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/bricks.json +33 -33
- package/dist/chunks/2133.db894d06.js +2 -0
- package/dist/chunks/2133.db894d06.js.map +1 -0
- package/dist/chunks/9149.0f9ad72a.js +2 -0
- package/dist/chunks/9149.0f9ad72a.js.map +1 -0
- package/dist/chunks/{main.0b287098.js → main.136dc148.js} +2 -2
- package/dist/chunks/{main.0b287098.js.map → main.136dc148.js.map} +1 -1
- package/dist/examples.json +10 -10
- package/dist/{index.5f3e496a.js → index.a4d57852.js} +2 -2
- package/dist/{index.5f3e496a.js.map → index.a4d57852.js.map} +1 -1
- package/dist/manifest.json +118 -118
- package/dist/types.json +91 -91
- package/package.json +2 -2
- package/dist/chunks/2133.8c2de8bf.js +0 -2
- package/dist/chunks/2133.8c2de8bf.js.map +0 -1
- package/dist/chunks/9149.8d0c56b4.js +0 -2
- package/dist/chunks/9149.8d0c56b4.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -96,6 +96,35 @@
|
|
|
96
96
|
"description": "构件 `nav.easyops-navbar-alerts`",
|
|
97
97
|
"insider": true
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"name": "eo-launchpad-button-v2",
|
|
101
|
+
"properties": [],
|
|
102
|
+
"events": [],
|
|
103
|
+
"slots": [],
|
|
104
|
+
"methods": [],
|
|
105
|
+
"parts": [],
|
|
106
|
+
"description": "构件 `eo-launchpad-button-v2`",
|
|
107
|
+
"insider": true
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "eo-launchpad-quick-access",
|
|
111
|
+
"properties": [
|
|
112
|
+
{
|
|
113
|
+
"name": "readonly",
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "target",
|
|
118
|
+
"type": "Target"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"events": [],
|
|
122
|
+
"slots": [],
|
|
123
|
+
"methods": [],
|
|
124
|
+
"parts": [],
|
|
125
|
+
"description": "快捷访问",
|
|
126
|
+
"insider": true
|
|
127
|
+
},
|
|
99
128
|
{
|
|
100
129
|
"name": "eo-search-launchpad",
|
|
101
130
|
"properties": [
|
|
@@ -129,51 +158,14 @@
|
|
|
129
158
|
"insider": true
|
|
130
159
|
},
|
|
131
160
|
{
|
|
132
|
-
"name": "eo-
|
|
133
|
-
"
|
|
134
|
-
"basic.app-bar-wrapper"
|
|
135
|
-
],
|
|
136
|
-
"properties": [
|
|
137
|
-
{
|
|
138
|
-
"name": "isFixed",
|
|
139
|
-
"description": "是否固定定位。",
|
|
140
|
-
"deprecated": "使用 `position` 属性代替",
|
|
141
|
-
"default": "true",
|
|
142
|
-
"type": "boolean"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"name": "position",
|
|
146
|
-
"description": "设置定位方式:静态定位或固定定位。\n\n设置时优先级高于 `isFixed`。",
|
|
147
|
-
"default": "\"fixed\"",
|
|
148
|
-
"type": "\"static\" | \"fixed\""
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "displayCenter",
|
|
152
|
-
"description": "居中显示",
|
|
153
|
-
"default": "false",
|
|
154
|
-
"type": "boolean"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"name": "extraAppBarContentStyle",
|
|
158
|
-
"description": "自定义样式",
|
|
159
|
-
"attribute": false,
|
|
160
|
-
"type": "React.CSSProperties"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
161
|
+
"name": "eo-launchpad-button",
|
|
162
|
+
"properties": [],
|
|
163
163
|
"events": [],
|
|
164
|
-
"slots": [
|
|
165
|
-
{
|
|
166
|
-
"name": "left",
|
|
167
|
-
"description": "左侧内容区"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"name": "right",
|
|
171
|
-
"description": "右侧内容区"
|
|
172
|
-
}
|
|
173
|
-
],
|
|
164
|
+
"slots": [],
|
|
174
165
|
"methods": [],
|
|
175
166
|
"parts": [],
|
|
176
|
-
"description": "
|
|
167
|
+
"description": "Launchpad 按钮构件",
|
|
168
|
+
"insider": true
|
|
177
169
|
},
|
|
178
170
|
{
|
|
179
171
|
"name": "eo-frame-breadcrumb",
|
|
@@ -203,52 +195,51 @@
|
|
|
203
195
|
"description": "面包屑"
|
|
204
196
|
},
|
|
205
197
|
{
|
|
206
|
-
"name": "eo-
|
|
198
|
+
"name": "eo-app-bar-wrapper",
|
|
199
|
+
"alias": [
|
|
200
|
+
"basic.app-bar-wrapper"
|
|
201
|
+
],
|
|
207
202
|
"properties": [
|
|
208
203
|
{
|
|
209
|
-
"name": "
|
|
210
|
-
"description": "
|
|
211
|
-
"
|
|
212
|
-
"
|
|
204
|
+
"name": "isFixed",
|
|
205
|
+
"description": "是否固定定位。",
|
|
206
|
+
"deprecated": "使用 `position` 属性代替",
|
|
207
|
+
"default": "true",
|
|
208
|
+
"type": "boolean"
|
|
213
209
|
},
|
|
214
210
|
{
|
|
215
|
-
"name": "
|
|
216
|
-
"description": "
|
|
217
|
-
"
|
|
211
|
+
"name": "position",
|
|
212
|
+
"description": "设置定位方式:静态定位或固定定位。\n\n设置时优先级高于 `isFixed`。",
|
|
213
|
+
"default": "\"fixed\"",
|
|
214
|
+
"type": "\"static\" | \"fixed\""
|
|
218
215
|
},
|
|
219
216
|
{
|
|
220
|
-
"name": "
|
|
221
|
-
"description": "
|
|
222
|
-
"
|
|
217
|
+
"name": "displayCenter",
|
|
218
|
+
"description": "居中显示",
|
|
219
|
+
"default": "false",
|
|
220
|
+
"type": "boolean"
|
|
223
221
|
},
|
|
224
222
|
{
|
|
225
|
-
"name": "
|
|
226
|
-
"description": "
|
|
223
|
+
"name": "extraAppBarContentStyle",
|
|
224
|
+
"description": "自定义样式",
|
|
227
225
|
"attribute": false,
|
|
228
|
-
"type": "
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
"type": "boolean"
|
|
234
|
-
},
|
|
226
|
+
"type": "React.CSSProperties"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"events": [],
|
|
230
|
+
"slots": [
|
|
235
231
|
{
|
|
236
|
-
"name": "
|
|
237
|
-
"description": "
|
|
238
|
-
"type": "boolean"
|
|
232
|
+
"name": "left",
|
|
233
|
+
"description": "左侧内容区"
|
|
239
234
|
},
|
|
240
235
|
{
|
|
241
|
-
"name": "
|
|
242
|
-
"description": "
|
|
243
|
-
"type": "boolean"
|
|
236
|
+
"name": "right",
|
|
237
|
+
"description": "右侧内容区"
|
|
244
238
|
}
|
|
245
239
|
],
|
|
246
|
-
"events": [],
|
|
247
|
-
"slots": [],
|
|
248
240
|
"methods": [],
|
|
249
241
|
"parts": [],
|
|
250
|
-
"description": "
|
|
251
|
-
"category": "navigation"
|
|
242
|
+
"description": "应用顶部容器"
|
|
252
243
|
},
|
|
253
244
|
{
|
|
254
245
|
"name": "eo-sidebar-menu-group",
|
|
@@ -286,16 +277,6 @@
|
|
|
286
277
|
"description": "侧栏菜单分组",
|
|
287
278
|
"category": "navigation"
|
|
288
279
|
},
|
|
289
|
-
{
|
|
290
|
-
"name": "eo-launchpad-button",
|
|
291
|
-
"properties": [],
|
|
292
|
-
"events": [],
|
|
293
|
-
"slots": [],
|
|
294
|
-
"methods": [],
|
|
295
|
-
"parts": [],
|
|
296
|
-
"description": "Launchpad 按钮构件",
|
|
297
|
-
"insider": true
|
|
298
|
-
},
|
|
299
280
|
{
|
|
300
281
|
"name": "eo-sidebar-menu-submenu",
|
|
301
282
|
"properties": [
|
|
@@ -334,8 +315,40 @@
|
|
|
334
315
|
"category": "navigation"
|
|
335
316
|
},
|
|
336
317
|
{
|
|
337
|
-
"name": "eo-sidebar-menu",
|
|
318
|
+
"name": "eo-sidebar-menu-item",
|
|
338
319
|
"properties": [
|
|
320
|
+
{
|
|
321
|
+
"name": "url",
|
|
322
|
+
"description": "菜单项对应的系统内地址",
|
|
323
|
+
"attribute": false,
|
|
324
|
+
"type": "LinkProps[\"url\"]"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "href",
|
|
328
|
+
"description": "菜单项对应的外部链接地址",
|
|
329
|
+
"type": "LinkProps[\"href\"]"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "target",
|
|
333
|
+
"description": "菜单项链接打开的目标",
|
|
334
|
+
"type": "LinkProps[\"target\"]"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "icon",
|
|
338
|
+
"description": "菜单项的图标",
|
|
339
|
+
"attribute": false,
|
|
340
|
+
"type": "GeneralIconProps"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "selected",
|
|
344
|
+
"description": "是否选中",
|
|
345
|
+
"type": "boolean"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "inSubmenu",
|
|
349
|
+
"description": "是否在二级菜单中",
|
|
350
|
+
"type": "boolean"
|
|
351
|
+
},
|
|
339
352
|
{
|
|
340
353
|
"name": "menuCollapsed",
|
|
341
354
|
"description": "菜单整体是否收起状态",
|
|
@@ -346,18 +359,24 @@
|
|
|
346
359
|
"slots": [],
|
|
347
360
|
"methods": [],
|
|
348
361
|
"parts": [],
|
|
349
|
-
"description": "
|
|
362
|
+
"description": "侧栏菜单项",
|
|
350
363
|
"category": "navigation"
|
|
351
364
|
},
|
|
352
365
|
{
|
|
353
|
-
"name": "eo-
|
|
354
|
-
"properties": [
|
|
366
|
+
"name": "eo-sidebar-menu",
|
|
367
|
+
"properties": [
|
|
368
|
+
{
|
|
369
|
+
"name": "menuCollapsed",
|
|
370
|
+
"description": "菜单整体是否收起状态",
|
|
371
|
+
"type": "boolean"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
355
374
|
"events": [],
|
|
356
375
|
"slots": [],
|
|
357
376
|
"methods": [],
|
|
358
377
|
"parts": [],
|
|
359
|
-
"description": "
|
|
360
|
-
"
|
|
378
|
+
"description": "侧栏菜单",
|
|
379
|
+
"category": "navigation"
|
|
361
380
|
},
|
|
362
381
|
{
|
|
363
382
|
"name": "eo-sidebar",
|
|
@@ -426,25 +445,6 @@
|
|
|
426
445
|
"description": "构件 `eo-sidebar-sub-menu`",
|
|
427
446
|
"category": "navigation"
|
|
428
447
|
},
|
|
429
|
-
{
|
|
430
|
-
"name": "eo-launchpad-quick-access",
|
|
431
|
-
"properties": [
|
|
432
|
-
{
|
|
433
|
-
"name": "readonly",
|
|
434
|
-
"type": "boolean"
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"name": "target",
|
|
438
|
-
"type": "Target"
|
|
439
|
-
}
|
|
440
|
-
],
|
|
441
|
-
"events": [],
|
|
442
|
-
"slots": [],
|
|
443
|
-
"methods": [],
|
|
444
|
-
"parts": [],
|
|
445
|
-
"description": "快捷访问",
|
|
446
|
-
"insider": true
|
|
447
|
-
},
|
|
448
448
|
{
|
|
449
449
|
"name": "eo-directory",
|
|
450
450
|
"properties": [
|
|
@@ -644,6 +644,15 @@
|
|
|
644
644
|
"parts": [],
|
|
645
645
|
"description": "目录树叶子节点"
|
|
646
646
|
},
|
|
647
|
+
{
|
|
648
|
+
"name": "nav.nav-logo",
|
|
649
|
+
"properties": [],
|
|
650
|
+
"events": [],
|
|
651
|
+
"slots": [],
|
|
652
|
+
"methods": [],
|
|
653
|
+
"parts": [],
|
|
654
|
+
"description": "导航栏图标"
|
|
655
|
+
},
|
|
647
656
|
{
|
|
648
657
|
"name": "eo-directory-tree-internal-node",
|
|
649
658
|
"properties": [
|
|
@@ -701,13 +710,13 @@
|
|
|
701
710
|
"description": "目录树节点节点"
|
|
702
711
|
},
|
|
703
712
|
{
|
|
704
|
-
"name": "nav.
|
|
713
|
+
"name": "nav.query-search",
|
|
705
714
|
"properties": [],
|
|
706
715
|
"events": [],
|
|
707
716
|
"slots": [],
|
|
708
717
|
"methods": [],
|
|
709
718
|
"parts": [],
|
|
710
|
-
"description": "
|
|
719
|
+
"description": "构件 `nav.query-search`"
|
|
711
720
|
},
|
|
712
721
|
{
|
|
713
722
|
"name": "nav.poll-announce",
|
|
@@ -744,15 +753,6 @@
|
|
|
744
753
|
"methods": [],
|
|
745
754
|
"parts": [],
|
|
746
755
|
"description": "轮询获取通知消息并展示。\n\n 从 v2 构件 `nav-legacy.poll-announce` 迁移而来"
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
"name": "nav.query-search",
|
|
750
|
-
"properties": [],
|
|
751
|
-
"events": [],
|
|
752
|
-
"slots": [],
|
|
753
|
-
"methods": [],
|
|
754
|
-
"parts": [],
|
|
755
|
-
"description": "构件 `nav.query-search`"
|
|
756
756
|
}
|
|
757
757
|
],
|
|
758
758
|
"providers": [
|
package/dist/types.json
CHANGED
|
@@ -4,59 +4,6 @@
|
|
|
4
4
|
"events": [],
|
|
5
5
|
"methods": []
|
|
6
6
|
},
|
|
7
|
-
"eo-app-bar-wrapper": {
|
|
8
|
-
"properties": [
|
|
9
|
-
{
|
|
10
|
-
"name": "isFixed",
|
|
11
|
-
"annotation": {
|
|
12
|
-
"type": "keyword",
|
|
13
|
-
"value": "boolean"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "position",
|
|
18
|
-
"annotation": {
|
|
19
|
-
"type": "union",
|
|
20
|
-
"types": [
|
|
21
|
-
{
|
|
22
|
-
"type": "jsLiteral",
|
|
23
|
-
"value": "static"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"type": "jsLiteral",
|
|
27
|
-
"value": "fixed"
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "displayCenter",
|
|
34
|
-
"annotation": {
|
|
35
|
-
"type": "keyword",
|
|
36
|
-
"value": "boolean"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "extraAppBarContentStyle",
|
|
41
|
-
"annotation": {
|
|
42
|
-
"type": "reference",
|
|
43
|
-
"typeName": {
|
|
44
|
-
"type": "qualifiedName",
|
|
45
|
-
"left": {
|
|
46
|
-
"type": "identifier",
|
|
47
|
-
"name": "React"
|
|
48
|
-
},
|
|
49
|
-
"right": {
|
|
50
|
-
"type": "identifier",
|
|
51
|
-
"name": "CSSProperties"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"events": [],
|
|
58
|
-
"methods": []
|
|
59
|
-
},
|
|
60
7
|
"eo-frame-breadcrumb": {
|
|
61
8
|
"properties": [
|
|
62
9
|
{
|
|
@@ -145,6 +92,59 @@
|
|
|
145
92
|
}
|
|
146
93
|
]
|
|
147
94
|
},
|
|
95
|
+
"eo-app-bar-wrapper": {
|
|
96
|
+
"properties": [
|
|
97
|
+
{
|
|
98
|
+
"name": "isFixed",
|
|
99
|
+
"annotation": {
|
|
100
|
+
"type": "keyword",
|
|
101
|
+
"value": "boolean"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "position",
|
|
106
|
+
"annotation": {
|
|
107
|
+
"type": "union",
|
|
108
|
+
"types": [
|
|
109
|
+
{
|
|
110
|
+
"type": "jsLiteral",
|
|
111
|
+
"value": "static"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "jsLiteral",
|
|
115
|
+
"value": "fixed"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "displayCenter",
|
|
122
|
+
"annotation": {
|
|
123
|
+
"type": "keyword",
|
|
124
|
+
"value": "boolean"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "extraAppBarContentStyle",
|
|
129
|
+
"annotation": {
|
|
130
|
+
"type": "reference",
|
|
131
|
+
"typeName": {
|
|
132
|
+
"type": "qualifiedName",
|
|
133
|
+
"left": {
|
|
134
|
+
"type": "identifier",
|
|
135
|
+
"name": "React"
|
|
136
|
+
},
|
|
137
|
+
"right": {
|
|
138
|
+
"type": "identifier",
|
|
139
|
+
"name": "CSSProperties"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"events": [],
|
|
146
|
+
"methods": []
|
|
147
|
+
},
|
|
148
148
|
"eo-sidebar-menu-item": {
|
|
149
149
|
"properties": [
|
|
150
150
|
{
|
|
@@ -564,6 +564,19 @@
|
|
|
564
564
|
"events": [],
|
|
565
565
|
"methods": []
|
|
566
566
|
},
|
|
567
|
+
"eo-search-launchpad": {
|
|
568
|
+
"properties": [
|
|
569
|
+
{
|
|
570
|
+
"name": "readonly",
|
|
571
|
+
"annotation": {
|
|
572
|
+
"type": "keyword",
|
|
573
|
+
"value": "boolean"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"events": [],
|
|
578
|
+
"methods": []
|
|
579
|
+
},
|
|
567
580
|
"eo-launchpad-recent-visits": {
|
|
568
581
|
"properties": [
|
|
569
582
|
{
|
|
@@ -1324,29 +1337,6 @@
|
|
|
1324
1337
|
}
|
|
1325
1338
|
]
|
|
1326
1339
|
},
|
|
1327
|
-
"eo-launchpad-quick-access": {
|
|
1328
|
-
"properties": [
|
|
1329
|
-
{
|
|
1330
|
-
"name": "readonly",
|
|
1331
|
-
"annotation": {
|
|
1332
|
-
"type": "keyword",
|
|
1333
|
-
"value": "boolean"
|
|
1334
|
-
}
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
"name": "target",
|
|
1338
|
-
"annotation": {
|
|
1339
|
-
"type": "reference",
|
|
1340
|
-
"typeName": {
|
|
1341
|
-
"type": "identifier",
|
|
1342
|
-
"name": "Target"
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
],
|
|
1347
|
-
"events": [],
|
|
1348
|
-
"methods": []
|
|
1349
|
-
},
|
|
1350
1340
|
"eo-directory-tree-leaf": {
|
|
1351
1341
|
"properties": [
|
|
1352
1342
|
{
|
|
@@ -1394,6 +1384,11 @@
|
|
|
1394
1384
|
],
|
|
1395
1385
|
"methods": []
|
|
1396
1386
|
},
|
|
1387
|
+
"nav.query-search": {
|
|
1388
|
+
"properties": [],
|
|
1389
|
+
"events": [],
|
|
1390
|
+
"methods": []
|
|
1391
|
+
},
|
|
1397
1392
|
"nav.poll-announce": {
|
|
1398
1393
|
"properties": [
|
|
1399
1394
|
{
|
|
@@ -1869,8 +1864,26 @@
|
|
|
1869
1864
|
}
|
|
1870
1865
|
]
|
|
1871
1866
|
},
|
|
1872
|
-
"
|
|
1873
|
-
"properties": [
|
|
1867
|
+
"eo-launchpad-quick-access": {
|
|
1868
|
+
"properties": [
|
|
1869
|
+
{
|
|
1870
|
+
"name": "readonly",
|
|
1871
|
+
"annotation": {
|
|
1872
|
+
"type": "keyword",
|
|
1873
|
+
"value": "boolean"
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "target",
|
|
1878
|
+
"annotation": {
|
|
1879
|
+
"type": "reference",
|
|
1880
|
+
"typeName": {
|
|
1881
|
+
"type": "identifier",
|
|
1882
|
+
"name": "Target"
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
],
|
|
1874
1887
|
"events": [],
|
|
1875
1888
|
"methods": []
|
|
1876
1889
|
},
|
|
@@ -2966,19 +2979,6 @@
|
|
|
2966
2979
|
"events": [],
|
|
2967
2980
|
"methods": []
|
|
2968
2981
|
},
|
|
2969
|
-
"eo-search-launchpad": {
|
|
2970
|
-
"properties": [
|
|
2971
|
-
{
|
|
2972
|
-
"name": "readonly",
|
|
2973
|
-
"annotation": {
|
|
2974
|
-
"type": "keyword",
|
|
2975
|
-
"value": "boolean"
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
],
|
|
2979
|
-
"events": [],
|
|
2980
|
-
"methods": []
|
|
2981
|
-
},
|
|
2982
2982
|
"eo-launchpad-button-v2": {
|
|
2983
2983
|
"properties": [],
|
|
2984
2984
|
"events": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/nav",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.3",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/nav",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@next-bricks/form": "*",
|
|
44
44
|
"@next-bricks/icons": "*"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "62fd81a2173efeca71ac1bf850917b5fb510e8fa"
|
|
47
47
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_nav=globalThis.webpackChunk_next_bricks_nav||[]).push([[2133],{403:(e,t,n)=>{n.d(t,{I:()=>i,K:()=>o,NS:()=>s,t:()=>r});var a=n(79);let o=function(e){return e.ALL="ALL",e.QUICK_ACCESS="QUICK_ACCESS",e.PLATFORM_BASE="PLATFORM_BASE",e.SCENARIO_CENTER="SCENARIO_CENTER",e.SOLUTIONS="SOLUTIONS",e.OPEN_PLATFORM="OPEN_PLATFORM",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.RECENT_VISITS="RECENT_VISITS",e.FAVORITE="FAVORITE",e.UNFAVORITE="UNFAVORITE",e.FAVORITES_LIMIT_REACHED="FAVORITES_LIMIT_REACHED",e.FAVORITES_LIMIT_MESSAGE="FAVORITES_LIMIT_MESSAGE",e}({});const s="bricks/nav/launchpad-button-v2",i={en:{ALL:"All",QUICK_ACCESS:"Quick Access",PLATFORM_BASE:"Platform Base",SCENARIO_CENTER:"Scenario Center",SOLUTIONS:"Solutions",OPEN_PLATFORM:"Open Platform",SEARCH_PLACEHOLDER:"Search by keyword",RECENT_VISITS:"Recent Visits",FAVORITE:"Favorite",UNFAVORITE:"Unfavorite",FAVORITES_LIMIT_REACHED:"Favorites Limit Reached",FAVORITES_LIMIT_MESSAGE:"Current favorites count has reached the limit ({{count}} items). Please remove some favorites before adding new ones."},zh:{ALL:"全部",QUICK_ACCESS:"快捷访问",PLATFORM_BASE:"平台底座",SCENARIO_CENTER:"场景中心",SOLUTIONS:"解决方案",OPEN_PLATFORM:"开放平台",SEARCH_PLACEHOLDER:"通过关键字搜索",RECENT_VISITS:"最近访问",FAVORITE:"收藏",UNFAVORITE:"取消收藏",FAVORITES_LIMIT_REACHED:"收藏数量已达上限",FAVORITES_LIMIT_MESSAGE:"当前收藏链接数量已达上限({{count}}个),请删除部分收藏后再添加。"}},r=a.i18n.getFixedT(null,s)},2133:(e,t,n)=>{n.d(t,{fm:()=>b,ir:()=>M,pU:()=>B,sZ:()=>H});var a=n(8769),o=n(3081),s=n(9384),i=n(7137),r=n(6934),c=n(4864),l=n(9393),u=n(403),p=n(3346),d=n(7296),m=n(2824),I=n(2887),f=n(8406),h=n(1030);const E=10,A=10;var S,y=n(6659);async function v(){return(await(0,d.K)({page:1,pageSize:E},{interceptorParams:{ignoreLoadingBar:!0},noAbortOnRouteChange:!0})).list}function C(e,t){return e.id.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)?e:null}function R(e,t){return e.id.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)?e:null}(0,r.initializeReactI18n)(u.NS,u.I),(0,r.initializeReactI18n)(u.NS,u.I);const T=`launchpad-recent-visits:${null===(S=s.auth.getAuth())||void 0===S?void 0:S.org}`,g=new i.G(localStorage);let _=[],L=new Map,O=new Map,F=!1,w=[],k=!1,N=[],P=!1;const M=new c.x((async()=>{({menuGroups:_,microAppsById:L,customLinksById:O}=await async function(){var e;const t=await(0,p.i)({},{interceptorParams:{ignoreLoadingBar:!0},noAbortOnRouteChange:!0}),n=new Map;for(const e of t.storyboards){var a;const t=e.app;t.localeName=(0,y.y)(t.locales,t.name),null!==(a=s.auth.isBlockedPath)&&void 0!==a&&a.call(s.auth,t.homepage)||n.set(t.id,t)}const o=[],i=new Map;for(const a of t.desktops){const t=[];for(const o of a.items)switch(o.localeName=(0,y.y)(o.locales,o.name),o.type){case"app":{const e=n.get(o.id);e&&t.push({...o,name:e.localeName,url:e.homepage,menuIcon:e.menuIcon});break}case"custom":null!==(e=s.auth.isBlockedHref)&&void 0!==e&&e.call(s.auth,o.url)||(t.push(o),i.set(o.id,o));break;case"dir":{const e=[];for(const t of o.items){var r;if("app"===t.type){const a=n.get(t.id);a&&e.push({...t,name:a.localeName,url:a.homepage,menuIcon:a.menuIcon})}else"custom"!==t.type||null!==(r=s.auth.isBlockedHref)&&void 0!==r&&r.call(s.auth,t.url)||(t.localeName=(0,y.y)(t.locales,t.name),e.push(t),i.set(t.id,t))}e.length>0&&t.push({...o,items:e});break}}t.length>0&&(a.localeName=(0,y.y)(a.locales,a.name),o.push({...a,items:t}))}return{menuGroups:o,microAppsById:n,customLinksById:i}}()),F=!0})),b=new c.x((async()=>{w=await async function(){const e=await v(),t=[];for(const n of e)if("microApp"===n.type){const e=n.relatedApp,a=(0,y.y)(e.locales,e.name);t.push({favoriteId:n.instanceId,type:"app",name:a,id:e.appId,url:e.homepage,instanceId:e.instanceId,menuIcon:e.menuIcon})}else if("customItem"===n.type){const e=n.relatedCustomItem,a=(0,y.y)(e.locales,e.name);t.push({favoriteId:n.instanceId,type:"custom",name:a,id:e.id,url:e.url,menuIcon:e.menuIcon})}else"link"===n.type&&t.push({favoriteId:n.instanceId,type:"link",name:n.name,url:n.link,menuIcon:n.icon});return t}(),k=!0})),B=new c.x((async()=>{N=await async function(){const e=(await(0,f.y)("MICRO_APP_CATEGORY@EASYOPS",{fields:["id","type","name","locales","icon","order","platformApps.appId","platformApps.name","platformApps.locales","platformApps.homepage","platformApps.description","platformApps.menuIcon","platformApps._object_id","platformApps.@.order","platformItems.id","platformItems.name","platformItems.locales","platformItems.url","platformItems.description","platformItems.menuIcon","platformItems._object_id","platformItems.@.order"],page:1,page_size:300,query:{type:"platform"}})).list,t=null==e?void 0:e.map((e=>{const t=e.platformApps.map((e=>{var t,n;return null!==(t=s.auth.isBlockedPath)&&void 0!==t&&t.call(s.auth,e.homepage)?null:{type:"app",name:(0,y.y)(e.locales,e.name),id:e.appId,url:e.homepage,menuIcon:e.menuIcon,description:e.description,instanceId:e.instanceId,order:null===(n=e["@"])||void 0===n?void 0:n.order}})).filter(Boolean),n=e.platformItems.map((e=>{var t,n;return null!==(t=s.auth.isBlockedHref)&&void 0!==t&&t.call(s.auth,e.url)?null:{type:"custom",name:(0,y.y)(e.locales,e.name),id:e.id,url:e.url,menuIcon:e.menuIcon,description:e.description,instanceId:e.instanceId,order:null===(n=e["@"])||void 0===n?void 0:n.order}})).filter(Boolean),a=(0,h.sortBy)([...t,...n],"order");return{instanceId:e.instanceId,id:e.id,name:(0,y.y)(e.locales,e.name),icon:e.icon,order:e.order,items:a}}));return[{id:"#all",name:(0,u.t)(u.K.ALL),icon:{lib:"easyops",category:"second-menu",icon:"sprint-planning-second-menu"},items:[]},...(0,h.sortBy)(t,"order")]}(),P=!0})),V=e=>(0,l.Ds)({type:"error",message:(0,o.httpErrorToString)(e)});function H(e){const{t}=(0,r.useTranslation)(u.NS),[n,s]=(0,a.useState)(_),[i,c]=(0,a.useState)(L),[p,d]=(0,a.useState)(O),[f,h]=(0,a.useState)(""),[S,y]=(0,a.useState)(!F),[H,D]=(0,a.useState)(!k),[x,G]=(0,a.useState)(!P),[K,Q]=(0,a.useState)([]),[j,z]=(0,a.useState)([]),[q,Y]=(0,a.useState)(w),[Z,$]=(0,a.useState)(N);(0,a.useEffect)((()=>{e&&!S&&(s(_),c(L),d(O))}),[e,S]),(0,a.useEffect)((()=>{e&&!H&&Y(w)}),[e,H]),(0,a.useEffect)((()=>{e&&!x&&$(N)}),[e,x]),(0,a.useEffect)((()=>{var t;e&&Q(null!==(t=g.getItem(T))&&void 0!==t?t:[])}),[e]),(0,a.useEffect)((()=>{e&&(async()=>{try{await M.fetch(),y(!1)}catch(e){(0,o.handleHttpError)(e)}})()}),[e]),(0,a.useEffect)((()=>{e&&(async()=>{try{await b.fetch(),D(!1)}catch(e){D(!1),V(e)}})()}),[e]),(0,a.useEffect)((()=>{var t;e&&null!==(t=(0,o.getRuntime)())&&void 0!==t&&t.getFeatureFlags()["launchpad-show-platform-category"]&&(async()=>{try{await B.fetch(),G(!1)}catch(e){G(!1),V(e)}})()}),[e]),(0,a.useEffect)((()=>{if(S)return;const e=K.map((e=>{if("app"===e.type){const t=i.get(e.id);return t?{type:"app",name:t.localeName,id:t.id,url:t.homepage,instanceId:t.instanceId,menuIcon:t.menuIcon}:null}const t=p.get(e.id);return t?{...t,name:t.localeName}:null})).filter(Boolean);z(e)}),[p,S,i,K]);const J=(0,a.useCallback)((e=>{var t;let{type:n,id:a}=e;const o=null!==(t=g.getItem(T))&&void 0!==t?t:[],s=o.findIndex((e=>e.type===n&&e.id===a));s>-1&&o.splice(s,1),o.unshift({type:n,id:a}),o.length>A&&o.pop(),g.setItem(T,o)}),[]),W=(0,a.useCallback)((e=>q.some((t=>U(e,t)))),[q]),X=(0,a.useCallback)((e=>{const n=q.findIndex((t=>"link"===e.type?t.favoriteId===e.favoriteId:U(e,t)));let a;if(n>-1){const e=q[n];a=q.slice(0,n).concat(q.slice(n+1)),async function(e){return e.favoriteId?(0,I.r)(e.favoriteId):v().then((t=>{var n;const a=null===(n=t.find((t=>{var n,a;return"app"===e.type?"microApp"===t.type&&(null===(n=t.relatedApp)||void 0===n?void 0:n.appId)===e.id:"custom"===e.type&&(null===(a=t.relatedCustomItem)||void 0===a?void 0:a.id)===e.id})))||void 0===n?void 0:n.instanceId;if(a)return(0,I.r)(a);console.error("Menu item to unstar not found:",e)}))}(e).catch(V)}else{if(q.length>=E)return void(0,l.ui)({type:"warn",title:t(u.K.FAVORITES_LIMIT_REACHED),content:t(u.K.FAVORITES_LIMIT_MESSAGE,{count:E})});const n={...e};a=q.concat(n),async function(e){return(0,m.k)({type:"app"===e.type?"microApp":"customItem",relatedInstanceId:e.instanceId},{interceptorParams:{ignoreLoadingBar:!0}})}(e).then((e=>{e&&(n.favoriteId=e.instanceId)}),V)}Y(a),w=a}),[q]),ee=(0,a.useMemo)((()=>function(e,t){if(!t)return e;const n=t.toLowerCase();return e.map((e=>({...e,items:e.items.map((e=>{switch(e.type){case"app":return C(e,n);case"custom":return R(e,n);case"dir":{const t=e.items.map((e=>"app"===e.type?C(e,n):"custom"===e.type?R(e,n):null)).filter(Boolean);return t.length>0?{...e,items:t}:null}}})).filter(Boolean)}))).filter((e=>e.items.length>0))}(n,f)),[n,f]),te=(0,a.useMemo)((()=>function(e,t){if(!t)return e;const n=t.toLowerCase();return e.map((e=>({...e,items:e.items.map((e=>{switch(e.type){case"app":return C(e,n);case"custom":return R(e,n)}})).filter(Boolean)})))}(Z,f)),[Z,f]);return{loading:S,q:f,setQ:h,menuGroups:ee,loadingFavorites:H,loadingPlatformCategories:x,favorites:q,recentVisits:j,pushRecentVisit:J,isStarred:W,toggleStar:X,platformCategories:te}}function U(e,t){return e.instanceId&&t.instanceId?t.instanceId===e.instanceId:t.type===e.type&&t.id===e.id}},4864:(e,t,n)=>{n.d(t,{x:()=>o});var a=n(4586);class o{constructor(e){(0,a.A)(this,"preFetchId",null),(0,a.A)(this,"preFetchScheduled",!1),(0,a.A)(this,"firstFetchPromise",null),(0,a.A)(this,"isFetching",!1),(0,a.A)(this,"task",void 0),this.task=e}schedulePrefetch(){if(!this.preFetchScheduled){this.preFetchScheduled=!0;const e=async()=>{this.preFetchId=null,this.fetch()};"function"==typeof window.requestIdleCallback?this.preFetchId=window.requestIdleCallback(e):this.preFetchId=setTimeout(e)}}fetch(e){let t;return this.preFetchId&&("function"==typeof window.cancelIdleCallback?cancelIdleCallback(this.preFetchId):clearTimeout(this.preFetchId),this.preFetchId=null),this.isFetching&&!e||(this.isFetching=!0,t=this.task(),t.catch((e=>{console.error(e),this.firstFetchPromise=null})).finally((()=>{this.isFetching=!1})),this.firstFetchPromise||(this.firstFetchPromise=t),!e)?this.firstFetchPromise:t}}},6659:(e,t,n)=>{n.d(t,{y:()=>o});var a=n(79);function o(e,t){var n;if(!e)return t;const o=Object.fromEntries(Object.entries(e).filter((e=>{let[t,n]=e;return n.name})).map((e=>{let[t,n]=e;return[t,n.name]})));return null!==(n=(0,a.i18nText)(o))&&void 0!==n?n:t}},9393:(e,t,n)=>{n.d(t,{Bj:()=>s,Ds:()=>c,EM:()=>i,ui:()=>r});var a=n(1280),o=n(7732);const s=(0,a.wrapBrick)("eo-icon"),i=(0,a.wrapBrick)("eo-link"),r=(0,o.unwrapProvider)("basic.show-dialog"),c=(0,o.unwrapProvider)("basic.show-notification")}}]);
|
|
2
|
-
//# sourceMappingURL=2133.8c2de8bf.js.map
|