@peanut-admin/ui-vue 4.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,514 @@
1
+ import type { PropType } from 'vue';
2
+ export declare const EmptyState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ title: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ message: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ requestId: {
12
+ type: StringConstructor;
13
+ default: null;
14
+ };
15
+ retryAfter: {
16
+ type: PropType<string | null>;
17
+ default: null;
18
+ };
19
+ actionLabel: {
20
+ type: StringConstructor;
21
+ default: string | null;
22
+ };
23
+ onAction: {
24
+ type: PropType<() => void>;
25
+ default: null;
26
+ };
27
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
28
+ [key: string]: any;
29
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ action: () => true;
31
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ title: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ message: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ requestId: {
41
+ type: StringConstructor;
42
+ default: null;
43
+ };
44
+ retryAfter: {
45
+ type: PropType<string | null>;
46
+ default: null;
47
+ };
48
+ actionLabel: {
49
+ type: StringConstructor;
50
+ default: string | null;
51
+ };
52
+ onAction: {
53
+ type: PropType<() => void>;
54
+ default: null;
55
+ };
56
+ }>> & Readonly<{
57
+ onAction?: (() => any) | undefined;
58
+ }>, {
59
+ title: string;
60
+ message: string;
61
+ requestId: string;
62
+ retryAfter: string | null;
63
+ actionLabel: string;
64
+ onAction: () => void;
65
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
66
+ export declare const ForbiddenState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
67
+ title: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ message: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ requestId: {
76
+ type: StringConstructor;
77
+ default: null;
78
+ };
79
+ retryAfter: {
80
+ type: PropType<string | null>;
81
+ default: null;
82
+ };
83
+ actionLabel: {
84
+ type: StringConstructor;
85
+ default: string | null;
86
+ };
87
+ onAction: {
88
+ type: PropType<() => void>;
89
+ default: null;
90
+ };
91
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
92
+ [key: string]: any;
93
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
94
+ action: () => true;
95
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
96
+ title: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
100
+ message: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ requestId: {
105
+ type: StringConstructor;
106
+ default: null;
107
+ };
108
+ retryAfter: {
109
+ type: PropType<string | null>;
110
+ default: null;
111
+ };
112
+ actionLabel: {
113
+ type: StringConstructor;
114
+ default: string | null;
115
+ };
116
+ onAction: {
117
+ type: PropType<() => void>;
118
+ default: null;
119
+ };
120
+ }>> & Readonly<{
121
+ onAction?: (() => any) | undefined;
122
+ }>, {
123
+ title: string;
124
+ message: string;
125
+ requestId: string;
126
+ retryAfter: string | null;
127
+ actionLabel: string;
128
+ onAction: () => void;
129
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
130
+ export declare const NotFoundState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
131
+ title: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ message: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ };
139
+ requestId: {
140
+ type: StringConstructor;
141
+ default: null;
142
+ };
143
+ retryAfter: {
144
+ type: PropType<string | null>;
145
+ default: null;
146
+ };
147
+ actionLabel: {
148
+ type: StringConstructor;
149
+ default: string | null;
150
+ };
151
+ onAction: {
152
+ type: PropType<() => void>;
153
+ default: null;
154
+ };
155
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
156
+ [key: string]: any;
157
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
158
+ action: () => true;
159
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
160
+ title: {
161
+ type: StringConstructor;
162
+ default: string;
163
+ };
164
+ message: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ requestId: {
169
+ type: StringConstructor;
170
+ default: null;
171
+ };
172
+ retryAfter: {
173
+ type: PropType<string | null>;
174
+ default: null;
175
+ };
176
+ actionLabel: {
177
+ type: StringConstructor;
178
+ default: string | null;
179
+ };
180
+ onAction: {
181
+ type: PropType<() => void>;
182
+ default: null;
183
+ };
184
+ }>> & Readonly<{
185
+ onAction?: (() => any) | undefined;
186
+ }>, {
187
+ title: string;
188
+ message: string;
189
+ requestId: string;
190
+ retryAfter: string | null;
191
+ actionLabel: string;
192
+ onAction: () => void;
193
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
194
+ export declare const ModuleUnavailableState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
195
+ title: {
196
+ type: StringConstructor;
197
+ default: string;
198
+ };
199
+ message: {
200
+ type: StringConstructor;
201
+ default: string;
202
+ };
203
+ requestId: {
204
+ type: StringConstructor;
205
+ default: null;
206
+ };
207
+ retryAfter: {
208
+ type: PropType<string | null>;
209
+ default: null;
210
+ };
211
+ actionLabel: {
212
+ type: StringConstructor;
213
+ default: string | null;
214
+ };
215
+ onAction: {
216
+ type: PropType<() => void>;
217
+ default: null;
218
+ };
219
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
220
+ [key: string]: any;
221
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
222
+ action: () => true;
223
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
224
+ title: {
225
+ type: StringConstructor;
226
+ default: string;
227
+ };
228
+ message: {
229
+ type: StringConstructor;
230
+ default: string;
231
+ };
232
+ requestId: {
233
+ type: StringConstructor;
234
+ default: null;
235
+ };
236
+ retryAfter: {
237
+ type: PropType<string | null>;
238
+ default: null;
239
+ };
240
+ actionLabel: {
241
+ type: StringConstructor;
242
+ default: string | null;
243
+ };
244
+ onAction: {
245
+ type: PropType<() => void>;
246
+ default: null;
247
+ };
248
+ }>> & Readonly<{
249
+ onAction?: (() => any) | undefined;
250
+ }>, {
251
+ title: string;
252
+ message: string;
253
+ requestId: string;
254
+ retryAfter: string | null;
255
+ actionLabel: string;
256
+ onAction: () => void;
257
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
258
+ export declare const ConflictState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
259
+ title: {
260
+ type: StringConstructor;
261
+ default: string;
262
+ };
263
+ message: {
264
+ type: StringConstructor;
265
+ default: string;
266
+ };
267
+ requestId: {
268
+ type: StringConstructor;
269
+ default: null;
270
+ };
271
+ retryAfter: {
272
+ type: PropType<string | null>;
273
+ default: null;
274
+ };
275
+ actionLabel: {
276
+ type: StringConstructor;
277
+ default: string | null;
278
+ };
279
+ onAction: {
280
+ type: PropType<() => void>;
281
+ default: null;
282
+ };
283
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
284
+ [key: string]: any;
285
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
286
+ action: () => true;
287
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
288
+ title: {
289
+ type: StringConstructor;
290
+ default: string;
291
+ };
292
+ message: {
293
+ type: StringConstructor;
294
+ default: string;
295
+ };
296
+ requestId: {
297
+ type: StringConstructor;
298
+ default: null;
299
+ };
300
+ retryAfter: {
301
+ type: PropType<string | null>;
302
+ default: null;
303
+ };
304
+ actionLabel: {
305
+ type: StringConstructor;
306
+ default: string | null;
307
+ };
308
+ onAction: {
309
+ type: PropType<() => void>;
310
+ default: null;
311
+ };
312
+ }>> & Readonly<{
313
+ onAction?: (() => any) | undefined;
314
+ }>, {
315
+ title: string;
316
+ message: string;
317
+ requestId: string;
318
+ retryAfter: string | null;
319
+ actionLabel: string;
320
+ onAction: () => void;
321
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
322
+ export declare const RateLimitState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
323
+ title: {
324
+ type: StringConstructor;
325
+ default: string;
326
+ };
327
+ message: {
328
+ type: StringConstructor;
329
+ default: string;
330
+ };
331
+ requestId: {
332
+ type: StringConstructor;
333
+ default: null;
334
+ };
335
+ retryAfter: {
336
+ type: PropType<string | null>;
337
+ default: null;
338
+ };
339
+ actionLabel: {
340
+ type: StringConstructor;
341
+ default: string | null;
342
+ };
343
+ onAction: {
344
+ type: PropType<() => void>;
345
+ default: null;
346
+ };
347
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
348
+ [key: string]: any;
349
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
350
+ action: () => true;
351
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
352
+ title: {
353
+ type: StringConstructor;
354
+ default: string;
355
+ };
356
+ message: {
357
+ type: StringConstructor;
358
+ default: string;
359
+ };
360
+ requestId: {
361
+ type: StringConstructor;
362
+ default: null;
363
+ };
364
+ retryAfter: {
365
+ type: PropType<string | null>;
366
+ default: null;
367
+ };
368
+ actionLabel: {
369
+ type: StringConstructor;
370
+ default: string | null;
371
+ };
372
+ onAction: {
373
+ type: PropType<() => void>;
374
+ default: null;
375
+ };
376
+ }>> & Readonly<{
377
+ onAction?: (() => any) | undefined;
378
+ }>, {
379
+ title: string;
380
+ message: string;
381
+ requestId: string;
382
+ retryAfter: string | null;
383
+ actionLabel: string;
384
+ onAction: () => void;
385
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
386
+ export declare const ServiceUnavailableState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
387
+ title: {
388
+ type: StringConstructor;
389
+ default: string;
390
+ };
391
+ message: {
392
+ type: StringConstructor;
393
+ default: string;
394
+ };
395
+ requestId: {
396
+ type: StringConstructor;
397
+ default: null;
398
+ };
399
+ retryAfter: {
400
+ type: PropType<string | null>;
401
+ default: null;
402
+ };
403
+ actionLabel: {
404
+ type: StringConstructor;
405
+ default: string | null;
406
+ };
407
+ onAction: {
408
+ type: PropType<() => void>;
409
+ default: null;
410
+ };
411
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
412
+ [key: string]: any;
413
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
414
+ action: () => true;
415
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
416
+ title: {
417
+ type: StringConstructor;
418
+ default: string;
419
+ };
420
+ message: {
421
+ type: StringConstructor;
422
+ default: string;
423
+ };
424
+ requestId: {
425
+ type: StringConstructor;
426
+ default: null;
427
+ };
428
+ retryAfter: {
429
+ type: PropType<string | null>;
430
+ default: null;
431
+ };
432
+ actionLabel: {
433
+ type: StringConstructor;
434
+ default: string | null;
435
+ };
436
+ onAction: {
437
+ type: PropType<() => void>;
438
+ default: null;
439
+ };
440
+ }>> & Readonly<{
441
+ onAction?: (() => any) | undefined;
442
+ }>, {
443
+ title: string;
444
+ message: string;
445
+ requestId: string;
446
+ retryAfter: string | null;
447
+ actionLabel: string;
448
+ onAction: () => void;
449
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
450
+ export declare const SessionExpiredState: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
451
+ title: {
452
+ type: StringConstructor;
453
+ default: string;
454
+ };
455
+ message: {
456
+ type: StringConstructor;
457
+ default: string;
458
+ };
459
+ requestId: {
460
+ type: StringConstructor;
461
+ default: null;
462
+ };
463
+ retryAfter: {
464
+ type: PropType<string | null>;
465
+ default: null;
466
+ };
467
+ actionLabel: {
468
+ type: StringConstructor;
469
+ default: string | null;
470
+ };
471
+ onAction: {
472
+ type: PropType<() => void>;
473
+ default: null;
474
+ };
475
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
476
+ [key: string]: any;
477
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
478
+ action: () => true;
479
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
480
+ title: {
481
+ type: StringConstructor;
482
+ default: string;
483
+ };
484
+ message: {
485
+ type: StringConstructor;
486
+ default: string;
487
+ };
488
+ requestId: {
489
+ type: StringConstructor;
490
+ default: null;
491
+ };
492
+ retryAfter: {
493
+ type: PropType<string | null>;
494
+ default: null;
495
+ };
496
+ actionLabel: {
497
+ type: StringConstructor;
498
+ default: string | null;
499
+ };
500
+ onAction: {
501
+ type: PropType<() => void>;
502
+ default: null;
503
+ };
504
+ }>> & Readonly<{
505
+ onAction?: (() => any) | undefined;
506
+ }>, {
507
+ title: string;
508
+ message: string;
509
+ requestId: string;
510
+ retryAfter: string | null;
511
+ actionLabel: string;
512
+ onAction: () => void;
513
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
514
+ //# sourceMappingURL=states.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"states.d.ts","sourceRoot":"","sources":["../src/states.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAyEpC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;cAtDa,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;cAFpB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,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AO,MAAM,cAAc;;;;;;;;;;;;;;cA7FS,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;cAFpB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;oBAAL,IAAI;4EAkGtD,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;cAtGA,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;cAFpB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;oBAAL,IAAI;4EA4GtD,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;cAhHI,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;cAFpB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;cAEvB,QAAQ,CAAC,MAAM,IAAI,CAAC;;;;;;;;;;;oBAAL,IAAI;4EAsHtD,CAAC"}
package/dist/states.js ADDED
@@ -0,0 +1,81 @@
1
+ import { ElButton } from 'element-plus';
2
+ import { defineComponent, h } from 'vue';
3
+ const createStateComponent = (name, state, defaults) => defineComponent({
4
+ name,
5
+ props: {
6
+ title: { type: String, default: defaults.title },
7
+ message: { type: String, default: defaults.message },
8
+ requestId: { type: String, default: null },
9
+ retryAfter: { type: String, default: null },
10
+ actionLabel: { type: String, default: defaults.actionLabel ?? null },
11
+ onAction: { type: Function, default: null },
12
+ },
13
+ emits: {
14
+ action: () => true,
15
+ },
16
+ setup(props, { emit, slots }) {
17
+ return () => h('section', {
18
+ 'class': [
19
+ 'pa-state',
20
+ `pa-state--${name.replace(/State$/, '').toLowerCase()}`,
21
+ ],
22
+ 'data-state': state,
23
+ 'role': 'status',
24
+ 'aria-live': 'polite',
25
+ }, [
26
+ h('h2', { class: 'pa-state__title' }, props.title),
27
+ h('p', { class: 'pa-state__message' }, props.message),
28
+ props.requestId === null
29
+ ? null
30
+ : h('p', { class: 'pa-state__request-id' }, `Request ID: ${props.requestId}`),
31
+ props.retryAfter === null
32
+ ? null
33
+ : h('p', { class: 'pa-state__retry-after' }, `Retry after: ${props.retryAfter}`),
34
+ slots.default?.(),
35
+ props.actionLabel === null
36
+ ? null
37
+ : h(ElButton, {
38
+ onClick: () => {
39
+ emit('action');
40
+ },
41
+ }, () => props.actionLabel),
42
+ ]);
43
+ },
44
+ });
45
+ export const EmptyState = createStateComponent('EmptyState', 'empty', {
46
+ title: 'No data',
47
+ message: 'There is nothing to display.',
48
+ });
49
+ export const ForbiddenState = createStateComponent('ForbiddenState', 'forbidden', {
50
+ title: 'Access denied',
51
+ message: 'You do not have permission to view this page.',
52
+ });
53
+ export const NotFoundState = createStateComponent('NotFoundState', 'not-found', {
54
+ title: 'Not found',
55
+ message: 'The requested resource is unavailable.',
56
+ });
57
+ export const ModuleUnavailableState = createStateComponent('ModuleUnavailableState', 'module-unavailable', {
58
+ title: 'Module unavailable',
59
+ message: 'This module is currently unavailable.',
60
+ actionLabel: 'Retry',
61
+ });
62
+ export const ConflictState = createStateComponent('ConflictState', 'conflict', {
63
+ title: 'Content changed',
64
+ message: 'Reload the latest version before continuing.',
65
+ actionLabel: 'Reload',
66
+ });
67
+ export const RateLimitState = createStateComponent('RateLimitState', 'rate-limit', {
68
+ title: 'Too many requests',
69
+ message: 'Wait before trying again.',
70
+ });
71
+ export const ServiceUnavailableState = createStateComponent('ServiceUnavailableState', 'service-unavailable', {
72
+ title: 'Service unavailable',
73
+ message: 'The service is temporarily unavailable.',
74
+ actionLabel: 'Retry',
75
+ });
76
+ export const SessionExpiredState = createStateComponent('SessionExpiredState', 'session-expired', {
77
+ title: 'Session expired',
78
+ message: 'Sign in again to continue.',
79
+ actionLabel: 'Sign in',
80
+ });
81
+ //# sourceMappingURL=states.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"states.js","sourceRoot":"","sources":["../src/states.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASzC,MAAM,oBAAoB,GAAG,CAC3B,IAAY,EACZ,KAAa,EACb,QAAuB,EACvB,EAAE,CACF,eAAe,CAAC;IACd,IAAI;IACJ,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE;QAChD,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE;QACpD,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1C,UAAU,EAAE,EAAE,IAAI,EAAE,MAAiC,EAAE,OAAO,EAAE,IAAI,EAAE;QACtE,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,WAAW,IAAI,IAAI,EAAE;QACpE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAgC,EAAE,OAAO,EAAE,IAAI,EAAE;KACpE;IACD,KAAK,EAAE;QACL,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;KACnB;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;QAC1B,OAAO,GAAG,EAAE,CACV,CAAC,CACC,SAAS,EACT;YACE,OAAO,EAAE;gBACP,UAAU;gBACV,aAAa,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE;aACxD;YACD,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C,MAAM,aAAa,GAAG,oBAAoB,CAC/C,eAAe,EACf,WAAW,EACX;IACE,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,wCAAwC;CAClD,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CACxD,wBAAwB,EACxB,oBAAoB,EACpB;IACE,KAAK,EAAE,oBAAoB;IAC3B,OAAO,EAAE,uCAAuC;IAChD,WAAW,EAAE,OAAO;CACrB,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC,eAAe,EAAE,UAAU,EAAE;IAC7E,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,8CAA8C;IACvD,WAAW,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAChD,gBAAgB,EAChB,YAAY,EACZ;IACE,KAAK,EAAE,mBAAmB;IAC1B,OAAO,EAAE,2BAA2B;CACrC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CACzD,yBAAyB,EACzB,qBAAqB,EACrB;IACE,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,yCAAyC;IAClD,WAAW,EAAE,OAAO;CACrB,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CACrD,qBAAqB,EACrB,iBAAiB,EACjB;IACE,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,4BAA4B;IACrC,WAAW,EAAE,SAAS;CACvB,CACF,CAAC"}
package/dist/tabs.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ /** Framework-neutral route data required by an admin workspace tab. */
2
+ export interface ShellTabRoute {
3
+ name: unknown;
4
+ fullPath: string;
5
+ query?: unknown;
6
+ meta?: {
7
+ locale?: string;
8
+ ignoreCache?: boolean | undefined;
9
+ };
10
+ }
11
+ export interface ShellTab {
12
+ title: string;
13
+ name: string;
14
+ fullPath: string;
15
+ query?: unknown;
16
+ ignoreCache?: boolean | undefined;
17
+ }
18
+ export interface ShellTabState {
19
+ tagList: ShellTab[];
20
+ cacheTabList: Set<string>;
21
+ }
22
+ export declare const tabFromRoute: (route: ShellTabRoute) => ShellTab;
23
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KACnC,CAAC;CACH;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,aAAa,KAAG,QAMlD,CAAC"}
package/dist/tabs.js ADDED
@@ -0,0 +1,8 @@
1
+ export const tabFromRoute = (route) => ({
2
+ title: route.meta?.locale || '',
3
+ name: String(route.name),
4
+ fullPath: route.fullPath,
5
+ query: route.query,
6
+ ignoreCache: route.meta?.ignoreCache,
7
+ });
8
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAoB,EAAY,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE;IAC/B,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,WAAW,EAAE,KAAK,CAAC,IAAI,EAAE,WAAW;CACrC,CAAC,CAAC"}