@next-bricks/nav 1.24.0 → 1.24.2

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.
@@ -30,6 +30,16 @@
30
30
  "description": "菜单构件",
31
31
  "category": "navigation"
32
32
  },
33
+ {
34
+ "name": "eo-launchpad-button",
35
+ "properties": [],
36
+ "events": [],
37
+ "slots": [],
38
+ "methods": [],
39
+ "parts": [],
40
+ "description": "Launchpad 按钮构件",
41
+ "insider": true
42
+ },
33
43
  {
34
44
  "name": "nav.launchpad-config",
35
45
  "properties": [
@@ -96,6 +106,16 @@
96
106
  "description": "构件 `nav.easyops-navbar-alerts`",
97
107
  "insider": true
98
108
  },
109
+ {
110
+ "name": "eo-launchpad-button-v2",
111
+ "properties": [],
112
+ "events": [],
113
+ "slots": [],
114
+ "methods": [],
115
+ "parts": [],
116
+ "description": "构件 `eo-launchpad-button-v2`",
117
+ "insider": true
118
+ },
99
119
  {
100
120
  "name": "eo-launchpad-quick-access",
101
121
  "properties": [
@@ -116,13 +136,19 @@
116
136
  "insider": true
117
137
  },
118
138
  {
119
- "name": "eo-launchpad-button",
120
- "properties": [],
139
+ "name": "eo-launchpad-recent-visits",
140
+ "properties": [
141
+ {
142
+ "name": "target",
143
+ "attribute": false,
144
+ "type": "Target"
145
+ }
146
+ ],
121
147
  "events": [],
122
148
  "slots": [],
123
149
  "methods": [],
124
150
  "parts": [],
125
- "description": "Launchpad 按钮构件",
151
+ "description": "launchpad 最近访问",
126
152
  "insider": true
127
153
  },
128
154
  {
@@ -142,20 +168,51 @@
142
168
  "insider": true
143
169
  },
144
170
  {
145
- "name": "eo-launchpad-recent-visits",
171
+ "name": "eo-app-bar-wrapper",
172
+ "alias": [
173
+ "basic.app-bar-wrapper"
174
+ ],
146
175
  "properties": [
147
176
  {
148
- "name": "target",
177
+ "name": "isFixed",
178
+ "description": "是否固定定位。",
179
+ "deprecated": "使用 `position` 属性代替",
180
+ "default": "true",
181
+ "type": "boolean"
182
+ },
183
+ {
184
+ "name": "position",
185
+ "description": "设置定位方式:静态定位或固定定位。\n\n设置时优先级高于 `isFixed`。",
186
+ "default": "\"fixed\"",
187
+ "type": "\"static\" | \"fixed\""
188
+ },
189
+ {
190
+ "name": "displayCenter",
191
+ "description": "居中显示",
192
+ "default": "false",
193
+ "type": "boolean"
194
+ },
195
+ {
196
+ "name": "extraAppBarContentStyle",
197
+ "description": "自定义样式",
149
198
  "attribute": false,
150
- "type": "Target"
199
+ "type": "React.CSSProperties"
151
200
  }
152
201
  ],
153
202
  "events": [],
154
- "slots": [],
203
+ "slots": [
204
+ {
205
+ "name": "left",
206
+ "description": "左侧内容区"
207
+ },
208
+ {
209
+ "name": "right",
210
+ "description": "右侧内容区"
211
+ }
212
+ ],
155
213
  "methods": [],
156
214
  "parts": [],
157
- "description": "launchpad 最近访问",
158
- "insider": true
215
+ "description": "应用顶部容器"
159
216
  },
160
217
  {
161
218
  "name": "eo-frame-breadcrumb",
@@ -185,51 +242,40 @@
185
242
  "description": "面包屑"
186
243
  },
187
244
  {
188
- "name": "eo-app-bar-wrapper",
189
- "alias": [
190
- "basic.app-bar-wrapper"
191
- ],
245
+ "name": "eo-sidebar-menu-group",
192
246
  "properties": [
193
247
  {
194
- "name": "isFixed",
195
- "description": "是否固定定位。",
196
- "deprecated": "使用 `position` 属性代替",
197
- "default": "true",
248
+ "name": "collapsable",
249
+ "description": "是否允许折叠",
198
250
  "type": "boolean"
199
251
  },
200
252
  {
201
- "name": "position",
202
- "description": "设置定位方式:静态定位或固定定位。\n\n设置时优先级高于 `isFixed`。",
203
- "default": "\"fixed\"",
204
- "type": "\"static\" | \"fixed\""
253
+ "name": "collapsed",
254
+ "description": "是否折叠",
255
+ "type": "boolean"
205
256
  },
206
257
  {
207
- "name": "displayCenter",
208
- "description": "居中显示",
209
- "default": "false",
258
+ "name": "selected",
259
+ "description": "是否选中",
210
260
  "type": "boolean"
211
261
  },
212
262
  {
213
- "name": "extraAppBarContentStyle",
214
- "description": "自定义样式",
215
- "attribute": false,
216
- "type": "React.CSSProperties"
263
+ "name": "menuCollapsed",
264
+ "description": "菜单整体是否收起状态",
265
+ "type": "boolean"
217
266
  }
218
267
  ],
219
268
  "events": [],
220
269
  "slots": [
221
270
  {
222
- "name": "left",
223
- "description": "左侧内容区"
224
- },
225
- {
226
- "name": "right",
227
- "description": "右侧内容区"
271
+ "name": "title",
272
+ "description": "分组标题"
228
273
  }
229
274
  ],
230
275
  "methods": [],
231
276
  "parts": [],
232
- "description": "应用顶部容器"
277
+ "description": "侧栏菜单分组",
278
+ "category": "navigation"
233
279
  },
234
280
  {
235
281
  "name": "eo-sidebar-menu-item",
@@ -279,42 +325,6 @@
279
325
  "description": "侧栏菜单项",
280
326
  "category": "navigation"
281
327
  },
282
- {
283
- "name": "eo-sidebar-menu-group",
284
- "properties": [
285
- {
286
- "name": "collapsable",
287
- "description": "是否允许折叠",
288
- "type": "boolean"
289
- },
290
- {
291
- "name": "collapsed",
292
- "description": "是否折叠",
293
- "type": "boolean"
294
- },
295
- {
296
- "name": "selected",
297
- "description": "是否选中",
298
- "type": "boolean"
299
- },
300
- {
301
- "name": "menuCollapsed",
302
- "description": "菜单整体是否收起状态",
303
- "type": "boolean"
304
- }
305
- ],
306
- "events": [],
307
- "slots": [
308
- {
309
- "name": "title",
310
- "description": "分组标题"
311
- }
312
- ],
313
- "methods": [],
314
- "parts": [],
315
- "description": "侧栏菜单分组",
316
- "category": "navigation"
317
- },
318
328
  {
319
329
  "name": "eo-sidebar-menu-submenu",
320
330
  "properties": [
@@ -369,14 +379,21 @@
369
379
  "category": "navigation"
370
380
  },
371
381
  {
372
- "name": "eo-launchpad-button-v2",
373
- "properties": [],
382
+ "name": "eo-sidebar-sub-menu",
383
+ "properties": [
384
+ {
385
+ "name": "menu",
386
+ "description": "菜单项",
387
+ "attribute": false,
388
+ "type": "SidebarMenu"
389
+ }
390
+ ],
374
391
  "events": [],
375
392
  "slots": [],
376
393
  "methods": [],
377
394
  "parts": [],
378
- "description": "构件 `eo-launchpad-button-v2`",
379
- "insider": true
395
+ "description": "构件 `eo-sidebar-sub-menu`",
396
+ "category": "navigation"
380
397
  },
381
398
  {
382
399
  "name": "eo-sidebar",
@@ -428,23 +445,6 @@
428
445
  "description": "侧边栏",
429
446
  "category": "navigation"
430
447
  },
431
- {
432
- "name": "eo-sidebar-sub-menu",
433
- "properties": [
434
- {
435
- "name": "menu",
436
- "description": "菜单项",
437
- "attribute": false,
438
- "type": "SidebarMenu"
439
- }
440
- ],
441
- "events": [],
442
- "slots": [],
443
- "methods": [],
444
- "parts": [],
445
- "description": "构件 `eo-sidebar-sub-menu`",
446
- "category": "navigation"
447
- },
448
448
  {
449
449
  "name": "eo-directory",
450
450
  "properties": [
package/dist/types.json CHANGED
@@ -4,6 +4,59 @@
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
+ },
7
60
  "eo-frame-breadcrumb": {
8
61
  "properties": [
9
62
  {
@@ -92,59 +145,6 @@
92
145
  }
93
146
  ]
94
147
  },
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,29 +564,29 @@
564
564
  "events": [],
565
565
  "methods": []
566
566
  },
567
- "eo-search-launchpad": {
567
+ "eo-launchpad-recent-visits": {
568
568
  "properties": [
569
569
  {
570
- "name": "readonly",
570
+ "name": "target",
571
571
  "annotation": {
572
- "type": "keyword",
573
- "value": "boolean"
572
+ "type": "reference",
573
+ "typeName": {
574
+ "type": "identifier",
575
+ "name": "Target"
576
+ }
574
577
  }
575
578
  }
576
579
  ],
577
580
  "events": [],
578
581
  "methods": []
579
582
  },
580
- "eo-launchpad-recent-visits": {
583
+ "eo-search-launchpad": {
581
584
  "properties": [
582
585
  {
583
- "name": "target",
586
+ "name": "readonly",
584
587
  "annotation": {
585
- "type": "reference",
586
- "typeName": {
587
- "type": "identifier",
588
- "name": "Target"
589
- }
588
+ "type": "keyword",
589
+ "value": "boolean"
590
590
  }
591
591
  }
592
592
  ],
@@ -1864,6 +1864,29 @@
1864
1864
  "events": [],
1865
1865
  "methods": []
1866
1866
  },
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
+ ],
1887
+ "events": [],
1888
+ "methods": []
1889
+ },
1867
1890
  "eo-directory-tree": {
1868
1891
  "properties": [
1869
1892
  {
@@ -2956,29 +2979,6 @@
2956
2979
  "events": [],
2957
2980
  "methods": []
2958
2981
  },
2959
- "eo-launchpad-quick-access": {
2960
- "properties": [
2961
- {
2962
- "name": "readonly",
2963
- "annotation": {
2964
- "type": "keyword",
2965
- "value": "boolean"
2966
- }
2967
- },
2968
- {
2969
- "name": "target",
2970
- "annotation": {
2971
- "type": "reference",
2972
- "typeName": {
2973
- "type": "identifier",
2974
- "name": "Target"
2975
- }
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.0",
3
+ "version": "1.24.2",
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": "2f9f8ca727b09ca71ec986b5d8c296c742284ac3"
46
+ "gitHead": "0db36935b2e5ac64b83b0fd50d6ad4a9c0dfc790"
47
47
  }
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_nav=globalThis.webpackChunk_next_bricks_nav||[]).push([[9149],{1724:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(6758),l=a.n(n),r=a(935),i=a.n(r)()(l());i.push([e.id,':root{--eo-launchpad-v2-background:#fff;--eo-launchpad-v2-menu-icon-color:#8c8c8c}html[data-theme="dark"],\nhtml[data-theme="dark-v2"]{--eo-launchpad-v2-background:#26262a;--eo-launchpad-v2-menu-icon-color:rgba(255,255,255,0.45)}',""]);const o=i},3693:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(6758),l=a.n(n),r=a(935),i=a.n(r)()(l());i.push([e.id,".platform-category-name,\n.platform-category-sidebar-menu-item-label,\n.platform-item-name,\n.platform-item-description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.platform-category-sidebar-menu-item{display:flex;gap:8px;align-items:center;padding:0px 12px 0px 16px}.platform-category-sidebar-menu-item > eo-link{display:block;min-width:0px;color:var(--color-header-text);cursor:pointer}.platform-category-sidebar-menu-item > eo-link:hover,\n.platform-category-sidebar-menu-item\n > eo-link:hover\n .platform-category-sidebar-menu-icon{color:var(--color-brand-hover)}.platform-category-sidebar-menu-item > eo-link.active,\n.platform-category-sidebar-menu-item\n > eo-link.active\n .platform-category-sidebar-menu-icon{color:var(--color-brand-active)}.platform-category-sidebar-menu-item > eo-link::part(link){height:20px;display:flex;align-items:center;gap:8px}.platform-category-sidebar-menu-icon{color:var(--left-sidebar-item-collapsed-icon-color)}.platform-category-name{font-size:18px;font-weight:500;color:var(--text-color-secondary);flex-shrink:0}.platform-items{display:grid;grid-template-columns:repeat(2,1fr);gap:0 54px}.platform-items > li{min-width:0}.platform-items > li > eo-link{width:100%;cursor:pointer}.platform-item{padding:12px 0;display:flex;flex-direction:column}.platform-item:hover .platform-item-icon,\n.platform-item:hover .platform-item-name{color:var(--color-brand-hover)}.platform-item-title{display:flex;align-items:center;margin-bottom:4px}.platform-item-icon{margin-right:8px;font-size:14px;color:var(--text-color-secondary);flex-shrink:0}.platform-item-name{font-weight:500;color:var(--text-color-title);line-height:18px}.platform-item-description{margin-left:22px;color:var(--text-color-secondary);line-height:18px}",""]);const o=i.toString()},5924:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(6758),l=a.n(n),r=a(935),i=a.n(r)()(l());i.push([e.id,":host{display:inline-block;width:32px;height:32px;--eo-launchpad-v2-max-height:calc(100vh - var(--app-bar-height) - 36px)}:host([hidden]){display:none}.launchpad-button{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:#999;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px}.launchpad-button:hover,\n.launchpad-button.active{background-color:var(--color-fill-bg-base-1)}.launchpad-button.active{color:var(--color-brand)}.mask{position:fixed;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.mask.active{display:block}.launchpad{display:none;position:absolute;margin-top:4px;z-index:1;width:1110px;max-width:calc(100vw - 100px);height:var(--eo-launchpad-v2-max-height);background-color:var(--eo-launchpad-v2-background);border:1px solid var(--color-text-divider-line);border-radius:6px;box-shadow:var(--fullscreen-overlay-shadow)}.launchpad.active{display:flex}.sidebar{width:190px;display:flex;flex-direction:column;background:var(--color-fill-bg-base-3);min-width:0;background-size:205px 205px;background-repeat:no-repeat;background-position:left 52px bottom 27px}.sidebar > *:not(:last-child){border-bottom:1px solid var(--stroke-color-default)}.quick-nav-label,\n.platform-nav-label,\n.jump-nav-label,\n.menu-group-label,\n.menu-item-label,\n.recent-visits span{overflow:auto;white-space:normal;word-break:break-word;width:90px}.recent-visits span{width:100%}.sidebar-menu,\n.menu-groups,\n.menu,\n.sub-menu,\n.recent-visits,\n.platform-items{list-style:none;margin:0;padding:0}.sidebar-menu,\n.menu,\n.sub-menu{display:flex;flex-direction:column;gap:14px}.sidebar-menu-item > eo-link,\n.menu-item > eo-link,\n.recent-visits eo-link{display:block;min-width:0;height:100%}.sidebar-menu-item > eo-link::part(link),\n.menu-item > eo-link::part(link){display:flex;align-items:center;gap:8px;color:var(--color-header-text)}.sidebar-menu-item{padding:0 12px 0 16px;justify-content:space-between}.sidebar-menu-icon{color:var(--left-sidebar-item-collapsed-icon-color)}.union{flex:1;display:flex;flex-direction:column;overflow-y:auto}.quick-nav,\n.platform-nav{display:flex;flex-direction:column;padding:20px 0 24px}.platform-nav{padding:0 0 24px}.quick-nav-label,\n.platform-nav-label{color:var(--color-header-text);font-weight:500;margin-bottom:14px;padding:0 16px}.quick-nav-menu,\n.platform-nav-menu{flex:1}.jump-nav > eo-link{display:block;cursor:pointer}.jump-nav > eo-link::part(link){padding:10px 16px;display:flex;justify-content:space-between;align-items:center}.jump-nav-label{flex:1;color:var(--color-header-text);font-weight:500}.jump-nav > eo-icon{font-size:14px;color:var(--text-color-default)}.content{flex:1;padding:20px 24px 24px;min-width:0;overflow-y:auto;display:flex;flex-direction:column;gap:24px}.search-box{border-bottom:1px solid var(--color-text-divider-line);display:flex;gap:8px;align-items:center;padding:10px 0;margin-top:-10px;cursor:text}.search-icon{color:var(--color-auxiliary-text)}.search-input{padding:0;margin:0;border:none;outline:none;color:inherit;background-color:transparent;font-size:14px;line-height:22px;flex:1;min-width:0}.search-input::placeholder{color:var(--color-disabled-text);opacity:1}.search-clear{display:none;color:var(--color-secondary-text);cursor:pointer}.search-clear.searching{display:inline-block}.search-clear:hover{color:var(--color-auxiliary-text)}.menu-groups,\n.recent-visits{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.menu-groups{display:grid;gap:32px 8px}.menu-group{padding-right:12px;color:var(--color-header-text)}.menu-group-label{font-size:var(--card-title-font-size);font-weight:500;color:var(--color-header-text);margin-bottom:14px}.sidebar-menu-item,\n.menu-item:not(.folder){display:flex;gap:8px;align-items:center}.menu-icon{color:var(--eo-launchpad-v2-menu-icon-color)}.menu-item.active,\n.menu-item.active .menu-icon{color:var(--color-brand-active)}.sub-menu:not(.expanded){display:none}.sub-menu{margin-top:14px;margin-left:8px;border-left:1px solid var(--color-text-divider-line);padding-left:15px}.menu-item-remove,\n.menu-item-star{cursor:pointer}.menu-item-remove,\n.menu-item-star,\n.menu-item-toggle{color:var(--color-secondary-text)}.sidebar-menu-item:not(:hover) .menu-item-remove{display:none}.menu-item-remove:hover{color:var(--color-normal-text)}.menu-item-remove:active{color:var(--color-strong-text)}.menu-item-star{display:none}.can-star.starred > .menu-item-star,\n.can-star:hover > .menu-item-star{display:inline-block}.can-star:not(.starred) > .menu-item-star{color:var(--color-secondary-text)}.starred > .menu-item-star{color:var(--palette-yellow-6)}.recent-visits-label{margin-bottom:12px;font-size:var(--card-title-font-size);color:var(--color-header-text);font-weight:500}.recent-visits{display:grid;gap:8px}.recent-visits eo-link::part(link){background-color:var(--color-fill-bg-base-1);border-radius:3px;color:var(--color-header-text);display:flex;align-items:center;height:100%;padding:0 8px}.sidebar-menu-item > eo-link:hover::part(link),\n.sidebar-menu-item > eo-link:hover .sidebar-menu-icon,\n.menu-item > eo-link:hover::part(link),\n.menu-item > eo-link:hover .menu-icon,\n.menu-item > eo-link:hover .menu-item-toggle,\n.recent-visits eo-link:hover::part(link){color:var(--color-brand-hover)}.spinner{display:flex;justify-content:center;align-items:center;color:var(--theme-doderblue-color);flex:1;font-size:30px}.empty,\n.loading > :not(.spinner){display:none}@supports not (inset: 0){.content,\n .search-box,\n .sidebar-menu,\n .menu,\n .sub-menu,\n .sidebar-menu-item,\n .menu-item:not(.folder),\n .sidebar-menu-item > eo-link::part(link),\n .menu-item > eo-link::part(link){gap:0}.sidebar-menu > :not(:first-child),\n .menu > :not(:first-child),\n .sub-menu > :not(:first-child){margin-top:14px}.search-icon,\n .sidebar-menu-icon,\n .menu-icon{margin-right:8px}.search-clear,\n .menu-item-star,\n .menu-item-toggle{margin-left:8px}.content > :not(:last-child){margin-bottom:24px}}",""]);const o=i.toString()},8356:(e,t,a)=>{a.d(t,{P:()=>i,z:()=>r});var n=a(8769),l=a.n(n);const r=l().createContext({}),i=()=>l().useContext(r)},8776:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(6758),l=a.n(n),r=a(935),i=a.n(r)()(l());i.push([e.id,".fadeEnter{opacity:0;transform:scale(0.95)}.fadeEnterActive{opacity:1;transform:translateX(0);transition:opacity 100ms ease-out,transform 100ms ease-out}.fadeExit{transform:translate(-30px,0)}.fadeExitActive{transform:translate(-100%,0);transition:transform 300ms ease-out}.fadeExitDone{display:none}",""]);const o=i.toString()},8839:(e,t,a)=>{a.d(t,{F:()=>g,r:()=>d});var n=a(9575),l=a(8769),r=a.n(l),i=a(1030),o=a(3373),c=a.n(o),m=a(9393),s=a(8356),p=a(6934),u=a(403);function d(e){let{name:t,items:a}=e;return r().createElement("li",{className:"menu-group"},r().createElement("div",{className:"menu-group-label"},t),r().createElement("ul",{className:"menu"},a.map((e=>"dir"===e.type?r().createElement(f,{key:`${e.type}-${e.id}`,name:e.localeName,items:e.items}):r().createElement(v,{key:`${e.type}-${e.id}`,item:e})))))}function v(e){var t;let{item:a}=e;const{t:o}=(0,p.useTranslation)(u.NS),{loadingFavorites:d,readonly:v,pushRecentVisit:g,toggleStar:f,isStarred:h}=(0,s.P)(),b=(0,l.useMemo)((()=>h(a)),[h,a]),x=(0,l.useCallback)((()=>{f(a)}),[a,f]),y=(0,l.useCallback)((()=>{g(a)}),[a,g]);return r().createElement("li",{className:c()("menu-item",{starred:b,"can-star":!d})},r().createElement(m.EM,(0,n.A)({onClick:y},"app"===a.type?{url:a.url}:{href:a.url}),r().createElement(m.Bj,(0,n.A)({className:"menu-icon",lib:"easyops",icon:"micro-app-center"},null!==(t=a.menuIcon)&&void 0!==t&&t.lib&&a.menuIcon.icon?(0,i.pick)(a.menuIcon,["lib","icon","theme","category","prefix"]):null)),r().createElement("span",{className:"menu-item-label"},a.localeName)),!v&&r().createElement(m.Bj,{lib:"fa",prefix:b?"fas":"far",icon:"star",className:"menu-item-star",title:o(b?u.K.UNFAVORITE:u.K.FAVORITE),onClick:x,"data-testid":"menu-item-star"}))}function g(e){var t;let{item:a,target:o}=e;const{readonly:c,pushRecentVisit:p,toggleStar:u}=(0,s.P)(),d=(0,l.useCallback)((()=>{"link"!==a.type&&p(a)}),[a,p]),v=(0,l.useCallback)((()=>{u(a)}),[a,u]);return r().createElement("li",{className:"sidebar-menu-item"},r().createElement(m.EM,(0,n.A)({onClick:d},"app"===a.type?{url:a.url}:{href:a.url},o?{target:o}:null),r().createElement(m.Bj,(0,n.A)({className:"sidebar-menu-icon",lib:"easyops",icon:"micro-app-center"},null!==(t=a.menuIcon)&&void 0!==t&&t.lib&&a.menuIcon.icon?(0,i.pick)(a.menuIcon,["lib","icon","theme","category","prefix"]):null)),r().createElement("span",{className:"menu-item-label"},a.name)),!c&&r().createElement(m.Bj,{lib:"fa",icon:"xmark",className:"menu-item-remove",onClick:v}))}function f(e){let{name:t,items:a}=e;const{searching:n}=(0,s.P)(),[i,o]=(0,l.useState)(!1),[p,u]=(0,l.useState)(!1),d=(0,l.useCallback)((()=>{n?u((e=>!e)):o((e=>!e))}),[n]);(0,l.useEffect)((()=>{u(!0)}),[n]);const g=n?p:i;return r().createElement("li",{className:"menu-item folder"},r().createElement(m.EM,{onClick:d},r().createElement(m.Bj,{lib:"fa",prefix:"far",icon:"folder-open",className:"menu-icon"}),r().createElement("span",{className:"menu-item-label"},t),r().createElement(m.Bj,{lib:"antd",icon:g?"up":"down",className:"menu-item-toggle"})),r().createElement("ul",{className:c()("sub-menu",{expanded:g})},a.map((e=>r().createElement(v,{key:`${e.type}-${e.id}`,item:e})))))}(0,p.initializeReactI18n)(u.NS,u.I)},9262:(e,t,a)=>{var n=a(2591),l=a.n(n),r=a(1740),i=a.n(r),o=a(8128),c=a.n(o),m=a(855),s=a.n(m),p=a(3051),u=a.n(p),d=a(3656),v=a.n(d),g=a(1724),f={};f.styleTagTransform=v(),f.setAttributes=s(),f.insert=c().bind(null,"head"),f.domAPI=i(),f.insertStyleElement=u(),l()(g.A,f),g.A&&g.A.locals&&g.A.locals},9302:(e,t,a)=>{a.d(t,{r:()=>y});var n=a(9575),l=a(8769),r=a.n(l),i=a(3373),o=a.n(i),c=a(9393),m=a(2133),s=a(8839),p=a(8356),u=a(1030);function d(e){var t;let{item:a,active:l,onClick:i}=e;return r().createElement("li",{className:"platform-category-sidebar-menu-item"},r().createElement(c.EM,{type:"plain",className:o()({active:l}),onClick:()=>null==i?void 0:i(a)},r().createElement(c.Bj,(0,n.A)({className:"platform-category-sidebar-menu-icon",lib:"easyops",category:"second-menu",icon:"serve-second-menu"},null!==(t=a.icon)&&void 0!==t&&t.lib&&a.icon.icon?(0,u.pick)(a.icon,["lib","icon","theme","category","prefix"]):null)),r().createElement("span",{className:"platform-category-sidebar-menu-item-label"},a.name)))}function v(e){var t;let{item:a}=e;return r().createElement("li",null,r().createElement(c.EM,(0,n.A)({type:"plain"},"app"===a.type?{url:a.url}:{href:a.url,target:"_blank"}),r().createElement("div",{className:"platform-item"},r().createElement("div",{className:"platform-item-title"},r().createElement(c.Bj,(0,n.A)({className:"platform-item-icon",lib:"easyops",category:"third-menu",icon:"deploy-orchestration-tasks-third-menu"},null!==(t=a.menuIcon)&&void 0!==t&&t.lib&&a.menuIcon.icon?(0,u.pick)(a.menuIcon,["lib","icon","theme","category","prefix"]):null)),r().createElement("div",{className:"platform-item-name"},a.name)),r().createElement("div",{className:"platform-item-description"},a.description))))}var g=a(3081),f=a(1675),h=a(2865),b=a(6934),x=a(403);function y(e){let{active:t}=e;const{t:a}=(0,b.useTranslation)(x.NS),i=(0,l.useRef)(null),[u,y]=(0,l.useState)([]),k=(0,l.useCallback)((()=>{var e;null===(e=i.current)||void 0===e||e.focus()}),[]),[N,w]=(0,l.useState)("#all"),A=r().useMemo((()=>{var e;return null===(e=(0,g.getRuntime)())||void 0===e?void 0:e.getFeatureFlags()["launchpad-show-platform-category"]}),[]),C=r().useMemo((()=>{var e;return null===(e=(0,g.getRuntime)())||void 0===e?void 0:e.getFeatureFlags()["launchpad-show-scenario-center"]}),[]),j=r().useMemo((()=>{var e;return null===(e=(0,g.getRuntime)())||void 0===e?void 0:e.getFeatureFlags()["launchpad-show-solution-center"]}),[]),S=r().useMemo((()=>{var e;return null===(e=(0,g.getRuntime)())||void 0===e?void 0:e.getFeatureFlags()["launchpad-show-open-platform"]}),[]),{loading:I,q:R,setQ:F,menuGroups:M,favorites:z,loadingFavorites:B,recentVisits:T,pushRecentVisit:_,toggleStar:K,isStarred:P,platformCategories:O}=(0,m.sZ)(t),q=!!R,V=(0,l.useCallback)((e=>{F(e.target.value)}),[F]),$=(0,l.useCallback)((()=>{F("")}),[F]);(0,l.useEffect)((()=>{var e;t&&(null===(e=i.current)||void 0===e||e.focus())}),[t]);const L=(0,l.useCallback)((e=>{w(e.id)}),[]),D=(0,l.useMemo)((()=>O.find((e=>e.id===N))),[N,O]);return(0,l.useEffect)((()=>{z.length>u.length?y(z):setTimeout((()=>{y(z)}),300)}),[z,u.length]),r().createElement("div",{className:o()("launchpad",{active:t})},r().createElement(p.z.Provider,{value:{searching:q,loadingFavorites:B,pushRecentVisit:_,toggleStar:K,isStarred:P}},r().createElement("div",{className:"sidebar"},r().createElement("div",{className:"union"},r().createElement("div",{className:"quick-nav"},r().createElement("div",{className:"quick-nav-label"},a(x.K.QUICK_ACCESS)),r().createElement(f.A,null,r().createElement("ul",{className:"sidebar-menu quick-nav-menu"},u.map(((e,t)=>r().createElement(h.A,{key:t,timeout:300,in:!!z.find((t=>t.id===e.id)),classNames:{enter:"fadeEnter",enterActive:"fadeEnterActive",exit:"fadeExit",exitActive:"fadeExitActive",exitDone:"fadeExitDone"}},r().createElement(s.F,{key:t,item:e}))))))),A&&r().createElement("div",{className:"platform-nav"},r().createElement("div",{className:"platform-nav-label"},a(x.K.PLATFORM_BASE)),r().createElement("ul",{className:"sidebar-menu platform-nav-menu"},O.map(((e,t)=>r().createElement(d,{key:t,onClick:L,item:e,active:N===e.id})))))),C&&r().createElement("div",{className:"jump-nav"},r().createElement(c.EM,{type:"plain",url:"/portal/scenario"},r().createElement("div",{className:"jump-nav-label"},a(x.K.SCENARIO_CENTER)),r().createElement(c.Bj,{lib:"antd",icon:"right",theme:"outlined"}))),j&&r().createElement("div",{className:"jump-nav"},r().createElement(c.EM,{type:"plain",url:"/portal/solution"},r().createElement("div",{className:"jump-nav-label"},a(x.K.SOLUTIONS)),r().createElement(c.Bj,{lib:"antd",icon:"right",theme:"outlined"}))),S&&r().createElement("div",{className:"jump-nav"},r().createElement(c.EM,{type:"plain",url:"/developers"},r().createElement("div",{className:"jump-nav-label"},a(x.K.OPEN_PLATFORM)),r().createElement(c.Bj,{lib:"antd",icon:"right",theme:"outlined"})))),r().createElement("div",{className:o()("content",{loading:I})},r().createElement(E,{loading:I}),"#all"!==N&&r().createElement("div",{className:"platform-category-name"},null==D?void 0:D.name),r().createElement("div",{className:"search-box",onClick:k},r().createElement(c.Bj,{lib:"fa",icon:"magnifying-glass",className:"search-icon"}),r().createElement("input",{ref:i,placeholder:a(x.K.SEARCH_PLACEHOLDER),value:R,onChange:V,className:"search-input"}),r().createElement(c.Bj,{lib:"antd",theme:"filled",icon:"close-circle",className:o()("search-clear",{searching:q}),onClick:$})),"#all"===N&&r().createElement("div",{className:o()({empty:0===T.length})},r().createElement("div",{className:"recent-visits-label"},a(x.K.RECENT_VISITS)),r().createElement("ul",{className:"recent-visits"},T.map(((e,t)=>r().createElement("li",{key:t},r().createElement(c.EM,(0,n.A)({onClick:()=>_(e)},"app"===e.type?{url:e.url}:{href:e.url,target:"_blank"}),r().createElement("span",null,e.name))))))),"#all"===N&&r().createElement("ul",{className:"menu-groups"},M.map((e=>r().createElement(s.r,{key:e.name,name:e.localeName,items:e.items})))),"#all"!==N&&r().createElement("ul",{className:o()("platform-items",{empty:0===(null==D?void 0:D.items.length)})},null==D?void 0:D.items.map(((e,t)=>r().createElement(v,{item:e,key:t})))))))}function E(e){let{loading:t}=e;return t&&r().createElement("div",{className:"spinner"},r().createElement(c.Bj,{lib:"fa",icon:"spinner",spinning:!0}))}(0,b.initializeReactI18n)(x.NS,x.I)}}]);
2
- //# sourceMappingURL=9149.8d0c56b4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/9149.8d0c56b4.js","mappings":"iLAGIA,E,M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,QAASA,IAAMX,EAAgBb,IACZ,QAAdA,EAAKC,KACN,CACEwB,IAAKzB,EAAKyB,KAEZ,CACEC,KAAM1B,EAAKyB,IACXe,OAAQ,WAGdhD,IAAAA,cAAA,YAAOQ,EAAKJ,YAOV,SAAbiF,GACCrF,IAAAA,cAAA,MAAIM,UAAU,eACX8F,EAAW7F,KAAKsI,GACf7I,IAAAA,cAACE,EAAAA,EAAS,CACRS,IAAKkI,EAAMzI,KACXA,KAAMyI,EAAMjI,WACZP,MAAOwI,EAAMxI,WAKP,SAAbgF,GACCrF,IAAAA,cAAA,MACEM,UAAWuB,IAAW,iBAAkB,CACtC8G,MAAqC,KAA9B5B,aAAW,EAAXA,EAAa1G,MAAM6G,WAG3BH,aAAW,EAAXA,EAAa1G,MAAME,KAAI,CAACC,EAAM+G,IAC7BvH,IAAAA,cAAC0E,EAAY,CAAClE,KAAMA,EAAMG,IAAK4G,SAQ/C,CAEA,SAASe,EAAOxH,GAAoC,IAAnC,QAAEmF,GAA+BnF,EAChD,OACEmF,GACEjG,IAAAA,cAAA,OAAKM,UAAU,WACbN,IAAAA,cAACmC,EAAAA,GAAW,CAACC,IAAI,KAAKC,KAAK,UAAUyG,UAAQ,IAIrD,EA/PAjF,EAAAA,EAAAA,qBAAoB3C,EAAAA,GAAI4C,EAAAA,E","sources":["webpack:///./src/launchpad-button-v2/host-context.css","webpack:///./src/launchpad-button-v2/PlatformCategory.shadow.css","webpack:///./src/launchpad-button-v2/styles.shadow.css","webpack:///./src/launchpad-button-v2/LaunchpadContext.ts","webpack:///./src/launchpad-button-v2/Launchpad.shadow.css","webpack:///./src/launchpad-button-v2/MenuGroup.tsx","webpack:///./src/launchpad-button-v2/host-context.css?59a8","webpack:///./src/launchpad-button-v2/PlatformCategory.tsx","webpack:///./src/launchpad-button-v2/Launchpad.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:root{--eo-launchpad-v2-background:#fff;--eo-launchpad-v2-menu-icon-color:#8c8c8c}html[data-theme=\"dark\"],\nhtml[data-theme=\"dark-v2\"]{--eo-launchpad-v2-background:#26262a;--eo-launchpad-v2-menu-icon-color:rgba(255,255,255,0.45)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.platform-category-name,\n.platform-category-sidebar-menu-item-label,\n.platform-item-name,\n.platform-item-description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.platform-category-sidebar-menu-item{display:flex;gap:8px;align-items:center;padding:0px 12px 0px 16px}.platform-category-sidebar-menu-item > eo-link{display:block;min-width:0px;color:var(--color-header-text);cursor:pointer}.platform-category-sidebar-menu-item > eo-link:hover,\n.platform-category-sidebar-menu-item\n > eo-link:hover\n .platform-category-sidebar-menu-icon{color:var(--color-brand-hover)}.platform-category-sidebar-menu-item > eo-link.active,\n.platform-category-sidebar-menu-item\n > eo-link.active\n .platform-category-sidebar-menu-icon{color:var(--color-brand-active)}.platform-category-sidebar-menu-item > eo-link::part(link){height:20px;display:flex;align-items:center;gap:8px}.platform-category-sidebar-menu-icon{color:var(--left-sidebar-item-collapsed-icon-color)}.platform-category-name{font-size:18px;font-weight:500;color:var(--text-color-secondary);flex-shrink:0}.platform-items{display:grid;grid-template-columns:repeat(2,1fr);gap:0 54px}.platform-items > li{min-width:0}.platform-items > li > eo-link{width:100%;cursor:pointer}.platform-item{padding:12px 0;display:flex;flex-direction:column}.platform-item:hover .platform-item-icon,\n.platform-item:hover .platform-item-name{color:var(--color-brand-hover)}.platform-item-title{display:flex;align-items:center;margin-bottom:4px}.platform-item-icon{margin-right:8px;font-size:14px;color:var(--text-color-secondary);flex-shrink:0}.platform-item-name{font-weight:500;color:var(--text-color-title);line-height:18px}.platform-item-description{margin-left:22px;color:var(--text-color-secondary);line-height:18px}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:inline-block;width:32px;height:32px;--eo-launchpad-v2-max-height:calc(100vh - var(--app-bar-height) - 36px)}:host([hidden]){display:none}.launchpad-button{width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:#999;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px}.launchpad-button:hover,\n.launchpad-button.active{background-color:var(--color-fill-bg-base-1)}.launchpad-button.active{color:var(--color-brand)}.mask{position:fixed;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.mask.active{display:block}.launchpad{display:none;position:absolute;margin-top:4px;z-index:1;width:1110px;max-width:calc(100vw - 100px);height:var(--eo-launchpad-v2-max-height);background-color:var(--eo-launchpad-v2-background);border:1px solid var(--color-text-divider-line);border-radius:6px;box-shadow:var(--fullscreen-overlay-shadow)}.launchpad.active{display:flex}.sidebar{width:190px;display:flex;flex-direction:column;background:var(--color-fill-bg-base-3);min-width:0;background-size:205px 205px;background-repeat:no-repeat;background-position:left 52px bottom 27px}.sidebar > *:not(:last-child){border-bottom:1px solid var(--stroke-color-default)}.quick-nav-label,\n.platform-nav-label,\n.jump-nav-label,\n.menu-group-label,\n.menu-item-label,\n.recent-visits span{overflow:auto;white-space:normal;word-break:break-word;width:90px}.recent-visits span{width:100%}.sidebar-menu,\n.menu-groups,\n.menu,\n.sub-menu,\n.recent-visits,\n.platform-items{list-style:none;margin:0;padding:0}.sidebar-menu,\n.menu,\n.sub-menu{display:flex;flex-direction:column;gap:14px}.sidebar-menu-item > eo-link,\n.menu-item > eo-link,\n.recent-visits eo-link{display:block;min-width:0;height:100%}.sidebar-menu-item > eo-link::part(link),\n.menu-item > eo-link::part(link){display:flex;align-items:center;gap:8px;color:var(--color-header-text)}.sidebar-menu-item{padding:0 12px 0 16px;justify-content:space-between}.sidebar-menu-icon{color:var(--left-sidebar-item-collapsed-icon-color)}.union{flex:1;display:flex;flex-direction:column;overflow-y:auto}.quick-nav,\n.platform-nav{display:flex;flex-direction:column;padding:20px 0 24px}.platform-nav{padding:0 0 24px}.quick-nav-label,\n.platform-nav-label{color:var(--color-header-text);font-weight:500;margin-bottom:14px;padding:0 16px}.quick-nav-menu,\n.platform-nav-menu{flex:1}.jump-nav > eo-link{display:block;cursor:pointer}.jump-nav > eo-link::part(link){padding:10px 16px;display:flex;justify-content:space-between;align-items:center}.jump-nav-label{flex:1;color:var(--color-header-text);font-weight:500}.jump-nav > eo-icon{font-size:14px;color:var(--text-color-default)}.content{flex:1;padding:20px 24px 24px;min-width:0;overflow-y:auto;display:flex;flex-direction:column;gap:24px}.search-box{border-bottom:1px solid var(--color-text-divider-line);display:flex;gap:8px;align-items:center;padding:10px 0;margin-top:-10px;cursor:text}.search-icon{color:var(--color-auxiliary-text)}.search-input{padding:0;margin:0;border:none;outline:none;color:inherit;background-color:transparent;font-size:14px;line-height:22px;flex:1;min-width:0}.search-input::placeholder{color:var(--color-disabled-text);opacity:1}.search-clear{display:none;color:var(--color-secondary-text);cursor:pointer}.search-clear.searching{display:inline-block}.search-clear:hover{color:var(--color-auxiliary-text)}.menu-groups,\n.recent-visits{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.menu-groups{display:grid;gap:32px 8px}.menu-group{padding-right:12px;color:var(--color-header-text)}.menu-group-label{font-size:var(--card-title-font-size);font-weight:500;color:var(--color-header-text);margin-bottom:14px}.sidebar-menu-item,\n.menu-item:not(.folder){display:flex;gap:8px;align-items:center}.menu-icon{color:var(--eo-launchpad-v2-menu-icon-color)}.menu-item.active,\n.menu-item.active .menu-icon{color:var(--color-brand-active)}.sub-menu:not(.expanded){display:none}.sub-menu{margin-top:14px;margin-left:8px;border-left:1px solid var(--color-text-divider-line);padding-left:15px}.menu-item-remove,\n.menu-item-star{cursor:pointer}.menu-item-remove,\n.menu-item-star,\n.menu-item-toggle{color:var(--color-secondary-text)}.sidebar-menu-item:not(:hover) .menu-item-remove{display:none}.menu-item-remove:hover{color:var(--color-normal-text)}.menu-item-remove:active{color:var(--color-strong-text)}.menu-item-star{display:none}.can-star.starred > .menu-item-star,\n.can-star:hover > .menu-item-star{display:inline-block}.can-star:not(.starred) > .menu-item-star{color:var(--color-secondary-text)}.starred > .menu-item-star{color:var(--palette-yellow-6)}.recent-visits-label{margin-bottom:12px;font-size:var(--card-title-font-size);color:var(--color-header-text);font-weight:500}.recent-visits{display:grid;gap:8px}.recent-visits eo-link::part(link){background-color:var(--color-fill-bg-base-1);border-radius:3px;color:var(--color-header-text);display:flex;align-items:center;height:100%;padding:0 8px}.sidebar-menu-item > eo-link:hover::part(link),\n.sidebar-menu-item > eo-link:hover .sidebar-menu-icon,\n.menu-item > eo-link:hover::part(link),\n.menu-item > eo-link:hover .menu-icon,\n.menu-item > eo-link:hover .menu-item-toggle,\n.recent-visits eo-link:hover::part(link){color:var(--color-brand-hover)}.spinner{display:flex;justify-content:center;align-items:center;color:var(--theme-doderblue-color);flex:1;font-size:30px}.empty,\n.loading > :not(.spinner){display:none}@supports not (inset: 0){.content,\n .search-box,\n .sidebar-menu,\n .menu,\n .sub-menu,\n .sidebar-menu-item,\n .menu-item:not(.folder),\n .sidebar-menu-item > eo-link::part(link),\n .menu-item > eo-link::part(link){gap:0}.sidebar-menu > :not(:first-child),\n .menu > :not(:first-child),\n .sub-menu > :not(:first-child){margin-top:14px}.search-icon,\n .sidebar-menu-icon,\n .menu-icon{margin-right:8px}.search-clear,\n .menu-item-star,\n .menu-item-toggle{margin-left:8px}.content > :not(:last-child){margin-bottom:24px}}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import React from \"react\";\nimport type { MenuItemDataLink, MenuItemDataNormal } from \"./interfaces\";\n\nexport interface LaunchpadContextData {\n searching: boolean;\n loadingFavorites: boolean;\n readonly?: boolean;\n pushRecentVisit(item: MenuItemDataNormal): void;\n toggleStar(item: MenuItemDataNormal | MenuItemDataLink): void;\n isStarred(item: MenuItemDataNormal): boolean;\n}\n\nexport const LaunchpadsContext = React.createContext<LaunchpadContextData>(\n {} as LaunchpadContextData\n);\n\nexport const useLaunchpadContext = (): LaunchpadContextData =>\n React.useContext(LaunchpadsContext);\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.fadeEnter{opacity:0;transform:scale(0.95)}.fadeEnterActive{opacity:1;transform:translateX(0);transition:opacity 100ms ease-out,transform 100ms ease-out}.fadeExit{transform:translate(-30px,0)}.fadeExitActive{transform:translate(-100%,0);transition:transform 300ms ease-out}.fadeExitDone{display:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { pick } from \"lodash\";\nimport classNames from \"classnames\";\nimport { WrappedIcon, WrappedLink } from \"./wrapped-bricks\";\nimport { useLaunchpadContext } from \"./LaunchpadContext\";\nimport type {\n MenuItemData,\n MenuItemDataNormal,\n SidebarMenuItemData,\n} from \"./interfaces\";\nimport { Target } from \"@next-bricks/basic/link\";\nimport { initializeReactI18n, useTranslation } from \"@next-core/i18n/react\";\nimport { K, NS, locales } from \"./i18n\";\n\ninitializeReactI18n(NS, locales);\n\nexport interface MenuGroupProps {\n name: string;\n items: MenuItemData[];\n}\n\nexport function MenuGroup({ name, items }: MenuGroupProps) {\n return (\n <li className=\"menu-group\">\n <div className=\"menu-group-label\">{name}</div>\n <ul className=\"menu\">\n {items.map((item) =>\n item.type === \"dir\" ? (\n <MenuItemFolder\n key={`${item.type}-${item.id}`}\n name={item.localeName as string}\n items={item.items}\n />\n ) : (\n <MenuItem key={`${item.type}-${item.id}`} item={item} />\n )\n )}\n </ul>\n </li>\n );\n}\n\nexport interface MenuItemProps {\n item: MenuItemDataNormal;\n}\n\nfunction MenuItem({ item }: MenuItemProps) {\n const { t } = useTranslation(NS);\n const { loadingFavorites, readonly, pushRecentVisit, toggleStar, isStarred } =\n useLaunchpadContext();\n\n const starred = useMemo(() => isStarred(item), [isStarred, item]);\n\n const handleStarClick = useCallback(() => {\n toggleStar(item);\n }, [item, toggleStar]);\n\n const handleClick = useCallback(() => {\n pushRecentVisit(item);\n }, [item, pushRecentVisit]);\n\n return (\n <li\n className={classNames(\"menu-item\", {\n starred,\n \"can-star\": !loadingFavorites,\n })}\n >\n <WrappedLink\n onClick={handleClick}\n {...(item.type === \"app\"\n ? {\n url: item.url,\n }\n : {\n href: item.url,\n })}\n >\n <WrappedIcon\n className=\"menu-icon\"\n lib=\"easyops\"\n icon=\"micro-app-center\"\n {...(item.menuIcon?.lib && item.menuIcon.icon\n ? (pick(item.menuIcon, [\n \"lib\",\n \"icon\",\n \"theme\",\n \"category\",\n \"prefix\",\n ]) as any)\n : null)}\n />\n <span className=\"menu-item-label\">{item.localeName}</span>\n </WrappedLink>\n {!readonly && (\n <WrappedIcon\n lib=\"fa\"\n prefix={starred ? \"fas\" : \"far\"}\n icon=\"star\"\n className=\"menu-item-star\"\n title={(starred ? t(K.UNFAVORITE) : t(K.FAVORITE)) as string}\n onClick={handleStarClick}\n data-testid=\"menu-item-star\"\n />\n )}\n </li>\n );\n}\n\nexport interface SidebarMenuItemProps {\n item: SidebarMenuItemData;\n target?: Target;\n}\n\nexport function SidebarMenuItem({ item, target }: SidebarMenuItemProps) {\n const { readonly, pushRecentVisit, toggleStar } = useLaunchpadContext();\n\n const handleClick = useCallback(() => {\n if (item.type !== \"link\") {\n pushRecentVisit(item);\n }\n }, [item, pushRecentVisit]);\n\n const handleRemoveStar = useCallback(() => {\n toggleStar(item);\n }, [item, toggleStar]);\n\n return (\n <li className=\"sidebar-menu-item\">\n <WrappedLink\n onClick={handleClick}\n {...(item.type === \"app\"\n ? {\n url: item.url,\n }\n : {\n href: item.url,\n })}\n {...(target\n ? {\n target,\n }\n : null)}\n >\n <WrappedIcon\n className={`sidebar-menu-icon`}\n lib=\"easyops\"\n icon=\"micro-app-center\"\n {...(item.menuIcon?.lib && item.menuIcon.icon\n ? (pick(item.menuIcon, [\n \"lib\",\n \"icon\",\n \"theme\",\n \"category\",\n \"prefix\",\n ]) as any)\n : null)}\n />\n <span className=\"menu-item-label\">{item.name}</span>\n </WrappedLink>\n {!readonly && (\n <WrappedIcon\n lib=\"fa\"\n icon=\"xmark\"\n className=\"menu-item-remove\"\n onClick={handleRemoveStar}\n />\n )}\n </li>\n );\n}\n\nexport interface MenuItemFolderProps {\n name: string;\n items: MenuItemDataNormal[];\n}\n\nfunction MenuItemFolder({ name, items }: MenuItemFolderProps) {\n const { searching } = useLaunchpadContext();\n const [expanded, setExpanded] = useState(false);\n const [searchingExpanded, setSearchingExpanded] = useState(false);\n\n const toggle = useCallback(() => {\n // Use separated expanded states for searching and non-searching.\n if (searching) {\n setSearchingExpanded((previous) => !previous);\n } else {\n setExpanded((previous) => !previous);\n }\n }, [searching]);\n\n useEffect(() => {\n // Each time when start searching, set it as expanded.\n setSearchingExpanded(true);\n }, [searching]);\n\n const actualExpanded = searching ? searchingExpanded : expanded;\n\n return (\n <li className=\"menu-item folder\">\n <WrappedLink onClick={toggle}>\n <WrappedIcon\n lib=\"fa\"\n prefix=\"far\"\n icon=\"folder-open\"\n className=\"menu-icon\"\n />\n <span className=\"menu-item-label\">{name}</span>\n <WrappedIcon\n lib=\"antd\"\n icon={actualExpanded ? \"up\" : \"down\"}\n className=\"menu-item-toggle\"\n />\n </WrappedLink>\n <ul className={classNames(\"sub-menu\", { expanded: actualExpanded })}>\n {items.map((item) => (\n <MenuItem key={`${item.type}-${item.id}`} item={item} />\n ))}\n </ul>\n </li>\n );\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./host-context.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./host-context.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { WrappedLink, WrappedIcon } from \"./wrapped-bricks\";\nimport { MenuItemDataNormal, PlatformCategoryItem } from \"./interfaces\";\nimport { pick } from \"lodash\";\nimport classNames from \"classnames\";\n\nexport interface PlatformCategorySidebarMenuItemProps {\n item: PlatformCategoryItem;\n active?: boolean;\n onClick?: (item: PlatformCategoryItem) => void;\n}\n\nexport function PlatformCategorySidebarMenuItem({\n item,\n active,\n onClick,\n}: PlatformCategorySidebarMenuItemProps) {\n return (\n <li className=\"platform-category-sidebar-menu-item\">\n <WrappedLink\n type=\"plain\"\n className={classNames({ active })}\n onClick={() => onClick?.(item)}\n >\n <WrappedIcon\n className={\"platform-category-sidebar-menu-icon\"}\n lib=\"easyops\"\n category=\"second-menu\"\n icon=\"serve-second-menu\"\n {...(item.icon?.lib && item.icon.icon\n ? (pick(item.icon, [\n \"lib\",\n \"icon\",\n \"theme\",\n \"category\",\n \"prefix\",\n ]) as any)\n : null)}\n />\n <span className=\"platform-category-sidebar-menu-item-label\">\n {item.name}\n </span>\n </WrappedLink>\n </li>\n );\n}\n\nexport interface PlatformItemProps {\n item: MenuItemDataNormal;\n}\n\nexport function PlatformItem({ item }: PlatformItemProps) {\n return (\n <li>\n <WrappedLink\n type=\"plain\"\n {...(item.type === \"app\"\n ? {\n url: item.url,\n }\n : {\n href: item.url,\n target: \"_blank\",\n })}\n >\n <div className=\"platform-item\">\n <div className=\"platform-item-title\">\n <WrappedIcon\n className=\"platform-item-icon\"\n lib=\"easyops\"\n category=\"third-menu\"\n icon=\"deploy-orchestration-tasks-third-menu\"\n {...(item.menuIcon?.lib && item.menuIcon.icon\n ? (pick(item.menuIcon, [\n \"lib\",\n \"icon\",\n \"theme\",\n \"category\",\n \"prefix\",\n ]) as any)\n : null)}\n />\n <div className=\"platform-item-name\">{item.name}</div>\n </div>\n <div className=\"platform-item-description\">{item.description}</div>\n </div>\n </WrappedLink>\n </li>\n );\n}\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { WrappedIcon, WrappedLink } from \"./wrapped-bricks\";\nimport { useLaunchpadInfo } from \"./useLaunchpadInfo.js\";\nimport { MenuGroup, SidebarMenuItem } from \"./MenuGroup.js\";\nimport { LaunchpadsContext } from \"./LaunchpadContext.js\";\nimport {\n FavMenuItem,\n PlatformCategoryItem,\n SidebarMenuItemData,\n} from \"./interfaces\";\nimport {\n PlatformItem,\n PlatformCategorySidebarMenuItem,\n} from \"./PlatformCategory\";\nimport { getRuntime } from \"@next-core/runtime\";\nimport { CSSTransition, TransitionGroup } from \"react-transition-group\";\nimport { initializeReactI18n, useTranslation } from \"@next-core/i18n/react\";\nimport { K, NS, locales } from \"./i18n\";\n\ninitializeReactI18n(NS, locales);\n\nexport function Launchpad({ active }: { active?: boolean }) {\n const { t } = useTranslation(NS);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const [favorites, setFavorites] = useState<FavMenuItem[]>([]);\n const handleClickSearchBox = useCallback(() => {\n searchInputRef.current?.focus();\n }, []);\n const [platform, setPlatform] = useState(\"#all\");\n\n const showPlatformCategory = React.useMemo(\n () => getRuntime()?.getFeatureFlags()[\"launchpad-show-platform-category\"],\n []\n );\n\n const showScenarioCenter = React.useMemo(\n () => getRuntime()?.getFeatureFlags()[\"launchpad-show-scenario-center\"],\n []\n );\n\n const showSolutionCenter = React.useMemo(\n () => getRuntime()?.getFeatureFlags()[\"launchpad-show-solution-center\"],\n []\n );\n\n const showOpenPlatform = React.useMemo(\n () => getRuntime()?.getFeatureFlags()[\"launchpad-show-open-platform\"],\n []\n );\n\n const {\n loading,\n q,\n setQ,\n menuGroups,\n favorites: _favorites,\n loadingFavorites,\n recentVisits,\n pushRecentVisit,\n toggleStar,\n isStarred,\n platformCategories,\n } = useLaunchpadInfo(active);\n const searching = !!q;\n\n const handleSearch = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setQ(e.target.value);\n },\n [setQ]\n );\n\n const clearSearch = useCallback(() => {\n setQ(\"\");\n }, [setQ]);\n\n useEffect(() => {\n if (active) {\n searchInputRef.current?.focus();\n }\n }, [active]);\n\n const handlePlatformCategoryClick = useCallback(\n (item: PlatformCategoryItem) => {\n setPlatform(item.id);\n },\n []\n );\n\n const curCategory = useMemo(() => {\n return platformCategories.find((v) => v.id === platform);\n }, [platform, platformCategories]);\n\n useEffect(() => {\n if (_favorites.length > favorites.length) {\n // 新增无需等待直接更新列表\n setFavorites(_favorites);\n } else {\n // 删除操作需要等待动画执行完后才更新列表数据\n setTimeout(() => {\n setFavorites(_favorites);\n }, 300);\n }\n }, [_favorites, favorites.length]);\n\n return (\n <div className={classNames(\"launchpad\", { active })}>\n <LaunchpadsContext.Provider\n value={{\n searching,\n loadingFavorites,\n pushRecentVisit,\n toggleStar,\n isStarred,\n }}\n >\n <div className=\"sidebar\">\n <div className=\"union\">\n <div className=\"quick-nav\">\n <div className=\"quick-nav-label\">{t(K.QUICK_ACCESS)}</div>\n {/* <Loading loading={loading || loadingFavorites} /> */}\n <TransitionGroup>\n <ul className=\"sidebar-menu quick-nav-menu\">\n {favorites.map((item, index) => (\n <CSSTransition\n key={index}\n timeout={300}\n in={!!_favorites.find((i) => i.id === item.id)}\n classNames={{\n enter: \"fadeEnter\",\n enterActive: \"fadeEnterActive\",\n exit: \"fadeExit\",\n exitActive: \"fadeExitActive\",\n exitDone: \"fadeExitDone\",\n }}\n >\n <SidebarMenuItem\n key={index}\n item={item as SidebarMenuItemData}\n />\n </CSSTransition>\n ))}\n </ul>\n </TransitionGroup>\n </div>\n\n {showPlatformCategory && (\n <div className=\"platform-nav\">\n <div className=\"platform-nav-label\">{t(K.PLATFORM_BASE)}</div>\n <ul className=\"sidebar-menu platform-nav-menu\">\n {platformCategories.map((item, index) => (\n <PlatformCategorySidebarMenuItem\n key={index}\n onClick={handlePlatformCategoryClick}\n item={item}\n active={platform === item.id}\n />\n ))}\n </ul>\n </div>\n )}\n </div>\n {showScenarioCenter && (\n <div className=\"jump-nav\">\n <WrappedLink type=\"plain\" url={\"/portal/scenario\"}>\n <div className=\"jump-nav-label\">{t(K.SCENARIO_CENTER)}</div>\n <WrappedIcon lib=\"antd\" icon=\"right\" theme=\"outlined\" />\n </WrappedLink>\n </div>\n )}\n\n {showSolutionCenter && (\n <div className=\"jump-nav\">\n <WrappedLink type=\"plain\" url={\"/portal/solution\"}>\n <div className=\"jump-nav-label\">{t(K.SOLUTIONS)}</div>\n <WrappedIcon lib=\"antd\" icon=\"right\" theme=\"outlined\" />\n </WrappedLink>\n </div>\n )}\n {showOpenPlatform && (\n <div className=\"jump-nav\">\n <WrappedLink type=\"plain\" url={\"/developers\"}>\n <div className=\"jump-nav-label\">{t(K.OPEN_PLATFORM)}</div>\n <WrappedIcon lib=\"antd\" icon=\"right\" theme=\"outlined\" />\n </WrappedLink>\n </div>\n )}\n </div>\n <div className={classNames(\"content\", { loading })}>\n <Loading loading={loading} />\n {platform !== \"#all\" && (\n <div className=\"platform-category-name\">{curCategory?.name}</div>\n )}\n <div className=\"search-box\" onClick={handleClickSearchBox}>\n <WrappedIcon\n lib=\"fa\"\n icon=\"magnifying-glass\"\n className=\"search-icon\"\n />\n <input\n ref={searchInputRef}\n placeholder={t(K.SEARCH_PLACEHOLDER) as string}\n value={q}\n onChange={handleSearch}\n className=\"search-input\"\n />\n <WrappedIcon\n lib=\"antd\"\n theme=\"filled\"\n icon=\"close-circle\"\n className={classNames(\"search-clear\", { searching })}\n onClick={clearSearch}\n />\n </div>\n {platform === \"#all\" && (\n <div className={classNames({ empty: recentVisits.length === 0 })}>\n <div className=\"recent-visits-label\">{t(K.RECENT_VISITS)}</div>\n <ul className=\"recent-visits\">\n {recentVisits.map((item, index) => (\n <li key={index}>\n <WrappedLink\n onClick={() => pushRecentVisit(item)}\n {...(item.type === \"app\"\n ? {\n url: item.url,\n }\n : {\n href: item.url,\n target: \"_blank\",\n })}\n >\n <span>{item.name}</span>\n </WrappedLink>\n </li>\n ))}\n </ul>\n </div>\n )}\n {platform === \"#all\" && (\n <ul className=\"menu-groups\">\n {menuGroups.map((group) => (\n <MenuGroup\n key={group.name}\n name={group.localeName as string}\n items={group.items}\n />\n ))}\n </ul>\n )}\n {platform !== \"#all\" && (\n <ul\n className={classNames(\"platform-items\", {\n empty: curCategory?.items.length === 0,\n })}\n >\n {curCategory?.items.map((item, index) => (\n <PlatformItem item={item} key={index} />\n ))}\n </ul>\n )}\n </div>\n </LaunchpadsContext.Provider>\n </div>\n );\n}\n\nfunction Loading({ loading }: { loading: boolean }) {\n return (\n loading && (\n <div className=\"spinner\">\n <WrappedIcon lib=\"fa\" icon=\"spinner\" spinning />\n </div>\n )\n );\n}\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","toString","LaunchpadsContext","React","useLaunchpadContext","MenuGroup","_ref","name","items","className","map","item","type","MenuItemFolder","key","localeName","MenuItem","_ref2","_item$menuIcon","t","useTranslation","NS","loadingFavorites","readonly","pushRecentVisit","toggleStar","isStarred","starred","useMemo","handleStarClick","useCallback","handleClick","classNames","WrappedLink","_extends","onClick","url","href","WrappedIcon","lib","icon","menuIcon","pick","prefix","title","K","UNFAVORITE","FAVORITE","SidebarMenuItem","_ref3","_item$menuIcon2","target","handleRemoveStar","_ref4","searching","expanded","setExpanded","useState","searchingExpanded","setSearchingExpanded","toggle","previous","useEffect","actualExpanded","initializeReactI18n","locales","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","PlatformCategorySidebarMenuItem","_item$icon","active","category","PlatformItem","description","Launchpad","searchInputRef","useRef","favorites","setFavorites","handleClickSearchBox","_searchInputRef$curre","current","focus","platform","setPlatform","showPlatformCategory","_getRuntime","getRuntime","getFeatureFlags","showScenarioCenter","_getRuntime2","showSolutionCenter","_getRuntime3","showOpenPlatform","_getRuntime4","loading","q","setQ","menuGroups","_favorites","recentVisits","platformCategories","useLaunchpadInfo","handleSearch","e","value","clearSearch","_searchInputRef$curre2","handlePlatformCategoryClick","curCategory","find","v","length","setTimeout","Provider","QUICK_ACCESS","TransitionGroup","index","CSSTransition","timeout","in","i","enter","enterActive","exit","exitActive","exitDone","PLATFORM_BASE","SCENARIO_CENTER","theme","SOLUTIONS","OPEN_PLATFORM","Loading","ref","placeholder","SEARCH_PLACEHOLDER","onChange","empty","RECENT_VISITS","group","spinning"],"sourceRoot":""}