@polyv/answer-card-ui-launch 2.1.0-rc-20260312.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/index.es.d.ts ADDED
@@ -0,0 +1,1036 @@
1
+ import { AnswerCard } from '@polyv/answer-card-sdk';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
+ import { DefineComponent } from 'vue';
5
+ import { ExtractPropTypes } from 'vue';
6
+ import { QuestionAnswerType } from '@polyv/questionnaire-sdk';
7
+ import { QuestionContent } from '@polyv/answer-card-sdk';
8
+ import { QuestionItem } from '@polyv/questionnaire-sdk';
9
+ import { QuestionStatus } from '@polyv/answer-card-sdk';
10
+ import { QuestionType } from '@polyv/answer-card-sdk';
11
+ import { QuestionTypeEnum } from '@polyv/answer-card-sdk';
12
+ import { Ref } from 'vue';
13
+ import { Statistics } from '@polyv/answer-card-sdk';
14
+ import { ValidatorFunction } from 'vue-types/dist/types';
15
+ import { VueProps } from '@polyv/vue-components';
16
+ import { VueTypeValidableDef } from 'vue-types';
17
+ import { VueTypeValidableDef as VueTypeValidableDef_2 } from 'vue-types';
18
+ import { WritableComputedRef } from 'vue';
19
+
20
+ export declare const AnswerCardLaunchDetail: DefineComponent< {
21
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
22
+ required: true;
23
+ };
24
+ questionId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
25
+ default: string;
26
+ } & {
27
+ required: true;
28
+ };
29
+ question: VueTypeValidableDef<QuestionContent, ValidatorFunction<QuestionContent>>;
30
+ launchStatus: VueTypeValidableDef<string, ValidatorFunction<string>> & {
31
+ default: string;
32
+ } & {
33
+ default: string;
34
+ };
35
+ launchSubmittedCount: VueTypeValidableDef<number, ValidatorFunction<number>> & {
36
+ default: number;
37
+ } & {
38
+ default: number;
39
+ };
40
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
41
+ default: boolean;
42
+ } & {
43
+ default: boolean;
44
+ };
45
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
46
+ default: boolean;
47
+ } & {
48
+ default: boolean;
49
+ };
50
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
51
+ default: string;
52
+ } & {
53
+ default: string;
54
+ };
55
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
56
+ default: boolean;
57
+ } & {
58
+ default: boolean;
59
+ };
60
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
61
+ default: number;
62
+ } & {
63
+ default: number;
64
+ };
65
+ }, {
66
+ refreshDetail: () => Promise<void>;
67
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
68
+ input: (_value: boolean) => void;
69
+ stop: (_questionId: string) => void;
70
+ close: () => void;
71
+ start: (_questionId: string) => void;
72
+ }, string, Readonly<ExtractPropTypes< {
73
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
74
+ required: true;
75
+ };
76
+ questionId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
77
+ default: string;
78
+ } & {
79
+ required: true;
80
+ };
81
+ question: VueTypeValidableDef<QuestionContent, ValidatorFunction<QuestionContent>>;
82
+ launchStatus: VueTypeValidableDef<string, ValidatorFunction<string>> & {
83
+ default: string;
84
+ } & {
85
+ default: string;
86
+ };
87
+ launchSubmittedCount: VueTypeValidableDef<number, ValidatorFunction<number>> & {
88
+ default: number;
89
+ } & {
90
+ default: number;
91
+ };
92
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
93
+ default: boolean;
94
+ } & {
95
+ default: boolean;
96
+ };
97
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
98
+ default: boolean;
99
+ } & {
100
+ default: boolean;
101
+ };
102
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
103
+ default: string;
104
+ } & {
105
+ default: string;
106
+ };
107
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
108
+ default: boolean;
109
+ } & {
110
+ default: boolean;
111
+ };
112
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
113
+ default: number;
114
+ } & {
115
+ default: number;
116
+ };
117
+ }>>, {
118
+ questionId: string;
119
+ defaultLimitTimeAnswer: boolean;
120
+ canStart: boolean;
121
+ cantStartTips: string;
122
+ defaultLimitDuration: number;
123
+ value: boolean;
124
+ launchStatus: string;
125
+ launchSubmittedCount: number;
126
+ }>;
127
+
128
+ declare type AnswerCardLaunchDetailEmit = {
129
+ (event: "input", value: boolean): void;
130
+ (event: "close"): void;
131
+ (event: "stop", questionId: string): void;
132
+ (event: "start", questionId: string): void;
133
+ };
134
+
135
+ export declare const answerCardLaunchDetailEmits: {
136
+ input: (_value: boolean) => boolean;
137
+ close: () => boolean;
138
+ stop: (_questionId: string) => boolean;
139
+ start: (_questionId: string) => boolean;
140
+ };
141
+
142
+ export declare const answerCardLaunchDetailProps: () => {
143
+ /** 答题卡 SDK 实例。 */
144
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
145
+ required: true;
146
+ };
147
+ /** 当前详情题目 id。 */
148
+ questionId: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
149
+ default: string;
150
+ } & {
151
+ required: true;
152
+ };
153
+ /** 题目内容 */
154
+ question: VueTypeValidableDef_2<QuestionContent, ValidatorFunction<QuestionContent>>;
155
+ /** 外层透传的发题状态。 */
156
+ launchStatus: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
157
+ default: string;
158
+ } & {
159
+ default: string;
160
+ };
161
+ /** 外层透传的提交人数(进行中态使用)。 */
162
+ launchSubmittedCount: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
163
+ default: number;
164
+ } & {
165
+ default: number;
166
+ };
167
+ /** 详情弹窗显隐(v-model)。 */
168
+ value: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
169
+ default: boolean;
170
+ } & {
171
+ default: boolean;
172
+ };
173
+ /** 是否允许发题,由外层权限控制。 */
174
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
175
+ default: boolean;
176
+ } & {
177
+ default: boolean;
178
+ };
179
+ /** 不允许发题时提示文案。 */
180
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
181
+ default: string;
182
+ } & {
183
+ default: string;
184
+ };
185
+ /** 是否默认开启限时。 */
186
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
187
+ default: boolean;
188
+ } & {
189
+ default: boolean;
190
+ };
191
+ /** 默认限时秒数。 */
192
+ defaultLimitDuration: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
193
+ default: number;
194
+ } & {
195
+ default: number;
196
+ };
197
+ };
198
+
199
+ export declare const AnswerCardLaunchList: DefineComponent< {
200
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
201
+ required: true;
202
+ };
203
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
204
+ default: boolean;
205
+ } & {
206
+ default: boolean;
207
+ };
208
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
209
+ default: string;
210
+ } & {
211
+ default: string;
212
+ };
213
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
214
+ default: boolean;
215
+ } & {
216
+ default: boolean;
217
+ };
218
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
219
+ default: number;
220
+ } & {
221
+ default: number;
222
+ };
223
+ }, {
224
+ refreshList: () => Promise<void>;
225
+ getCardById: typeof getCardById;
226
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
227
+ "view-detail": (_card: LaunchCardItem) => void;
228
+ refresh: (_list: LaunchCardItem[]) => void;
229
+ }, string, Readonly<ExtractPropTypes< {
230
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
231
+ required: true;
232
+ };
233
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
234
+ default: boolean;
235
+ } & {
236
+ default: boolean;
237
+ };
238
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
239
+ default: string;
240
+ } & {
241
+ default: string;
242
+ };
243
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
244
+ default: boolean;
245
+ } & {
246
+ default: boolean;
247
+ };
248
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
249
+ default: number;
250
+ } & {
251
+ default: number;
252
+ };
253
+ }>>, {
254
+ defaultLimitTimeAnswer: boolean;
255
+ canStart: boolean;
256
+ cantStartTips: string;
257
+ defaultLimitDuration: number;
258
+ }>;
259
+
260
+ declare type AnswerCardLaunchListEmit = {
261
+ (event: 'view-detail', card: LaunchCardItem): void;
262
+ (event: 'refresh', list: LaunchCardItem[]): void;
263
+ };
264
+
265
+ export declare const answerCardLaunchListEmits: {
266
+ 'view-detail': (_card: LaunchCardItem) => boolean;
267
+ refresh: (_list: LaunchCardItem[]) => boolean;
268
+ };
269
+
270
+ export declare const answerCardLaunchListProps: () => {
271
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
272
+ required: true;
273
+ };
274
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
275
+ default: boolean;
276
+ } & {
277
+ default: boolean;
278
+ };
279
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
280
+ default: string;
281
+ } & {
282
+ default: string;
283
+ };
284
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
285
+ default: boolean;
286
+ } & {
287
+ default: boolean;
288
+ };
289
+ defaultLimitDuration: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
290
+ default: number;
291
+ } & {
292
+ default: number;
293
+ };
294
+ };
295
+
296
+ export declare const AnswerCardLaunchPanel: DefineComponent< {
297
+ value: {
298
+ type: BooleanConstructor;
299
+ default: boolean;
300
+ };
301
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
302
+ required: true;
303
+ };
304
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
305
+ default: boolean;
306
+ } & {
307
+ default: boolean;
308
+ };
309
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
310
+ default: string;
311
+ } & {
312
+ default: string;
313
+ };
314
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
315
+ default: boolean;
316
+ } & {
317
+ default: boolean;
318
+ };
319
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
320
+ default: number;
321
+ } & {
322
+ default: number;
323
+ };
324
+ }, {
325
+ openPanel: () => void;
326
+ refreshCardList: typeof refreshCardList;
327
+ refreshTemplateList: typeof refreshTemplateList;
328
+ openDetail: (question: LaunchCardItem | string, mode?: LaunchDetailMode) => void;
329
+ openQuick: () => void;
330
+ closePanel: () => void;
331
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
332
+ input: (_value: boolean) => void;
333
+ close: () => void;
334
+ }, string, Readonly<ExtractPropTypes< {
335
+ value: {
336
+ type: BooleanConstructor;
337
+ default: boolean;
338
+ };
339
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
340
+ required: true;
341
+ };
342
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
343
+ default: boolean;
344
+ } & {
345
+ default: boolean;
346
+ };
347
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
348
+ default: string;
349
+ } & {
350
+ default: string;
351
+ };
352
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
353
+ default: boolean;
354
+ } & {
355
+ default: boolean;
356
+ };
357
+ defaultLimitDuration: VueTypeValidableDef<number, ValidatorFunction<number>> & {
358
+ default: number;
359
+ } & {
360
+ default: number;
361
+ };
362
+ }>>, {
363
+ defaultLimitTimeAnswer: boolean;
364
+ canStart: boolean;
365
+ cantStartTips: string;
366
+ defaultLimitDuration: number;
367
+ value: boolean;
368
+ }>;
369
+
370
+ declare type AnswerCardLaunchPanelEmit = {
371
+ (event: 'input', value: boolean): void;
372
+ (event: 'close'): void;
373
+ };
374
+
375
+ export declare const answerCardLaunchPanelEmits: {
376
+ input: (_value: boolean) => boolean;
377
+ close: () => boolean;
378
+ };
379
+
380
+ export declare const answerCardLaunchPanelProps: () => {
381
+ /** 面板显隐(v-model)。 */
382
+ value: {
383
+ type: BooleanConstructor;
384
+ default: boolean;
385
+ };
386
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
387
+ required: true;
388
+ };
389
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
390
+ default: boolean;
391
+ } & {
392
+ default: boolean;
393
+ };
394
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
395
+ default: string;
396
+ } & {
397
+ default: string;
398
+ };
399
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
400
+ default: boolean;
401
+ } & {
402
+ default: boolean;
403
+ };
404
+ defaultLimitDuration: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
405
+ default: number;
406
+ } & {
407
+ default: number;
408
+ };
409
+ };
410
+
411
+ export declare const answerCardLaunchProps: () => {
412
+ /** 答题卡 SDK 实例。 */
413
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
414
+ required: true;
415
+ };
416
+ /** 是否允许发题,由外层业务权限控制。 */
417
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
418
+ default: boolean;
419
+ } & {
420
+ default: boolean;
421
+ };
422
+ /** 不允许发题时的提示文案。 */
423
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
424
+ default: string;
425
+ } & {
426
+ default: string;
427
+ };
428
+ /** 新发题是否默认开启限时。 */
429
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
430
+ default: boolean;
431
+ } & {
432
+ default: boolean;
433
+ };
434
+ /** 默认限时时长(秒)。 */
435
+ defaultLimitDuration: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
436
+ default: number;
437
+ } & {
438
+ default: number;
439
+ };
440
+ };
441
+
442
+ export declare const AnswerCardLaunchQuick: DefineComponent< {
443
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
444
+ required: true;
445
+ };
446
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
447
+ default: boolean;
448
+ } & {
449
+ default: boolean;
450
+ };
451
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
452
+ default: string;
453
+ } & {
454
+ default: string;
455
+ };
456
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
457
+ default: boolean;
458
+ } & {
459
+ default: boolean;
460
+ };
461
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
462
+ default: boolean;
463
+ } & {
464
+ default: boolean;
465
+ };
466
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
467
+ input: (_value: boolean) => void;
468
+ close: () => void;
469
+ sent: (_questionId: string) => void;
470
+ }, string, Readonly<ExtractPropTypes< {
471
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
472
+ required: true;
473
+ };
474
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
475
+ default: boolean;
476
+ } & {
477
+ default: boolean;
478
+ };
479
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
480
+ default: string;
481
+ } & {
482
+ default: string;
483
+ };
484
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
485
+ default: boolean;
486
+ } & {
487
+ default: boolean;
488
+ };
489
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
490
+ default: boolean;
491
+ } & {
492
+ default: boolean;
493
+ };
494
+ }>>, {
495
+ defaultLimitTimeAnswer: boolean;
496
+ canStart: boolean;
497
+ cantStartTips: string;
498
+ value: boolean;
499
+ }>;
500
+
501
+ export declare const AnswerCardLaunchQuickDetail: DefineComponent< {
502
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
503
+ required: true;
504
+ };
505
+ questionId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
506
+ default: string;
507
+ } & {
508
+ required: true;
509
+ };
510
+ question: VueTypeValidableDef<QuestionContent, ValidatorFunction<QuestionContent>>;
511
+ launchStatus: VueTypeValidableDef<string, ValidatorFunction<string>> & {
512
+ default: string;
513
+ } & {
514
+ default: string;
515
+ };
516
+ launchSubmittedCount: VueTypeValidableDef<number, ValidatorFunction<number>> & {
517
+ default: number;
518
+ } & {
519
+ default: number;
520
+ };
521
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
522
+ default: boolean;
523
+ } & {
524
+ default: boolean;
525
+ };
526
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
527
+ default: boolean;
528
+ } & {
529
+ default: boolean;
530
+ };
531
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
532
+ default: string;
533
+ } & {
534
+ default: string;
535
+ };
536
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
537
+ default: boolean;
538
+ } & {
539
+ default: boolean;
540
+ };
541
+ }, {
542
+ refreshDetail: () => Promise<void>;
543
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
544
+ input: (_value: boolean) => void;
545
+ stop: (_questionId: string) => void;
546
+ close: () => void;
547
+ start: (_questionId: string) => void;
548
+ }, string, Readonly<ExtractPropTypes< {
549
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
550
+ required: true;
551
+ };
552
+ questionId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
553
+ default: string;
554
+ } & {
555
+ required: true;
556
+ };
557
+ question: VueTypeValidableDef<QuestionContent, ValidatorFunction<QuestionContent>>;
558
+ launchStatus: VueTypeValidableDef<string, ValidatorFunction<string>> & {
559
+ default: string;
560
+ } & {
561
+ default: string;
562
+ };
563
+ launchSubmittedCount: VueTypeValidableDef<number, ValidatorFunction<number>> & {
564
+ default: number;
565
+ } & {
566
+ default: number;
567
+ };
568
+ value: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
569
+ default: boolean;
570
+ } & {
571
+ default: boolean;
572
+ };
573
+ canStart: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
574
+ default: boolean;
575
+ } & {
576
+ default: boolean;
577
+ };
578
+ cantStartTips: VueTypeValidableDef<string, ValidatorFunction<string>> & {
579
+ default: string;
580
+ } & {
581
+ default: string;
582
+ };
583
+ defaultLimitTimeAnswer: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
584
+ default: boolean;
585
+ } & {
586
+ default: boolean;
587
+ };
588
+ }>>, {
589
+ questionId: string;
590
+ defaultLimitTimeAnswer: boolean;
591
+ canStart: boolean;
592
+ cantStartTips: string;
593
+ value: boolean;
594
+ launchStatus: string;
595
+ launchSubmittedCount: number;
596
+ }>;
597
+
598
+ declare type AnswerCardLaunchQuickDetailEmit = {
599
+ (event: 'input', value: boolean): void;
600
+ (event: 'close'): void;
601
+ (event: 'stop', questionId: string): void;
602
+ (event: 'start', questionId: string): void;
603
+ };
604
+
605
+ export declare const answerCardLaunchQuickDetailEmits: {
606
+ input: (_value: boolean) => boolean;
607
+ close: () => boolean;
608
+ stop: (_questionId: string) => boolean;
609
+ start: (_questionId: string) => boolean;
610
+ };
611
+
612
+ export declare const answerCardLaunchQuickDetailProps: () => {
613
+ /** 答题卡 SDK 实例。 */
614
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
615
+ required: true;
616
+ };
617
+ /** 当前详情题目 id。 */
618
+ questionId: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
619
+ default: string;
620
+ } & {
621
+ required: true;
622
+ };
623
+ /** 题目内容(外层透传)。 */
624
+ question: VueTypeValidableDef_2<QuestionContent, ValidatorFunction<QuestionContent>>;
625
+ /** 外层透传状态。 */
626
+ launchStatus: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
627
+ default: string;
628
+ } & {
629
+ default: string;
630
+ };
631
+ /** 外层透传提交人数。 */
632
+ launchSubmittedCount: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
633
+ default: number;
634
+ } & {
635
+ default: number;
636
+ };
637
+ /** 详情弹窗显隐(v-model)。 */
638
+ value: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
639
+ default: boolean;
640
+ } & {
641
+ default: boolean;
642
+ };
643
+ /** 是否允许继续发题。 */
644
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
645
+ default: boolean;
646
+ } & {
647
+ default: boolean;
648
+ };
649
+ /** 不允许继续发题时提示。 */
650
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
651
+ default: string;
652
+ } & {
653
+ default: string;
654
+ };
655
+ /** 继续发题是否默认限时。 */
656
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
657
+ default: boolean;
658
+ } & {
659
+ default: boolean;
660
+ };
661
+ };
662
+
663
+ declare type AnswerCardLaunchQuickEmit = {
664
+ (event: 'input', value: boolean): void;
665
+ (event: 'sent', questionId: string): void;
666
+ (event: 'close'): void;
667
+ };
668
+
669
+ export declare const answerCardLaunchQuickEmits: {
670
+ input: (_value: boolean) => boolean;
671
+ sent: (_questionId: string) => boolean;
672
+ close: () => boolean;
673
+ };
674
+
675
+ export declare const answerCardLaunchQuickProps: () => {
676
+ /** 答题卡 SDK 实例。 */
677
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
678
+ required: true;
679
+ };
680
+ /** 是否允许发题,由外层业务控制。 */
681
+ canStart: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
682
+ default: boolean;
683
+ } & {
684
+ default: boolean;
685
+ };
686
+ /** 不允许发题时提示文案。 */
687
+ cantStartTips: VueTypeValidableDef_2<string, ValidatorFunction<string>> & {
688
+ default: string;
689
+ } & {
690
+ default: string;
691
+ };
692
+ /** 快速问答是否默认限时。 */
693
+ defaultLimitTimeAnswer: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
694
+ default: boolean;
695
+ } & {
696
+ default: boolean;
697
+ };
698
+ /** 快速发题弹窗显隐(v-model)。 */
699
+ value: VueTypeValidableDef_2<boolean, ValidatorFunction<boolean>> & {
700
+ default: boolean;
701
+ } & {
702
+ default: boolean;
703
+ };
704
+ };
705
+
706
+ export declare const AnswerCardTemplateList: DefineComponent< {
707
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
708
+ required: true;
709
+ };
710
+ }, {
711
+ refreshList: () => Promise<void>;
712
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
713
+ refresh: () => void;
714
+ applied: (_templateId: string) => void;
715
+ }, string, Readonly<ExtractPropTypes< {
716
+ answerCardTarget: VueTypeValidableDef<AnswerCard, ValidatorFunction<AnswerCard>> & {
717
+ required: true;
718
+ };
719
+ }>>, {}>;
720
+
721
+ declare type AnswerCardTemplateListEmit = {
722
+ (event: 'applied', templateId: string): void;
723
+ (event: 'refresh'): void;
724
+ };
725
+
726
+ export declare const answerCardTemplateListEmits: {
727
+ applied: (_templateId: string) => boolean;
728
+ refresh: () => boolean;
729
+ };
730
+
731
+ export declare const answerCardTemplateListProps: () => {
732
+ /** 答题卡 SDK 实例。 */
733
+ answerCardTarget: VueTypeValidableDef_2<AnswerCard, ValidatorFunction<AnswerCard>> & {
734
+ required: true;
735
+ };
736
+ };
737
+
738
+ /**
739
+ * 生成选项字母序列(A/B/C...),用于快速题和详情展示复用。
740
+ */
741
+ export declare function buildOptionLetters(count: number): string[];
742
+
743
+ export declare function buildStartSetting(options: {
744
+ isAgain?: boolean;
745
+ defaultLimitTimeAnswer: boolean;
746
+ duration?: number;
747
+ }): {
748
+ isAgain: boolean | undefined;
749
+ duration: number;
750
+ defaultLimitTimeAnswer: boolean;
751
+ rightRank: number | undefined;
752
+ };
753
+
754
+ declare const cardList: Ref< {
755
+ question: {
756
+ status?: QuestionStatus | undefined;
757
+ options: string[];
758
+ tips?: string[] | undefined;
759
+ questionId: string;
760
+ name: string;
761
+ type: QuestionType;
762
+ isQuickQuestion: boolean;
763
+ answer: string;
764
+ };
765
+ status: LaunchCardStatus;
766
+ submittedCount: number;
767
+ isSentResult: boolean;
768
+ statistics?: {
769
+ total: number;
770
+ correctCount: number;
771
+ faultUser: {
772
+ avatar: string;
773
+ nick: string;
774
+ timestamp: number;
775
+ userid: string;
776
+ }[];
777
+ rightUser: {
778
+ avatar: string;
779
+ nick: string;
780
+ timestamp: number;
781
+ userid: string;
782
+ }[];
783
+ options: {
784
+ count: number;
785
+ percent?: string | undefined;
786
+ }[];
787
+ isSentResult?: boolean | undefined;
788
+ } | undefined;
789
+ }[]>;
790
+
791
+ export declare function formatQuestionTitle(question: Pick<QuestionContent, 'name' | 'type'>): string;
792
+
793
+ declare function getCardById(questionId: string): LaunchCard | undefined;
794
+
795
+ export declare function getQuestionLaunchStatus(question: Pick<QuestionContent, 'status' | 'isQuickQuestion'>): LaunchCardStatus;
796
+
797
+ export declare function getQuestionTypeLabel(type: QuestionType): string;
798
+
799
+ declare type LaunchCard = (typeof cardList.value)[number];
800
+
801
+ export declare interface LaunchCardItem {
802
+ question: QuestionContent;
803
+ status: LaunchCardStatus;
804
+ submittedCount: number;
805
+ isSentResult: boolean;
806
+ statistics?: Statistics;
807
+ }
808
+
809
+ export declare type LaunchCardStatus = LaunchStatus;
810
+
811
+ export declare enum LaunchDetailMode {
812
+ Default = "default",
813
+ Quick = "quick"
814
+ }
815
+
816
+ export declare enum LaunchPanelTab {
817
+ Card = "card",
818
+ Template = "template"
819
+ }
820
+
821
+ /**
822
+ * 答题卡题型常量,值与 SDK 的 QuestionType 保持一致。
823
+ * 用于替代散落的 'R'/'C'/'S'/'Q'/'V' 字符串判断,提升可读性与可维护性。
824
+ */
825
+ export declare const LaunchQuestionType: {
826
+ /** 单选题 */
827
+ readonly Radio: QuestionType;
828
+ /** 多选题 */
829
+ readonly CheckBox: QuestionType;
830
+ /** 评分题 */
831
+ readonly Score: QuestionType;
832
+ /** 问答题 */
833
+ readonly Question: QuestionType;
834
+ /** 投票题 */
835
+ readonly Vote: QuestionType;
836
+ };
837
+
838
+ /**
839
+ * 发题卡片在 UI 侧的统一状态语义。
840
+ */
841
+ export declare enum LaunchStatus {
842
+ /** 题目正在进行中,可停止。 */
843
+ Ongoing = "ongoing",
844
+ /** 题目可发题/可重发(含未发布、快速题结束后)。 */
845
+ Draft = "draft",
846
+ /** 题目已结束(普通题可发结果/重发)。 */
847
+ Send = "send"
848
+ }
849
+
850
+ export declare enum QuickDetailStatus {
851
+ Ongoing = "ongoing",
852
+ Ended = "ended"
853
+ }
854
+
855
+ declare function refreshCardList(): Promise<void>;
856
+
857
+ declare function refreshTemplateList(): void;
858
+
859
+ /**
860
+ * 优先使用外层透传状态;透传异常时回退到题目自身状态推导。
861
+ */
862
+ export declare function resolveLaunchStatus(status: unknown, question: Pick<QuestionContent, 'status' | 'isQuickQuestion'>): LaunchCardStatus;
863
+
864
+ export declare interface TemplateItemData {
865
+ templateId: string;
866
+ name: string;
867
+ status: 'error' | 'unused' | 'used';
868
+ }
869
+
870
+ export declare const uiAnswerCardLaunchEvents: {
871
+ readonly OpenPanel: "ui-answer-card-launch.OpenPanel";
872
+ readonly OpenQuickAnswer: "ui-answer-card-launch.OpenQuickAnswer";
873
+ readonly RefreshCardList: "ui-answer-card-launch.RefreshCardList";
874
+ readonly RefreshTemplateList: "ui-answer-card-launch.RefreshTemplateList";
875
+ };
876
+
877
+ export declare function useAnswerCardLaunchBase(options: {
878
+ props: VueProps<typeof answerCardLaunchProps>;
879
+ }): {
880
+ answerCardTarget: AnswerCard;
881
+ canStart: boolean;
882
+ cantStartTips: string;
883
+ defaultLimitTimeAnswer: boolean;
884
+ defaultLimitDuration: number;
885
+ };
886
+
887
+ export declare const useAnswerCardLaunchDetail: (options: {
888
+ props: VueProps<typeof answerCardLaunchDetailProps>;
889
+ emit: AnswerCardLaunchDetailEmit;
890
+ }) => {
891
+ visible: WritableComputedRef<boolean>;
892
+ loading: Ref<boolean>;
893
+ stopping: Ref<boolean>;
894
+ starting: Ref<boolean>;
895
+ sendingResult: Ref<boolean>;
896
+ question: Ref<QuestionContent | undefined>;
897
+ questionItem: ComputedRef<QuestionItem<QuestionTypeEnum> | undefined>;
898
+ previewAnswer: ComputedRef<QuestionAnswerType>;
899
+ status: Ref<LaunchStatus>;
900
+ submittedCount: Ref<number>;
901
+ correctCount: Ref<number>;
902
+ averageScoreText: ComputedRef<string>;
903
+ isSentResult: Ref<boolean>;
904
+ limitTimeEnabled: Ref<boolean>;
905
+ limitDuration: Ref<number>;
906
+ timedOngoing: ComputedRef<boolean>;
907
+ remainingSeconds: Ref<number>;
908
+ onLimitDurationInput: (value: string) => void;
909
+ normalizeLimitDuration: () => void;
910
+ refreshDetail: () => Promise<void>;
911
+ startQuestion: (isAgain?: boolean) => Promise<void>;
912
+ sendResult: () => Promise<void>;
913
+ stopQuestion: () => Promise<void>;
914
+ };
915
+
916
+ export declare const useAnswerCardLaunchList: (options: {
917
+ props: VueProps<typeof answerCardLaunchListProps>;
918
+ emit: AnswerCardLaunchListEmit;
919
+ }) => {
920
+ loading: Ref<boolean>;
921
+ actionQuestionId: Ref<string>;
922
+ cardList: Ref< {
923
+ question: {
924
+ status?: QuestionStatus | undefined;
925
+ options: string[];
926
+ tips?: string[] | undefined;
927
+ questionId: string;
928
+ name: string;
929
+ type: QuestionType;
930
+ isQuickQuestion: boolean;
931
+ answer: string;
932
+ };
933
+ status: LaunchCardStatus;
934
+ submittedCount: number;
935
+ isSentResult: boolean;
936
+ statistics?: {
937
+ total: number;
938
+ correctCount: number;
939
+ faultUser: {
940
+ avatar: string;
941
+ nick: string;
942
+ timestamp: number;
943
+ userid: string;
944
+ }[];
945
+ rightUser: {
946
+ avatar: string;
947
+ nick: string;
948
+ timestamp: number;
949
+ userid: string;
950
+ }[];
951
+ options: {
952
+ count: number;
953
+ percent?: string | undefined;
954
+ }[];
955
+ isSentResult?: boolean | undefined;
956
+ } | undefined;
957
+ }[]>;
958
+ formatQuestionTitle: typeof formatQuestionTitle;
959
+ refreshList: () => Promise<void>;
960
+ onClickCard: (card: LaunchCardItem) => void;
961
+ isPrimaryDisabled: (card: LaunchCardItem) => boolean;
962
+ onClickPrimary: (card: LaunchCardItem) => void;
963
+ onClickSecondary: (card: LaunchCardItem) => void;
964
+ };
965
+
966
+ export declare const useAnswerCardLaunchPanel: (options: {
967
+ props: VueProps<typeof answerCardLaunchPanelProps>;
968
+ emit: AnswerCardLaunchPanelEmit;
969
+ }) => {
970
+ visible: WritableComputedRef<boolean>;
971
+ activeTab: Ref<LaunchPanelTab>;
972
+ currentQuestionId: Ref<string>;
973
+ currentQuestion: Ref<QuestionContent | undefined>;
974
+ currentLaunchStatus: Ref<LaunchStatus>;
975
+ currentSubmittedCount: Ref<number>;
976
+ currentDetailMode: Ref<LaunchDetailMode>;
977
+ detailVisible: Ref<boolean>;
978
+ quickVisible: Ref<boolean>;
979
+ openPanel: () => void;
980
+ closePanel: () => void;
981
+ openDetail: (question: LaunchCardItem | string, mode?: LaunchDetailMode) => void;
982
+ closeDetail: () => void;
983
+ openQuick: () => void;
984
+ closeQuick: () => void;
985
+ };
986
+
987
+ export declare const useAnswerCardLaunchQuick: (options: {
988
+ props: VueProps<typeof answerCardLaunchQuickProps>;
989
+ emit: AnswerCardLaunchQuickEmit;
990
+ }) => {
991
+ visible: WritableComputedRef<boolean>;
992
+ sending: Ref<boolean>;
993
+ questionType: Ref<QuestionType>;
994
+ optionCount: Ref<number>;
995
+ optionCountList: ComputedRef<number[]>;
996
+ selectedLetters: ComputedRef<string[]>;
997
+ onChangeQuestionType: (type: QuestionType) => void;
998
+ closePopup: () => void;
999
+ sendQuickQuestion: () => Promise<void>;
1000
+ };
1001
+
1002
+ export declare const useAnswerCardLaunchQuickDetail: (options: {
1003
+ props: VueProps<typeof answerCardLaunchQuickDetailProps>;
1004
+ emit: AnswerCardLaunchQuickDetailEmit;
1005
+ }) => {
1006
+ visible: WritableComputedRef<boolean>;
1007
+ loading: Ref<boolean>;
1008
+ stopping: Ref<boolean>;
1009
+ starting: Ref<boolean>;
1010
+ question: Ref<QuestionContent | undefined>;
1011
+ status: Ref<QuickDetailStatus>;
1012
+ displayLaunchStatus: ComputedRef<LaunchStatus>;
1013
+ submittedCount: Ref<number>;
1014
+ optionSelectedTimes: Ref<number[]>;
1015
+ refreshDetail: () => Promise<void>;
1016
+ stopQuestion: () => Promise<void>;
1017
+ continueQuestion: () => Promise<void>;
1018
+ };
1019
+
1020
+ export declare const useAnswerCardTemplateList: (options: {
1021
+ props: VueProps<typeof answerCardTemplateListProps>;
1022
+ emit: AnswerCardTemplateListEmit;
1023
+ }) => {
1024
+ loading: Ref<boolean>;
1025
+ applyingTemplateId: Ref<string>;
1026
+ templateList: Ref< {
1027
+ templateId: string;
1028
+ name: string;
1029
+ status: "error" | "unused" | "used";
1030
+ }[]>;
1031
+ formatStatus: (status: "error" | "unused" | "used") => string;
1032
+ refreshList: () => Promise<void>;
1033
+ applyTemplate: (template: TemplateItemData) => Promise<void>;
1034
+ };
1035
+
1036
+ export { }