@next-bricks/nav 0.4.5 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +16 -8
- package/dist/chunks/{8629.b2b35c34.js → 1494.c531a091.js} +3 -2
- package/dist/chunks/1494.c531a091.js.LICENSE.txt +5 -0
- package/dist/chunks/1494.c531a091.js.map +1 -0
- package/dist/chunks/{8002.583b6e91.js → 2167.b20aa2c9.js} +3 -3
- package/dist/chunks/{8002.583b6e91.js.LICENSE.txt → 2167.b20aa2c9.js.LICENSE.txt} +0 -6
- package/dist/chunks/2167.b20aa2c9.js.map +1 -0
- package/dist/chunks/4049.4c9aff4f.js +2 -0
- package/dist/chunks/{4049.163294d1.js.map → 4049.4c9aff4f.js.map} +1 -1
- package/dist/chunks/443.9810e710.js +2 -0
- package/dist/chunks/{443.61c44b8a.js.map → 443.9810e710.js.map} +1 -1
- package/dist/chunks/{4443.b639b464.js → 4443.d435144a.js} +2 -2
- package/dist/chunks/{4443.b639b464.js.map → 4443.d435144a.js.map} +1 -1
- package/dist/chunks/5151.45d065f2.js +2 -0
- package/dist/chunks/{5151.522986b1.js.map → 5151.45d065f2.js.map} +1 -1
- package/dist/chunks/6051.370b2d16.js +2 -0
- package/dist/chunks/6051.370b2d16.js.map +1 -0
- package/dist/chunks/6522.6e6d5322.js +2 -0
- package/dist/chunks/6522.6e6d5322.js.map +1 -0
- package/dist/chunks/{7067.3381af14.js → 7067.0cebc199.js} +2 -2
- package/dist/chunks/{7067.3381af14.js.map → 7067.0cebc199.js.map} +1 -1
- package/dist/chunks/8142.4129ad4a.js +2 -0
- package/dist/chunks/8142.4129ad4a.js.map +1 -0
- package/dist/chunks/{8498.5b0bb4f2.js → 8498.a733d4eb.js} +2 -2
- package/dist/chunks/{8498.5b0bb4f2.js.map → 8498.a733d4eb.js.map} +1 -1
- package/dist/chunks/9549.53937b60.js +2 -0
- package/dist/chunks/{9549.706646b9.js.map → 9549.53937b60.js.map} +1 -1
- package/dist/chunks/9816.3e8c9258.js +3 -0
- package/dist/chunks/9816.3e8c9258.js.LICENSE.txt +5 -0
- package/dist/chunks/9816.3e8c9258.js.map +1 -0
- package/dist/chunks/{eo-launchpad-button-v2.43f1e987.js → eo-launchpad-button-v2.75648e36.js} +2 -2
- package/dist/chunks/{eo-launchpad-button-v2.43f1e987.js.map → eo-launchpad-button-v2.75648e36.js.map} +1 -1
- package/dist/chunks/{eo-launchpad-button.a6068456.js → eo-launchpad-button.5e4a1b39.js} +2 -2
- package/dist/chunks/{eo-launchpad-button.a6068456.js.map → eo-launchpad-button.5e4a1b39.js.map} +1 -1
- package/dist/chunks/{eo-nav-menu.062b6b9b.js → eo-nav-menu.ba307647.js} +3 -3
- package/dist/chunks/eo-nav-menu.ba307647.js.map +1 -0
- package/dist/chunks/launchpad-config.9ad0e318.js +3 -0
- package/dist/chunks/launchpad-config.9ad0e318.js.LICENSE.txt +5 -0
- package/dist/chunks/launchpad-config.9ad0e318.js.map +1 -0
- package/dist/chunks/main.d7ef29d1.js +2 -0
- package/dist/chunks/main.d7ef29d1.js.map +1 -0
- package/dist/index.e58e7c95.js +2 -0
- package/dist/index.e58e7c95.js.map +1 -0
- package/dist/manifest.json +31 -4
- package/dist/types.json +421 -0
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/launchpad/interfaces.d.ts +2 -0
- package/dist-types/launchpad-button-v2/LaunchpadContext.d.ts +5 -4
- package/dist-types/launchpad-button-v2/MenuGroup.d.ts +8 -6
- package/dist-types/launchpad-button-v2/api.d.ts +9 -4
- package/dist-types/launchpad-button-v2/constants.d.ts +2 -0
- package/dist-types/launchpad-button-v2/interfaces.d.ts +49 -1
- package/dist-types/launchpad-button-v2/search.d.ts +2 -2
- package/dist-types/launchpad-button-v2/useLaunchpadInfo.d.ts +7 -7
- package/dist-types/launchpad-config/MenuGroup.d.ts +17 -0
- package/dist-types/launchpad-config/index.d.ts +19 -0
- package/dist-types/launchpad-config/index.spec.d.ts +1 -0
- package/dist-types/launchpad-config/interfaces.d.ts +45 -0
- package/dist-types/launchpad-config/wrapped-bricks.d.ts +7 -0
- package/package.json +2 -2
- package/dist/chunks/4049.163294d1.js +0 -2
- package/dist/chunks/443.61c44b8a.js +0 -2
- package/dist/chunks/5151.522986b1.js +0 -2
- package/dist/chunks/5713.876d2602.js +0 -2
- package/dist/chunks/5713.876d2602.js.map +0 -1
- package/dist/chunks/6051.0e435bc8.js +0 -2
- package/dist/chunks/6051.0e435bc8.js.map +0 -1
- package/dist/chunks/8002.583b6e91.js.map +0 -1
- package/dist/chunks/8629.b2b35c34.js.map +0 -1
- package/dist/chunks/9308.0779ccf8.js +0 -2
- package/dist/chunks/9308.0779ccf8.js.map +0 -1
- package/dist/chunks/9549.706646b9.js +0 -2
- package/dist/chunks/9816.c1f84314.js +0 -2
- package/dist/chunks/9816.c1f84314.js.map +0 -1
- package/dist/chunks/eo-nav-menu.062b6b9b.js.map +0 -1
- package/dist/chunks/main.fc04a3c1.js +0 -2
- package/dist/chunks/main.fc04a3c1.js.map +0 -1
- package/dist/index.04f51534.js +0 -2
- package/dist/index.04f51534.js.map +0 -1
- package/dist-types/launchpad-button-v2/getMenuGroups.d.ts +0 -6
- /package/dist/chunks/{eo-nav-menu.062b6b9b.js.LICENSE.txt → eo-nav-menu.ba307647.js.LICENSE.txt} +0 -0
- /package/dist-types/{launchpad-button-v2/getMenuGroups.spec.d.ts → launchpad-config/MenuGroup.spec.d.ts} +0 -0
package/dist/types.json
CHANGED
|
@@ -1,4 +1,425 @@
|
|
|
1
1
|
{
|
|
2
|
+
"nav.launchpad-config": {
|
|
3
|
+
"properties": [
|
|
4
|
+
{
|
|
5
|
+
"name": "menuGroups",
|
|
6
|
+
"annotation": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"elementType": {
|
|
9
|
+
"type": "reference",
|
|
10
|
+
"typeName": {
|
|
11
|
+
"type": "identifier",
|
|
12
|
+
"name": "ConfigMenuGroup"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "actions",
|
|
19
|
+
"annotation": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"elementType": {
|
|
22
|
+
"type": "reference",
|
|
23
|
+
"typeName": {
|
|
24
|
+
"type": "identifier",
|
|
25
|
+
"name": "MenuAction"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"events": [
|
|
32
|
+
{
|
|
33
|
+
"name": "action.click",
|
|
34
|
+
"detail": {
|
|
35
|
+
"annotation": {
|
|
36
|
+
"type": "reference",
|
|
37
|
+
"typeName": {
|
|
38
|
+
"type": "identifier",
|
|
39
|
+
"name": "MenuActionEventDetail"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"methods": [],
|
|
46
|
+
"types": [
|
|
47
|
+
{
|
|
48
|
+
"type": "interface",
|
|
49
|
+
"name": "ConfigMenuGroup",
|
|
50
|
+
"body": [
|
|
51
|
+
{
|
|
52
|
+
"type": "propertySignature",
|
|
53
|
+
"key": {
|
|
54
|
+
"type": "identifier",
|
|
55
|
+
"name": "order"
|
|
56
|
+
},
|
|
57
|
+
"annotation": {
|
|
58
|
+
"type": "keyword",
|
|
59
|
+
"value": "number"
|
|
60
|
+
},
|
|
61
|
+
"optional": true,
|
|
62
|
+
"computed": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "propertySignature",
|
|
66
|
+
"key": {
|
|
67
|
+
"type": "identifier",
|
|
68
|
+
"name": "items"
|
|
69
|
+
},
|
|
70
|
+
"annotation": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"elementType": {
|
|
73
|
+
"type": "reference",
|
|
74
|
+
"typeName": {
|
|
75
|
+
"type": "identifier",
|
|
76
|
+
"name": "ConfigMenuItem"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"computed": false
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"extends": [
|
|
84
|
+
{
|
|
85
|
+
"type": "expressionWithTypeArguments",
|
|
86
|
+
"expression": {
|
|
87
|
+
"type": "identifier",
|
|
88
|
+
"name": "ConfigMenuBase"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "typeAlias",
|
|
95
|
+
"name": "ConfigMenuItem",
|
|
96
|
+
"annotation": {
|
|
97
|
+
"type": "union",
|
|
98
|
+
"types": [
|
|
99
|
+
{
|
|
100
|
+
"type": "reference",
|
|
101
|
+
"typeName": {
|
|
102
|
+
"type": "identifier",
|
|
103
|
+
"name": "ConfigMenuItemNormal"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "reference",
|
|
108
|
+
"typeName": {
|
|
109
|
+
"type": "identifier",
|
|
110
|
+
"name": "ConfigMenuItemDir"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "typeAlias",
|
|
118
|
+
"name": "ConfigMenuItemNormal",
|
|
119
|
+
"annotation": {
|
|
120
|
+
"type": "union",
|
|
121
|
+
"types": [
|
|
122
|
+
{
|
|
123
|
+
"type": "reference",
|
|
124
|
+
"typeName": {
|
|
125
|
+
"type": "identifier",
|
|
126
|
+
"name": "ConfigMenuItemApp"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "reference",
|
|
131
|
+
"typeName": {
|
|
132
|
+
"type": "identifier",
|
|
133
|
+
"name": "ConfigMenuItemCustom"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "interface",
|
|
141
|
+
"name": "ConfigMenuItemApp",
|
|
142
|
+
"body": [
|
|
143
|
+
{
|
|
144
|
+
"type": "propertySignature",
|
|
145
|
+
"key": {
|
|
146
|
+
"type": "identifier",
|
|
147
|
+
"name": "type"
|
|
148
|
+
},
|
|
149
|
+
"annotation": {
|
|
150
|
+
"type": "jsLiteral",
|
|
151
|
+
"value": "app"
|
|
152
|
+
},
|
|
153
|
+
"computed": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "propertySignature",
|
|
157
|
+
"key": {
|
|
158
|
+
"type": "identifier",
|
|
159
|
+
"name": "url"
|
|
160
|
+
},
|
|
161
|
+
"annotation": {
|
|
162
|
+
"type": "keyword",
|
|
163
|
+
"value": "string"
|
|
164
|
+
},
|
|
165
|
+
"computed": false
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"extends": [
|
|
169
|
+
{
|
|
170
|
+
"type": "expressionWithTypeArguments",
|
|
171
|
+
"expression": {
|
|
172
|
+
"type": "identifier",
|
|
173
|
+
"name": "ConfigMenuItemBase"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "interface",
|
|
180
|
+
"name": "ConfigMenuItemCustom",
|
|
181
|
+
"body": [
|
|
182
|
+
{
|
|
183
|
+
"type": "propertySignature",
|
|
184
|
+
"key": {
|
|
185
|
+
"type": "identifier",
|
|
186
|
+
"name": "type"
|
|
187
|
+
},
|
|
188
|
+
"annotation": {
|
|
189
|
+
"type": "jsLiteral",
|
|
190
|
+
"value": "custom"
|
|
191
|
+
},
|
|
192
|
+
"computed": false
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "propertySignature",
|
|
196
|
+
"key": {
|
|
197
|
+
"type": "identifier",
|
|
198
|
+
"name": "url"
|
|
199
|
+
},
|
|
200
|
+
"annotation": {
|
|
201
|
+
"type": "keyword",
|
|
202
|
+
"value": "string"
|
|
203
|
+
},
|
|
204
|
+
"computed": false
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"extends": [
|
|
208
|
+
{
|
|
209
|
+
"type": "expressionWithTypeArguments",
|
|
210
|
+
"expression": {
|
|
211
|
+
"type": "identifier",
|
|
212
|
+
"name": "ConfigMenuItemBase"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "interface",
|
|
219
|
+
"name": "ConfigMenuItemDir",
|
|
220
|
+
"body": [
|
|
221
|
+
{
|
|
222
|
+
"type": "propertySignature",
|
|
223
|
+
"key": {
|
|
224
|
+
"type": "identifier",
|
|
225
|
+
"name": "type"
|
|
226
|
+
},
|
|
227
|
+
"annotation": {
|
|
228
|
+
"type": "jsLiteral",
|
|
229
|
+
"value": "dir"
|
|
230
|
+
},
|
|
231
|
+
"computed": false
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "propertySignature",
|
|
235
|
+
"key": {
|
|
236
|
+
"type": "identifier",
|
|
237
|
+
"name": "items"
|
|
238
|
+
},
|
|
239
|
+
"annotation": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"elementType": {
|
|
242
|
+
"type": "reference",
|
|
243
|
+
"typeName": {
|
|
244
|
+
"type": "identifier",
|
|
245
|
+
"name": "ConfigMenuItemNormal"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"computed": false
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"extends": [
|
|
253
|
+
{
|
|
254
|
+
"type": "expressionWithTypeArguments",
|
|
255
|
+
"expression": {
|
|
256
|
+
"type": "identifier",
|
|
257
|
+
"name": "ConfigMenuItemBase"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "typeAlias",
|
|
264
|
+
"name": "MenuAction",
|
|
265
|
+
"annotation": {
|
|
266
|
+
"type": "union",
|
|
267
|
+
"types": [
|
|
268
|
+
{
|
|
269
|
+
"type": "reference",
|
|
270
|
+
"typeName": {
|
|
271
|
+
"type": "identifier",
|
|
272
|
+
"name": "MenuSimpleAction"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "reference",
|
|
277
|
+
"typeName": {
|
|
278
|
+
"type": "identifier",
|
|
279
|
+
"name": "MenuActionDivider"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"type": "interface",
|
|
287
|
+
"name": "MenuSimpleAction",
|
|
288
|
+
"body": [
|
|
289
|
+
{
|
|
290
|
+
"type": "propertySignature",
|
|
291
|
+
"key": {
|
|
292
|
+
"type": "identifier",
|
|
293
|
+
"name": "text"
|
|
294
|
+
},
|
|
295
|
+
"annotation": {
|
|
296
|
+
"type": "keyword",
|
|
297
|
+
"value": "string"
|
|
298
|
+
},
|
|
299
|
+
"computed": false
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "propertySignature",
|
|
303
|
+
"key": {
|
|
304
|
+
"type": "identifier",
|
|
305
|
+
"name": "event"
|
|
306
|
+
},
|
|
307
|
+
"annotation": {
|
|
308
|
+
"type": "keyword",
|
|
309
|
+
"value": "string"
|
|
310
|
+
},
|
|
311
|
+
"optional": true,
|
|
312
|
+
"computed": false
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"type": "propertySignature",
|
|
316
|
+
"key": {
|
|
317
|
+
"type": "identifier",
|
|
318
|
+
"name": "if"
|
|
319
|
+
},
|
|
320
|
+
"annotation": {
|
|
321
|
+
"type": "keyword",
|
|
322
|
+
"value": "unknown"
|
|
323
|
+
},
|
|
324
|
+
"optional": true,
|
|
325
|
+
"computed": false
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"type": "propertySignature",
|
|
329
|
+
"key": {
|
|
330
|
+
"type": "identifier",
|
|
331
|
+
"name": "danger"
|
|
332
|
+
},
|
|
333
|
+
"annotation": {
|
|
334
|
+
"type": "keyword",
|
|
335
|
+
"value": "boolean"
|
|
336
|
+
},
|
|
337
|
+
"optional": true,
|
|
338
|
+
"computed": false
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"type": "interface",
|
|
344
|
+
"name": "MenuActionDivider",
|
|
345
|
+
"body": [
|
|
346
|
+
{
|
|
347
|
+
"type": "propertySignature",
|
|
348
|
+
"key": {
|
|
349
|
+
"type": "identifier",
|
|
350
|
+
"name": "if"
|
|
351
|
+
},
|
|
352
|
+
"annotation": {
|
|
353
|
+
"type": "keyword",
|
|
354
|
+
"value": "unknown"
|
|
355
|
+
},
|
|
356
|
+
"optional": true,
|
|
357
|
+
"computed": false
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"type": "propertySignature",
|
|
361
|
+
"key": {
|
|
362
|
+
"type": "identifier",
|
|
363
|
+
"name": "type"
|
|
364
|
+
},
|
|
365
|
+
"annotation": {
|
|
366
|
+
"type": "jsLiteral",
|
|
367
|
+
"value": "divider"
|
|
368
|
+
},
|
|
369
|
+
"computed": false
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"type": "interface",
|
|
375
|
+
"name": "MenuActionEventDetail",
|
|
376
|
+
"body": [
|
|
377
|
+
{
|
|
378
|
+
"type": "propertySignature",
|
|
379
|
+
"key": {
|
|
380
|
+
"type": "identifier",
|
|
381
|
+
"name": "data"
|
|
382
|
+
},
|
|
383
|
+
"annotation": {
|
|
384
|
+
"type": "union",
|
|
385
|
+
"types": [
|
|
386
|
+
{
|
|
387
|
+
"type": "reference",
|
|
388
|
+
"typeName": {
|
|
389
|
+
"type": "identifier",
|
|
390
|
+
"name": "ConfigMenuGroup"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"type": "reference",
|
|
395
|
+
"typeName": {
|
|
396
|
+
"type": "identifier",
|
|
397
|
+
"name": "ConfigMenuItemDir"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"computed": false
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"type": "propertySignature",
|
|
406
|
+
"key": {
|
|
407
|
+
"type": "identifier",
|
|
408
|
+
"name": "action"
|
|
409
|
+
},
|
|
410
|
+
"annotation": {
|
|
411
|
+
"type": "reference",
|
|
412
|
+
"typeName": {
|
|
413
|
+
"type": "identifier",
|
|
414
|
+
"name": "MenuSimpleAction"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"computed": false
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
},
|
|
2
423
|
"eo-nav-menu": {
|
|
3
424
|
"properties": [
|
|
4
425
|
{
|
|
@@ -24,6 +24,7 @@ export interface DesktopItemApp {
|
|
|
24
24
|
type: "app";
|
|
25
25
|
id: string;
|
|
26
26
|
app: MicroApp;
|
|
27
|
+
instanceId?: string;
|
|
27
28
|
}
|
|
28
29
|
/** @internal */
|
|
29
30
|
export interface DesktopItemDir {
|
|
@@ -39,4 +40,5 @@ export interface DesktopItemCustom {
|
|
|
39
40
|
name: string;
|
|
40
41
|
url: string;
|
|
41
42
|
menuIcon?: MenuIcon;
|
|
43
|
+
instanceId?: string;
|
|
42
44
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { MenuItemDataLink, MenuItemDataNormal } from "./interfaces";
|
|
3
3
|
export interface LaunchpadContextData {
|
|
4
4
|
searching: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
loadingFavorites: boolean;
|
|
6
|
+
pushRecentVisit(item: MenuItemDataNormal): void;
|
|
7
|
+
toggleStar(item: MenuItemDataNormal | MenuItemDataLink): void;
|
|
8
|
+
isStarred(item: MenuItemDataNormal): boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const LaunchpadsContext: React.Context<LaunchpadContextData>;
|
|
10
11
|
export declare const useLaunchpadContext: () => LaunchpadContextData;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { MenuItemData, MenuItemDataNormal, SidebarMenuItemData } from "./interfaces";
|
|
3
3
|
export interface MenuGroupProps {
|
|
4
4
|
name: string;
|
|
5
|
-
items:
|
|
5
|
+
items: MenuItemData[];
|
|
6
6
|
}
|
|
7
7
|
export declare function MenuGroup({ name, items }: MenuGroupProps): React.JSX.Element;
|
|
8
8
|
export interface MenuItemProps {
|
|
9
|
-
item:
|
|
10
|
-
isSidebar?: boolean;
|
|
9
|
+
item: MenuItemDataNormal;
|
|
11
10
|
}
|
|
12
|
-
export
|
|
11
|
+
export interface SidebarMenuItemProps {
|
|
12
|
+
item: SidebarMenuItemData;
|
|
13
|
+
}
|
|
14
|
+
export declare function SidebarMenuItem({ item }: SidebarMenuItemProps): React.JSX.Element;
|
|
13
15
|
export interface MenuItemFolderProps {
|
|
14
16
|
name: string;
|
|
15
|
-
items:
|
|
17
|
+
items: MenuItemDataNormal[];
|
|
16
18
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { FavMenuItem, MenuGroupData, MenuItemDataCustom, MenuItemDataNormal, MicroAppWithInstanceId } from "./interfaces";
|
|
2
|
+
export declare function fetchLaunchpadInfo(): Promise<{
|
|
3
|
+
menuGroups: MenuGroupData[];
|
|
4
|
+
microAppsById: Map<string, MicroAppWithInstanceId>;
|
|
5
|
+
customLinksById: Map<string, MenuItemDataCustom>;
|
|
6
|
+
}>;
|
|
4
7
|
export declare function fetchFavorites(): Promise<FavMenuItem[]>;
|
|
5
|
-
export declare function favorite(item:
|
|
8
|
+
export declare function favorite(item: MenuItemDataNormal): Promise<{
|
|
9
|
+
instanceId?: string;
|
|
10
|
+
}>;
|
|
6
11
|
export declare function undoFavorite(item: FavMenuItem): Promise<void>;
|
|
@@ -1,7 +1,55 @@
|
|
|
1
|
+
import type { MicroApp } from "@next-core/types";
|
|
2
|
+
import type { MenuIcon } from "@next-shared/general/types";
|
|
3
|
+
export interface MenuGroupData {
|
|
4
|
+
name: string;
|
|
5
|
+
instanceId: string;
|
|
6
|
+
items: MenuItemData[];
|
|
7
|
+
}
|
|
8
|
+
export type MenuItemData = MenuItemDataNormal | MenuItemDataDir;
|
|
9
|
+
export type MenuItemDataNormal = MenuItemDataApp | MenuItemDataCustom;
|
|
10
|
+
export type SidebarMenuItemData = MenuItemDataNormal | MenuItemDataLink;
|
|
11
|
+
export interface MicroAppWithInstanceId extends MicroApp {
|
|
12
|
+
instanceId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface MenuItemDataApp {
|
|
15
|
+
type: "app";
|
|
16
|
+
name: string;
|
|
17
|
+
id: string;
|
|
18
|
+
instanceId: string;
|
|
19
|
+
url: string;
|
|
20
|
+
menuIcon?: MenuIcon;
|
|
21
|
+
}
|
|
22
|
+
export interface MenuItemDataCustom {
|
|
23
|
+
type: "custom";
|
|
24
|
+
name: string;
|
|
25
|
+
id: string;
|
|
26
|
+
instanceId: string;
|
|
27
|
+
url: string;
|
|
28
|
+
menuIcon?: MenuIcon;
|
|
29
|
+
}
|
|
30
|
+
export interface MenuItemDataDir {
|
|
31
|
+
type: "dir";
|
|
32
|
+
name: string;
|
|
33
|
+
id: string;
|
|
34
|
+
items: MenuItemDataNormal[];
|
|
35
|
+
}
|
|
36
|
+
export interface MenuItemDataLink {
|
|
37
|
+
type: "link";
|
|
38
|
+
favoriteId: string;
|
|
39
|
+
name: string;
|
|
40
|
+
url: string;
|
|
41
|
+
menuIcon?: MenuIcon;
|
|
42
|
+
}
|
|
1
43
|
export interface StoredMenuItem {
|
|
2
44
|
type: "app" | "custom";
|
|
3
45
|
id: string;
|
|
4
46
|
}
|
|
5
|
-
export interface FavMenuItem
|
|
47
|
+
export interface FavMenuItem {
|
|
6
48
|
favoriteId?: string;
|
|
49
|
+
type: "app" | "custom" | "link";
|
|
50
|
+
name: string;
|
|
51
|
+
id: string;
|
|
52
|
+
instanceId: string;
|
|
53
|
+
url: string;
|
|
54
|
+
menuIcon?: MenuIcon;
|
|
7
55
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function search(allMenuGroups:
|
|
1
|
+
import type { MenuGroupData } from "./interfaces";
|
|
2
|
+
export declare function search(allMenuGroups: MenuGroupData[], q: string): MenuGroupData[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { DesktopData, DesktopItemApp, DesktopItemCustom } from "../launchpad/interfaces";
|
|
3
2
|
import { DeferredService } from "../shared/DeferredService";
|
|
4
|
-
import type { FavMenuItem, StoredMenuItem } from "./interfaces";
|
|
3
|
+
import type { FavMenuItem, MenuGroupData, MenuItemDataLink, MenuItemDataNormal, StoredMenuItem } from "./interfaces";
|
|
5
4
|
export declare const deferredLaunchpadInfo: DeferredService;
|
|
6
5
|
export declare const deferredFavorites: DeferredService;
|
|
7
6
|
/**
|
|
@@ -15,11 +14,12 @@ export declare function useLaunchpadInfo(active?: boolean): {
|
|
|
15
14
|
loading: boolean;
|
|
16
15
|
q: string;
|
|
17
16
|
setQ: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
18
|
-
menuGroups:
|
|
17
|
+
menuGroups: MenuGroupData[];
|
|
19
18
|
loadingFavorites: boolean;
|
|
20
|
-
favorites:
|
|
21
|
-
recentVisits:
|
|
19
|
+
favorites: FavMenuItem[];
|
|
20
|
+
recentVisits: MenuItemDataNormal[];
|
|
22
21
|
pushRecentVisit: ({ type, id }: StoredMenuItem) => void;
|
|
23
|
-
isStarred: (
|
|
24
|
-
toggleStar: (item:
|
|
22
|
+
isStarred: (item: MenuItemDataNormal) => boolean;
|
|
23
|
+
toggleStar: (item: MenuItemDataNormal | MenuItemDataLink) => void;
|
|
25
24
|
};
|
|
25
|
+
export declare function matchFavorite(item: MenuItemDataNormal, fav: FavMenuItem): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ConfigMenuGroup, ConfigMenuItemDir, ConfigMenuItemNormal, MenuAction, MenuActionEventDetail } from "./interfaces";
|
|
3
|
+
export interface MenuGroupProps {
|
|
4
|
+
data: ConfigMenuGroup;
|
|
5
|
+
actions?: MenuAction[];
|
|
6
|
+
onActionClick?: (detail: MenuActionEventDetail) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function MenuGroup({ data, actions, onActionClick }: MenuGroupProps): React.JSX.Element;
|
|
9
|
+
export interface MenuItemProps {
|
|
10
|
+
data: ConfigMenuItemNormal;
|
|
11
|
+
}
|
|
12
|
+
export declare function MenuItem({ data }: MenuItemProps): React.JSX.Element;
|
|
13
|
+
export interface MenuItemFolderProps {
|
|
14
|
+
data: ConfigMenuItemDir;
|
|
15
|
+
actions?: MenuAction[];
|
|
16
|
+
onActionClick?: (detail: MenuActionEventDetail) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
import type { ConfigMenuGroup, MenuAction, MenuActionEventDetail } from "./interfaces";
|
|
5
|
+
/**
|
|
6
|
+
* 构件 `nav.launchpad-config`
|
|
7
|
+
*/
|
|
8
|
+
export declare class LaunchpadConfig extends ReactNextElement implements LaunchpadConfigProps {
|
|
9
|
+
#private;
|
|
10
|
+
accessor menuGroups: ConfigMenuGroup[] | undefined;
|
|
11
|
+
accessor actions: MenuAction[] | undefined;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export interface LaunchpadConfigProps {
|
|
15
|
+
menuGroups?: ConfigMenuGroup[];
|
|
16
|
+
actions?: MenuAction[];
|
|
17
|
+
onActionClick?: (detail: MenuActionEventDetail) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function LaunchpadConfigComponent({ menuGroups, actions, onActionClick, }: LaunchpadConfigProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { MenuIcon } from "@next-shared/general/types";
|
|
2
|
+
export interface ConfigMenuGroup extends ConfigMenuBase {
|
|
3
|
+
order?: number;
|
|
4
|
+
items: ConfigMenuItem[];
|
|
5
|
+
}
|
|
6
|
+
export type ConfigMenuItem = ConfigMenuItemNormal | ConfigMenuItemDir;
|
|
7
|
+
export type ConfigMenuItemNormal = ConfigMenuItemApp | ConfigMenuItemCustom;
|
|
8
|
+
export interface ConfigMenuItemApp extends ConfigMenuItemBase {
|
|
9
|
+
type: "app";
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ConfigMenuItemCustom extends ConfigMenuItemBase {
|
|
13
|
+
type: "custom";
|
|
14
|
+
url: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ConfigMenuItemDir extends ConfigMenuItemBase {
|
|
17
|
+
type: "dir";
|
|
18
|
+
items: ConfigMenuItemNormal[];
|
|
19
|
+
}
|
|
20
|
+
interface ConfigMenuItemBase extends ConfigMenuBase {
|
|
21
|
+
type: "app" | "custom" | "dir";
|
|
22
|
+
menuIcon?: MenuIcon;
|
|
23
|
+
position?: number;
|
|
24
|
+
}
|
|
25
|
+
interface ConfigMenuBase {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
instanceId: string;
|
|
29
|
+
}
|
|
30
|
+
export type MenuAction = MenuSimpleAction | MenuActionDivider;
|
|
31
|
+
export interface MenuSimpleAction {
|
|
32
|
+
text: string;
|
|
33
|
+
event?: string;
|
|
34
|
+
if?: unknown;
|
|
35
|
+
danger?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface MenuActionDivider {
|
|
38
|
+
if?: unknown;
|
|
39
|
+
type: "divider";
|
|
40
|
+
}
|
|
41
|
+
export interface MenuActionEventDetail {
|
|
42
|
+
data: ConfigMenuGroup | ConfigMenuItemDir;
|
|
43
|
+
action: MenuSimpleAction;
|
|
44
|
+
}
|
|
45
|
+
export {};
|