@nice2dev/ui 1.0.27 → 1.0.29
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/CHANGELOG.md +19 -0
- package/dist/NiceAssessment.doc-BB1rXcVx.cjs +1 -0
- package/dist/NiceAssessment.doc-C3QQawiZ.js +23 -0
- package/dist/NiceConfirmDialog-BIppqGad.cjs +1 -0
- package/dist/NiceConfirmDialog-CtU3paTe.js +81 -0
- package/dist/NiceConfirmDialog-DPfYwO2B.js +81 -0
- package/dist/NiceConfirmDialog-Dyh42OiK.cjs +1 -0
- package/dist/NiceErrorBoundary-BHCKA1h8.cjs +1 -0
- package/dist/NiceErrorBoundary-C9ZPRC1v.js +695 -0
- package/dist/NiceErrorBoundary-CBxXcleR.js +695 -0
- package/dist/NiceErrorBoundary-CNsxmX4m.cjs +1 -0
- package/dist/NiceExam.doc-BpTJpwGb.js +23 -0
- package/dist/NiceExam.doc-Br8pEbQb.cjs +1 -0
- package/dist/NiceForm-B-T7vnE3.cjs +382 -0
- package/dist/NiceForm-C8yEx3VV.cjs +382 -0
- package/dist/NiceForm-Ci3XG7s7.js +5000 -0
- package/dist/NiceForm-D3g3RUzs.js +5000 -0
- package/dist/NiceModal-Cg7Eo9Ig.cjs +1 -0
- package/dist/NiceModal-Crbhc7GB.cjs +1 -0
- package/dist/NiceModal-IHk7nfRN.js +95 -0
- package/dist/NiceModal-XvEKVVLa.js +95 -0
- package/dist/NiceModuleLifecyclePanel-BY3zmDOy.js +7582 -0
- package/dist/NiceModuleLifecyclePanel-D3k8kAey.js +7582 -0
- package/dist/NiceModuleLifecyclePanel-Dmbqjb8W.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-MAyTh_s5.cjs +1 -0
- package/dist/NicePagination-BAxcfqnE.js +171 -0
- package/dist/NicePagination-BONcK9M_.cjs +1 -0
- package/dist/NicePagination-DUnMbROj.cjs +1 -0
- package/dist/NicePagination-DyC6dQ7_.js +171 -0
- package/dist/NicePinCodeInput-BDR2PSoo.cjs +696 -0
- package/dist/NicePinCodeInput-C43eB9h4.js +13102 -0
- package/dist/NicePinCodeInput-p5IFVwfY.cjs +696 -0
- package/dist/NicePinCodeInput-xJwHHpeS.js +13102 -0
- package/dist/NicePoll.doc-DCiXvOb0.js +23 -0
- package/dist/NicePoll.doc-IOgqVPhc.cjs +1 -0
- package/dist/NicePollLive.doc-CdUyiCyf.js +23 -0
- package/dist/NicePollLive.doc-xBMqHeyt.cjs +1 -0
- package/dist/NiceQuiz.doc-BhAeGrcP.cjs +1 -0
- package/dist/NiceQuiz.doc-BiZq8X1P.js +23 -0
- package/dist/NiceSavedQueryPanel-CbE-wQLO.js +6893 -0
- package/dist/NiceSavedQueryPanel-DV4a4axz.cjs +596 -0
- package/dist/NiceSavedQueryPanel-Dgbn1ExK.js +6893 -0
- package/dist/NiceSavedQueryPanel-DuE2wgV_.cjs +596 -0
- package/dist/NiceSurvey.doc-9UorYdXy.cjs +1 -0
- package/dist/NiceSurvey.doc-CPF1ZEHo.js +23 -0
- package/dist/NiceWindow--TIJTyxg.cjs +1 -0
- package/dist/NiceWindow-BehN3PKk.js +1592 -0
- package/dist/NiceWindow-Dqu9ik8A.cjs +1 -0
- package/dist/NiceWindow-vqhh0tb_.js +1592 -0
- package/dist/charts-C877HM7d.js +4657 -0
- package/dist/charts-CJruxLRY.js +4657 -0
- package/dist/charts-CjHdhW3E.cjs +761 -0
- package/dist/charts-D8oj6Nf5.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BIdbG6p3.js +27212 -0
- package/dist/core-BbGBF3q0.js +25364 -0
- package/dist/core-DwOyxP1F.cjs +122 -0
- package/dist/core-bzK0ZnUp.cjs +122 -0
- package/dist/data-branching-7B25ogCm.cjs +1 -0
- package/dist/data-branching-B_jX2zDY.js +6133 -0
- package/dist/data-branching-BzRFsCJu.js +6133 -0
- package/dist/data-branching-DahoQa4M.cjs +1 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/devops-C9gdQxuU.cjs +17 -0
- package/dist/devops-CaO_4qGz.js +7684 -0
- package/dist/devops-DbKWJZmr.cjs +17 -0
- package/dist/devops-nYQjPDoH.js +7684 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +15 -14
- package/dist/index-BK_Uwmz0.js +67774 -0
- package/dist/index-By5F3DMu.js +67607 -0
- package/dist/index-CTbp81RF.cjs +5517 -0
- package/dist/index-aAc_1dLg.cjs +5518 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +513 -405
- package/dist/index.mjs +947 -943
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +332 -5
- package/dist/navigation.mjs +18 -18
- package/dist/no-code-B0mG7OQc.cjs +332 -0
- package/dist/no-code-C4DPSqYz.cjs +332 -0
- package/dist/no-code-CikRvKeJ.js +7133 -0
- package/dist/no-code-zo1dWOLX.js +7133 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/pickerCommons-BRJZMI3n.cjs +1 -0
- package/dist/pickerCommons-CqhXp4QL.js +2043 -0
- package/dist/pickerCommons-DWhw7aWu.js +2043 -0
- package/dist/pickerCommons-OsYJhnFE.cjs +1 -0
- package/dist/pickerCommons.css +1 -0
- package/dist/style.css +4 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1087,6 +1087,275 @@ declare interface Assertion {
|
|
|
1087
1087
|
|
|
1088
1088
|
declare type AssertionMatcher = 'toEqual' | 'toBe' | 'toBeTruthy' | 'toBeFalsy' | 'toBeNull' | 'toBeUndefined' | 'toContain' | 'toHaveLength' | 'toBeInTheDocument' | 'toHaveTextContent' | 'toHaveAttribute' | 'toHaveClass' | 'toHaveStyle' | 'toHaveBeenCalled' | 'toHaveBeenCalledWith' | 'toHaveBeenCalledTimes' | 'toThrow' | 'toMatchSnapshot';
|
|
1089
1089
|
|
|
1090
|
+
/** Aggregate (global) results — survey/poll. Display-only; supplied by the host. */
|
|
1091
|
+
export declare interface AssessmentAggregateResults {
|
|
1092
|
+
totalResponses: number;
|
|
1093
|
+
/** Keyed by question id. */
|
|
1094
|
+
perQuestion: Record<string, {
|
|
1095
|
+
responses: number;
|
|
1096
|
+
/** Counts keyed by option id (choice questions). */
|
|
1097
|
+
optionCounts?: Record<string, number>;
|
|
1098
|
+
/** Mean for numeric/rating/scale/nps. */
|
|
1099
|
+
average?: number;
|
|
1100
|
+
/** Collected free-text answers. */
|
|
1101
|
+
textResponses?: string[];
|
|
1102
|
+
}>;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export declare interface AssessmentAnswer {
|
|
1106
|
+
questionId: string;
|
|
1107
|
+
value: AssessmentAnswerValue;
|
|
1108
|
+
/** Scored modes: whether the value matched `correctAnswer`. */
|
|
1109
|
+
correct?: boolean;
|
|
1110
|
+
/** Points earned (after partial credit / negative marking). */
|
|
1111
|
+
pointsEarned?: number;
|
|
1112
|
+
/** Seconds spent on the question. */
|
|
1113
|
+
timeSpent?: number;
|
|
1114
|
+
hintsUsed?: number;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/** The value a user supplies for a question. */
|
|
1118
|
+
export declare type AssessmentAnswerValue = string | string[] | number | boolean | Record<string, string> | null;
|
|
1119
|
+
|
|
1120
|
+
export declare interface AssessmentContext {
|
|
1121
|
+
mode: AssessmentMode;
|
|
1122
|
+
/** All answers so far, keyed by question id. */
|
|
1123
|
+
answers: Record<string, AssessmentAnswerValue>;
|
|
1124
|
+
setAnswer: (questionId: string, value: AssessmentAnswerValue) => void;
|
|
1125
|
+
getAnswer: (questionId: string) => AssessmentAnswerValue;
|
|
1126
|
+
currentPage: AssessmentPage;
|
|
1127
|
+
currentIndex: number;
|
|
1128
|
+
totalPages: number;
|
|
1129
|
+
isFirst: boolean;
|
|
1130
|
+
isLast: boolean;
|
|
1131
|
+
/** 0–100 progress. */
|
|
1132
|
+
progress: number;
|
|
1133
|
+
goNext: () => void;
|
|
1134
|
+
goPrev: () => void;
|
|
1135
|
+
goTo: (pageId: string) => void;
|
|
1136
|
+
skip: () => void;
|
|
1137
|
+
submit: () => void;
|
|
1138
|
+
/** Running score (scored modes). */
|
|
1139
|
+
result: AssessmentResult | null;
|
|
1140
|
+
/** Remaining seconds for the active timer, or `null`. */
|
|
1141
|
+
timeLeft: number | null;
|
|
1142
|
+
t: (key: string, defaultValue: string) => string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/** When correctness/explanations are revealed. */
|
|
1146
|
+
declare type AssessmentFeedback = 'none' | 'immediate' | 'after-page' | 'at-end';
|
|
1147
|
+
|
|
1148
|
+
/** Keys for {@link NiceAssessmentProps.labels}. */
|
|
1149
|
+
declare type AssessmentLabelKey = 'next' | 'prev' | 'skip' | 'submit' | 'finish' | 'retry' | 'review' | 'exit' | 'start' | 'correct' | 'incorrect' | 'passed' | 'failed' | 'score' | 'timeUp' | 'questionOf' | 'results' | 'hint';
|
|
1150
|
+
|
|
1151
|
+
/** Page rendering layout. */
|
|
1152
|
+
declare type AssessmentLayout = 'one-per-page' | 'all-at-once' | 'paginated';
|
|
1153
|
+
|
|
1154
|
+
/** Quiz gamification lifelines. */
|
|
1155
|
+
declare type AssessmentLifeline = 'fiftyFifty' | 'hint' | 'skipQuestion' | 'extraTime';
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Behaviour profile.
|
|
1159
|
+
* - `quiz` — correct answers + scoring, optional immediate feedback / gamification.
|
|
1160
|
+
* - `exam` — timed, locked navigation, feedback withheld until the end, pass threshold.
|
|
1161
|
+
* - `survey` — no scoring; collects responses and can display aggregate results.
|
|
1162
|
+
* - `poll` — one / few questions; live aggregate.
|
|
1163
|
+
*/
|
|
1164
|
+
export declare type AssessmentMode = 'quiz' | 'exam' | 'survey' | 'poll';
|
|
1165
|
+
|
|
1166
|
+
/** A selectable option for choice-style questions. */
|
|
1167
|
+
export declare interface AssessmentOption {
|
|
1168
|
+
id: string;
|
|
1169
|
+
/** Option label — any node (text, image, formula, …). */
|
|
1170
|
+
label: ReactNode;
|
|
1171
|
+
/** Optional leading media/icon. */
|
|
1172
|
+
media?: ReactNode;
|
|
1173
|
+
/** Per-option weight for partial-credit / weighted multi-select scoring. */
|
|
1174
|
+
weight?: number;
|
|
1175
|
+
/** For `matching` / `dragMatch`: the id of the target this option pairs with. */
|
|
1176
|
+
matchTargetId?: string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* A page in the flow. Mirrors {@link SetupWizardStep}: it may render **arbitrary
|
|
1181
|
+
* content** and/or carry one or more questions. With `layout="one-per-page"` a page
|
|
1182
|
+
* is typically one question; `all-at-once` renders every page's questions together.
|
|
1183
|
+
*/
|
|
1184
|
+
export declare interface AssessmentPage {
|
|
1185
|
+
id: string;
|
|
1186
|
+
title?: string;
|
|
1187
|
+
subtitle?: string;
|
|
1188
|
+
/** Section/group this page belongs to (for sectioned scoring + steppers). */
|
|
1189
|
+
section?: string;
|
|
1190
|
+
/** Free-form content — any node, or a render fn given the live context. */
|
|
1191
|
+
content?: ReactNode | ((ctx: AssessmentContext) => ReactNode);
|
|
1192
|
+
/** Questions on this page. */
|
|
1193
|
+
questions?: AssessmentQuestion[];
|
|
1194
|
+
/** Per-page time limit (seconds). */
|
|
1195
|
+
timeLimit?: number;
|
|
1196
|
+
/** Adaptive branching: resolve the next page id from current answers/score. */
|
|
1197
|
+
nextPage?: string | ((ctx: AssessmentContext) => string | undefined);
|
|
1198
|
+
/** Show this page only when the predicate holds (against current answers). */
|
|
1199
|
+
showWhen?: (answers: Record<string, AssessmentAnswerValue>) => boolean;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** Random pool selection (question bank): pick `count` of the available questions. */
|
|
1203
|
+
declare interface AssessmentPool {
|
|
1204
|
+
count: number;
|
|
1205
|
+
/** Limit the draw to a section id. */
|
|
1206
|
+
section?: string;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/** Props for a preset: everything except `mode` (fixed by the preset). */
|
|
1210
|
+
export declare type AssessmentPresetProps = Omit<NiceAssessmentProps, 'mode'>;
|
|
1211
|
+
|
|
1212
|
+
/** A question. `correctAnswer` is omitted in survey/poll mode. */
|
|
1213
|
+
export declare interface AssessmentQuestion {
|
|
1214
|
+
id: string;
|
|
1215
|
+
type: AssessmentQuestionType;
|
|
1216
|
+
/** The question prompt — any node. */
|
|
1217
|
+
prompt: ReactNode;
|
|
1218
|
+
/** Optional media shown with the prompt (image/video/formula/presentation/…). */
|
|
1219
|
+
media?: ReactNode;
|
|
1220
|
+
/** Help text shown under the prompt. */
|
|
1221
|
+
description?: ReactNode;
|
|
1222
|
+
/** Options for choice / ordering / matching questions. */
|
|
1223
|
+
options?: AssessmentOption[];
|
|
1224
|
+
/** Targets for matching / dragMatch / hotspot / fillBlank. */
|
|
1225
|
+
targets?: AssessmentTarget[];
|
|
1226
|
+
/**
|
|
1227
|
+
* Correct answer (scored modes only). Shape depends on `type`:
|
|
1228
|
+
* option id | id[] | boolean | string | number | ordered id[] |
|
|
1229
|
+
* `Record<targetId, optionId>` (matching/dragMatch) | `string[]` (fillBlank).
|
|
1230
|
+
*/
|
|
1231
|
+
correctAnswer?: AssessmentAnswerValue;
|
|
1232
|
+
/** Points awarded for a fully-correct answer. Default `1`. */
|
|
1233
|
+
points?: number;
|
|
1234
|
+
/** Award proportional credit for partially-correct multi answers. Default `false`. */
|
|
1235
|
+
partialCredit?: boolean;
|
|
1236
|
+
/** Subtract points for wrong answers (guards against guessing). Default `false`. */
|
|
1237
|
+
negativeMarking?: boolean;
|
|
1238
|
+
/** Whether the question must be answered to advance. */
|
|
1239
|
+
required?: boolean;
|
|
1240
|
+
/** Shown after answering (immediate feedback) or in review. */
|
|
1241
|
+
explanation?: ReactNode;
|
|
1242
|
+
/** A hint, revealable via the `hint` lifeline (quiz). */
|
|
1243
|
+
hint?: ReactNode;
|
|
1244
|
+
/** Shuffle this question's options (overrides the assessment-level flag). */
|
|
1245
|
+
shuffleOptions?: boolean;
|
|
1246
|
+
/** Difficulty tag (quiz gamification / analytics). */
|
|
1247
|
+
difficulty?: 'easy' | 'medium' | 'hard';
|
|
1248
|
+
/** Per-question time limit (seconds). */
|
|
1249
|
+
timeLimit?: number;
|
|
1250
|
+
/** Min/max for `number` / `scale` / `nps`. */
|
|
1251
|
+
min?: number;
|
|
1252
|
+
max?: number;
|
|
1253
|
+
/** Free-form metadata (category, tags, …); not interpreted by the engine. */
|
|
1254
|
+
meta?: Record<string, unknown>;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/** Per-question outcome in the result breakdown. */
|
|
1258
|
+
declare interface AssessmentQuestionResult {
|
|
1259
|
+
questionId: string;
|
|
1260
|
+
correct: boolean;
|
|
1261
|
+
pointsEarned: number;
|
|
1262
|
+
pointsMax: number;
|
|
1263
|
+
value: AssessmentAnswerValue;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/** All built-in question types. Custom types resolve via `questionRenderers`. */
|
|
1267
|
+
export declare type AssessmentQuestionType = 'single' | 'multiple' | 'trueFalse' | 'text' | 'longText' | 'number' | 'rating' | 'scale' | 'likert' | 'nps' | 'ordering' | 'matching' | 'fillBlank' | 'hotspot' | 'dragMatch' | 'date' | 'time';
|
|
1268
|
+
|
|
1269
|
+
/** Final result for scored modes (quiz/exam). */
|
|
1270
|
+
export declare interface AssessmentResult {
|
|
1271
|
+
totalQuestions: number;
|
|
1272
|
+
answered: number;
|
|
1273
|
+
correct: number;
|
|
1274
|
+
pointsEarned: number;
|
|
1275
|
+
pointsMax: number;
|
|
1276
|
+
/** 0–100. */
|
|
1277
|
+
percentage: number;
|
|
1278
|
+
passed: boolean;
|
|
1279
|
+
timeTaken: number;
|
|
1280
|
+
/** Subscore per section id. */
|
|
1281
|
+
perSection: Record<string, {
|
|
1282
|
+
pointsEarned: number;
|
|
1283
|
+
pointsMax: number;
|
|
1284
|
+
percentage: number;
|
|
1285
|
+
}>;
|
|
1286
|
+
perQuestion: AssessmentQuestionResult[];
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
export declare interface AssessmentScoringConfig {
|
|
1290
|
+
/** Pass threshold as a percentage 0–100. Default `60`. */
|
|
1291
|
+
passThreshold?: number;
|
|
1292
|
+
/** Honour per-question/per-option `weight`. Default `true`. */
|
|
1293
|
+
weighted?: boolean;
|
|
1294
|
+
/** Default partial-credit for multi-answer questions (per-question prop wins). */
|
|
1295
|
+
partialCredit?: boolean;
|
|
1296
|
+
/** Default negative marking (per-question prop wins). */
|
|
1297
|
+
negativeMarking?: boolean;
|
|
1298
|
+
/** Clamp the total to ≥ 0 when negative marking is on. Default `true`. */
|
|
1299
|
+
clampToZero?: boolean;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/** A section groups pages for subscores + stepper labels. */
|
|
1303
|
+
export declare interface AssessmentSection {
|
|
1304
|
+
id: string;
|
|
1305
|
+
title: string;
|
|
1306
|
+
timeLimit?: number;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/** A submission payload (survey/poll, or any mode's raw answers). */
|
|
1310
|
+
export declare interface AssessmentSubmission {
|
|
1311
|
+
assessmentId: string;
|
|
1312
|
+
participantId?: string;
|
|
1313
|
+
answers: AssessmentAnswer[];
|
|
1314
|
+
submittedAt: string;
|
|
1315
|
+
totalTime: number;
|
|
1316
|
+
completed: boolean;
|
|
1317
|
+
/** Present for scored modes. */
|
|
1318
|
+
result?: AssessmentResult;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/** A drop target / blank id for `matching`, `dragMatch`, `fillBlank`, `hotspot`. */
|
|
1322
|
+
export declare interface AssessmentTarget {
|
|
1323
|
+
id: string;
|
|
1324
|
+
label?: ReactNode;
|
|
1325
|
+
/** Hotspot bounding box (percent of image), e.g. `{ x: 10, y: 20, w: 15, h: 10 }`. */
|
|
1326
|
+
rect?: {
|
|
1327
|
+
x: number;
|
|
1328
|
+
y: number;
|
|
1329
|
+
w: number;
|
|
1330
|
+
h: number;
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
export declare interface AssessmentTimerConfig {
|
|
1335
|
+
/** Whole-assessment limit (seconds). */
|
|
1336
|
+
total?: number;
|
|
1337
|
+
/** Default per-question limit (seconds) — `question.timeLimit` overrides. */
|
|
1338
|
+
perQuestion?: number;
|
|
1339
|
+
/** Auto-advance when a per-question timer expires. Default `false`. */
|
|
1340
|
+
autoAdvance?: boolean;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
export declare type AssessmentWidget = (props: AssessmentWidgetProps) => ReactNode;
|
|
1344
|
+
|
|
1345
|
+
declare interface AssessmentWidgetProps {
|
|
1346
|
+
question: AssessmentQuestion;
|
|
1347
|
+
value: AssessmentAnswerValue;
|
|
1348
|
+
onChange: (value: AssessmentAnswerValue) => void;
|
|
1349
|
+
/** Reveal correctness (immediate feedback / review). */
|
|
1350
|
+
revealed?: boolean;
|
|
1351
|
+
disabled?: boolean;
|
|
1352
|
+
size?: NiceSize;
|
|
1353
|
+
t: (key: string, defaultValue: string) => string;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/** Map of question type → renderer; merged over the built-ins. */
|
|
1357
|
+
export declare type AssessmentWidgetRegistry = Partial<Record<AssessmentQuestionType, AssessmentWidget>>;
|
|
1358
|
+
|
|
1090
1359
|
/** Collection */
|
|
1091
1360
|
export declare interface AssetCollection {
|
|
1092
1361
|
id: string;
|
|
@@ -7405,6 +7674,101 @@ export declare interface NiceAspectRatioProps extends NiceStandardProps {
|
|
|
7405
7674
|
maxWidth?: number | string;
|
|
7406
7675
|
}
|
|
7407
7676
|
|
|
7677
|
+
export declare const NiceAssessment: default_2.ForwardRefExoticComponent<NiceAssessmentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
7678
|
+
|
|
7679
|
+
export declare interface NiceAssessmentProps {
|
|
7680
|
+
/** Behaviour profile. Presets (`NiceQuiz`/`NiceExam`/`NiceSurvey`/`NicePoll`) set this. */
|
|
7681
|
+
mode?: AssessmentMode;
|
|
7682
|
+
/** Stable id (persistence, submissions, aria). */
|
|
7683
|
+
id?: string;
|
|
7684
|
+
/** Title / description shown on the intro/header. */
|
|
7685
|
+
title?: ReactNode;
|
|
7686
|
+
description?: ReactNode;
|
|
7687
|
+
/** Pages (preferred) — full control over content + questions per page. */
|
|
7688
|
+
pages?: AssessmentPage[];
|
|
7689
|
+
/** Shorthand: a flat question list (each becomes a one-question page). */
|
|
7690
|
+
questions?: AssessmentQuestion[];
|
|
7691
|
+
/** Section definitions (for subscores + steppers). */
|
|
7692
|
+
sections?: AssessmentSection[];
|
|
7693
|
+
/** Page layout. Default `one-per-page`. */
|
|
7694
|
+
layout?: AssessmentLayout;
|
|
7695
|
+
size?: NiceSize;
|
|
7696
|
+
/**
|
|
7697
|
+
* Self-applied theme (preset name or {@link NiceTheme}) — wraps in a scoped
|
|
7698
|
+
* `NiceThemeProvider` so it themes correctly outside an app provider. Omit when
|
|
7699
|
+
* already inside one.
|
|
7700
|
+
*/
|
|
7701
|
+
theme?: NiceTheme | string;
|
|
7702
|
+
/** Scoring config (quiz/exam). */
|
|
7703
|
+
scoring?: AssessmentScoringConfig;
|
|
7704
|
+
/** Timer config. */
|
|
7705
|
+
timer?: AssessmentTimerConfig;
|
|
7706
|
+
/** When feedback (correctness/explanations) is shown. Mode-dependent default. */
|
|
7707
|
+
feedback?: AssessmentFeedback;
|
|
7708
|
+
/** Lock navigation to forward-only (exam). Default depends on mode. */
|
|
7709
|
+
lockNavigation?: boolean;
|
|
7710
|
+
/** Allow going back. Default `true` (except exam). */
|
|
7711
|
+
allowBack?: boolean;
|
|
7712
|
+
/** Allow skipping non-required questions. Default `true` (except exam). */
|
|
7713
|
+
allowSkip?: boolean;
|
|
7714
|
+
/** Allow retrying a wrong answer (quiz). Default `false`. */
|
|
7715
|
+
allowRetry?: boolean;
|
|
7716
|
+
/** Lives — quiz gamification (0/undefined = unlimited). */
|
|
7717
|
+
lives?: number;
|
|
7718
|
+
/** Available lifelines (quiz). */
|
|
7719
|
+
lifelines?: AssessmentLifeline[];
|
|
7720
|
+
/** Show a review screen with explanations after completion. Default `true` (scored). */
|
|
7721
|
+
review?: boolean;
|
|
7722
|
+
/** Reveal the correct answer in review/feedback. Default `true` (quiz), `false` (exam until released). */
|
|
7723
|
+
revealCorrect?: boolean;
|
|
7724
|
+
/** Shuffle questions / options. */
|
|
7725
|
+
shuffleQuestions?: boolean;
|
|
7726
|
+
shuffleOptions?: boolean;
|
|
7727
|
+
/** Deterministic shuffle/pool seed (reproducible). */
|
|
7728
|
+
randomizeSeed?: string | number;
|
|
7729
|
+
/** Random pool selection (question bank). */
|
|
7730
|
+
pool?: AssessmentPool;
|
|
7731
|
+
/** Show the progress bar. Default `true`. */
|
|
7732
|
+
showProgress?: boolean;
|
|
7733
|
+
/** Show question numbers. Default `true`. */
|
|
7734
|
+
showNumbers?: boolean;
|
|
7735
|
+
/** Persist answers/progress to localStorage under this key (resume). */
|
|
7736
|
+
persistKey?: string;
|
|
7737
|
+
/** Aggregate results to display (survey/poll). */
|
|
7738
|
+
results?: AssessmentAggregateResults;
|
|
7739
|
+
/** Async fetch of aggregate results (survey/poll) — called after submit. */
|
|
7740
|
+
fetchAggregateResults?: (submission: AssessmentSubmission) => Promise<AssessmentAggregateResults>;
|
|
7741
|
+
/** Show aggregate charts after submitting (survey/poll). Default `true` when results available. */
|
|
7742
|
+
showAggregate?: boolean;
|
|
7743
|
+
/** Certificate config (exam pass) — `onExport`/built-in. */
|
|
7744
|
+
certificate?: {
|
|
7745
|
+
enabled?: boolean;
|
|
7746
|
+
title?: string;
|
|
7747
|
+
recipient?: string;
|
|
7748
|
+
};
|
|
7749
|
+
/** Custom export hook for result/certificate (PDF/CSV/… by the host). */
|
|
7750
|
+
onExport?: (result: AssessmentResult, submission: AssessmentSubmission) => void;
|
|
7751
|
+
/** Override / add question-type renderers. */
|
|
7752
|
+
questionRenderers?: AssessmentWidgetRegistry;
|
|
7753
|
+
/** Branding / header / footer slots. */
|
|
7754
|
+
branding?: ReactNode;
|
|
7755
|
+
header?: ReactNode;
|
|
7756
|
+
footer?: ReactNode;
|
|
7757
|
+
/** Callbacks. */
|
|
7758
|
+
onAnswer?: (answer: AssessmentAnswer) => void;
|
|
7759
|
+
onPageChange?: (pageId: string, index: number) => void;
|
|
7760
|
+
onComplete?: (result: AssessmentResult) => void | Promise<void>;
|
|
7761
|
+
onSubmit?: (submission: AssessmentSubmission) => void | Promise<void>;
|
|
7762
|
+
onTimeout?: (scope: 'total' | 'page' | 'question') => void;
|
|
7763
|
+
onExit?: () => void;
|
|
7764
|
+
/** Custom labels (i18n-overridable). */
|
|
7765
|
+
labels?: Partial<Record<AssessmentLabelKey, string>>;
|
|
7766
|
+
accessMode?: NiceAccessMode;
|
|
7767
|
+
className?: string;
|
|
7768
|
+
style?: React.CSSProperties;
|
|
7769
|
+
'data-testid'?: string;
|
|
7770
|
+
}
|
|
7771
|
+
|
|
7408
7772
|
export declare type NiceAuditAction = 'create' | 'update' | 'delete' | 'view' | 'export' | 'import' | 'login' | 'logout' | 'custom';
|
|
7409
7773
|
|
|
7410
7774
|
export declare interface NiceAuditEntry {
|
|
@@ -11885,6 +12249,13 @@ export declare interface NiceEventOrchestratorProps extends NiceBaseProps {
|
|
|
11885
12249
|
onTest?: (flowId: string) => void;
|
|
11886
12250
|
}
|
|
11887
12251
|
|
|
12252
|
+
/**
|
|
12253
|
+
* {@link NiceExam} — timed, forward-locked assessment; correctness withheld until the
|
|
12254
|
+
* end, pass threshold, optional certificate. (Named `NiceExam`, not `NiceTest`, to
|
|
12255
|
+
* avoid colliding with the unrelated software `NiceTestBuilder`.)
|
|
12256
|
+
*/
|
|
12257
|
+
export declare const NiceExam: default_2.ForwardRefExoticComponent<AssessmentPresetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
12258
|
+
|
|
11888
12259
|
/**
|
|
11889
12260
|
* Unified export function.
|
|
11890
12261
|
*/
|
|
@@ -17472,93 +17843,17 @@ declare interface NicePolarChartSeries {
|
|
|
17472
17843
|
}
|
|
17473
17844
|
|
|
17474
17845
|
/**
|
|
17475
|
-
* NicePoll —
|
|
17476
|
-
*
|
|
17477
|
-
* @example
|
|
17478
|
-
* ```tsx
|
|
17479
|
-
* <NicePoll
|
|
17480
|
-
* question="Which feature should we build next?"
|
|
17481
|
-
* options={[
|
|
17482
|
-
* { id: '1', text: 'Dark mode' },
|
|
17483
|
-
* { id: '2', text: 'Mobile app' },
|
|
17484
|
-
* { id: '3', text: 'API v2' },
|
|
17485
|
-
* ]}
|
|
17486
|
-
* results={pollResults}
|
|
17487
|
-
* onVote={(ids) => submitVote(ids)}
|
|
17488
|
-
* />
|
|
17489
|
-
* ```
|
|
17846
|
+
* {@link NicePoll} — one / few questions with live aggregate results.
|
|
17490
17847
|
*/
|
|
17491
|
-
export declare const NicePoll: ForwardRefExoticComponent<
|
|
17848
|
+
export declare const NicePoll: default_2.ForwardRefExoticComponent<AssessmentPresetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
17492
17849
|
|
|
17493
17850
|
export { NicePollingConfig }
|
|
17494
17851
|
|
|
17495
17852
|
/**
|
|
17496
|
-
* NicePollLive —
|
|
17497
|
-
*
|
|
17498
|
-
* @example
|
|
17499
|
-
* ```tsx
|
|
17500
|
-
* <NicePollLive
|
|
17501
|
-
* question="Best framework?"
|
|
17502
|
-
* options={options}
|
|
17503
|
-
* fetchResults={() => api.getPollResults(pollId)}
|
|
17504
|
-
* pollInterval={5000}
|
|
17505
|
-
* />
|
|
17506
|
-
* ```
|
|
17507
|
-
*/
|
|
17508
|
-
export declare const NicePollLive: ForwardRefExoticComponent<NicePollLiveProps & RefAttributes<HTMLDivElement>>;
|
|
17509
|
-
|
|
17510
|
-
export declare interface NicePollLiveProps extends Omit<NicePollProps, 'results'> {
|
|
17511
|
-
/** Initial results */
|
|
17512
|
-
initialResults?: PollResults;
|
|
17513
|
-
/** WebSocket URL for live updates */
|
|
17514
|
-
wsUrl?: string;
|
|
17515
|
-
/** Polling interval in ms (fallback) */
|
|
17516
|
-
pollInterval?: number;
|
|
17517
|
-
/** Fetch results function */
|
|
17518
|
-
fetchResults?: () => Promise<PollResults>;
|
|
17519
|
-
}
|
|
17520
|
-
|
|
17521
|
-
/**
|
|
17522
|
-
* NicePoll props
|
|
17853
|
+
* {@link NicePollLive} — alias of {@link NicePoll} with aggregate results shown by
|
|
17854
|
+
* default (kept for ergonomics / backward-compatible naming).
|
|
17523
17855
|
*/
|
|
17524
|
-
export declare
|
|
17525
|
-
/** Poll question */
|
|
17526
|
-
question: string;
|
|
17527
|
-
/** Poll description */
|
|
17528
|
-
description?: string;
|
|
17529
|
-
/** Poll options */
|
|
17530
|
-
options: PollOption[];
|
|
17531
|
-
/** Current results (for real-time updates) */
|
|
17532
|
-
results?: PollResults;
|
|
17533
|
-
/** User's current vote(s) */
|
|
17534
|
-
userVotes?: string[];
|
|
17535
|
-
/** Poll configuration */
|
|
17536
|
-
config?: PollConfig;
|
|
17537
|
-
/** Theme variant */
|
|
17538
|
-
theme?: 'light' | 'dark';
|
|
17539
|
-
/** Size variant */
|
|
17540
|
-
size?: 'sm' | 'md' | 'lg';
|
|
17541
|
-
/** Custom labels */
|
|
17542
|
-
labels?: {
|
|
17543
|
-
vote?: string;
|
|
17544
|
-
votes?: string;
|
|
17545
|
-
voted?: string;
|
|
17546
|
-
changeVote?: string;
|
|
17547
|
-
closed?: string;
|
|
17548
|
-
closesIn?: string;
|
|
17549
|
-
totalVotes?: string;
|
|
17550
|
-
noVotes?: string;
|
|
17551
|
-
selectUpTo?: string;
|
|
17552
|
-
};
|
|
17553
|
-
/** Called when user votes */
|
|
17554
|
-
onVote?: (optionIds: string[]) => void;
|
|
17555
|
-
/** Called when user changes vote */
|
|
17556
|
-
onChangeVote?: () => void;
|
|
17557
|
-
/** Custom class name */
|
|
17558
|
-
className?: string;
|
|
17559
|
-
/** Children for custom content */
|
|
17560
|
-
children?: ReactNode;
|
|
17561
|
-
}
|
|
17856
|
+
export declare const NicePollLive: default_2.ForwardRefExoticComponent<AssessmentPresetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
17562
17857
|
|
|
17563
17858
|
export declare const NicePopover: default_2.FC<NicePopoverProps>;
|
|
17564
17859
|
|
|
@@ -17925,85 +18220,10 @@ export { NiceQuickHelp }
|
|
|
17925
18220
|
export { NiceQuickHelpProps }
|
|
17926
18221
|
|
|
17927
18222
|
/**
|
|
17928
|
-
* NiceQuiz —
|
|
17929
|
-
*
|
|
17930
|
-
* @example
|
|
17931
|
-
* ```tsx
|
|
17932
|
-
* <NiceQuiz
|
|
17933
|
-
* title="JavaScript Basics"
|
|
17934
|
-
* questions={questions}
|
|
17935
|
-
* timeLimit={300}
|
|
17936
|
-
* lives={3}
|
|
17937
|
-
* lifelines={['fiftyFifty', 'hint']}
|
|
17938
|
-
* passingScore={70}
|
|
17939
|
-
* onComplete={(result) => console.log(result)}
|
|
17940
|
-
* />
|
|
17941
|
-
* ```
|
|
18223
|
+
* {@link NiceQuiz} — correct answers + scoring with immediate feedback and optional
|
|
18224
|
+
* gamification (lives, lifelines, difficulty). Pages can hold any content.
|
|
17942
18225
|
*/
|
|
17943
|
-
export declare const NiceQuiz: ForwardRefExoticComponent<
|
|
17944
|
-
|
|
17945
|
-
/**
|
|
17946
|
-
* NiceQuiz props
|
|
17947
|
-
*/
|
|
17948
|
-
export declare interface NiceQuizProps {
|
|
17949
|
-
/** Quiz title */
|
|
17950
|
-
title?: string;
|
|
17951
|
-
/** Quiz description */
|
|
17952
|
-
description?: string;
|
|
17953
|
-
/** Questions array */
|
|
17954
|
-
questions: QuizQuestion[];
|
|
17955
|
-
/** Theme variant */
|
|
17956
|
-
theme?: 'light' | 'dark';
|
|
17957
|
-
/** Total time limit in seconds (0 = unlimited) */
|
|
17958
|
-
timeLimit?: number;
|
|
17959
|
-
/** Time limit per question in seconds (0 = unlimited) */
|
|
17960
|
-
timePerQuestion?: number;
|
|
17961
|
-
/** Initial lives (0 = unlimited) */
|
|
17962
|
-
lives?: number;
|
|
17963
|
-
/** Passing score percentage (0-100) */
|
|
17964
|
-
passingScore?: number;
|
|
17965
|
-
/** Show correct answer after each question */
|
|
17966
|
-
showCorrectAnswerImmediately?: boolean;
|
|
17967
|
-
/** Allow retry on wrong answer */
|
|
17968
|
-
allowRetry?: boolean;
|
|
17969
|
-
/** Show progress indicator */
|
|
17970
|
-
showProgress?: boolean;
|
|
17971
|
-
/** Available lifelines */
|
|
17972
|
-
lifelines?: QuizLifeline[];
|
|
17973
|
-
/** Shuffle questions */
|
|
17974
|
-
shuffleQuestions?: boolean;
|
|
17975
|
-
/** Shuffle options within questions */
|
|
17976
|
-
shuffleOptions?: boolean;
|
|
17977
|
-
/** Custom labels */
|
|
17978
|
-
labels?: {
|
|
17979
|
-
next?: string;
|
|
17980
|
-
submit?: string;
|
|
17981
|
-
skip?: string;
|
|
17982
|
-
hint?: string;
|
|
17983
|
-
fiftyFifty?: string;
|
|
17984
|
-
extraTime?: string;
|
|
17985
|
-
correct?: string;
|
|
17986
|
-
incorrect?: string;
|
|
17987
|
-
passed?: string;
|
|
17988
|
-
failed?: string;
|
|
17989
|
-
score?: string;
|
|
17990
|
-
timeUp?: string;
|
|
17991
|
-
noLives?: string;
|
|
17992
|
-
retry?: string;
|
|
17993
|
-
review?: string;
|
|
17994
|
-
exit?: string;
|
|
17995
|
-
};
|
|
17996
|
-
/** Called when answer is submitted */
|
|
17997
|
-
onAnswerSubmit?: (answer: QuizAnswer) => void;
|
|
17998
|
-
/** Called when quiz is completed */
|
|
17999
|
-
onComplete?: (result: QuizResult) => void;
|
|
18000
|
-
/** Called when quiz is exited early */
|
|
18001
|
-
onExit?: () => void;
|
|
18002
|
-
/** Custom class name */
|
|
18003
|
-
className?: string;
|
|
18004
|
-
/** Children for custom content */
|
|
18005
|
-
children?: ReactNode;
|
|
18006
|
-
}
|
|
18226
|
+
export declare const NiceQuiz: default_2.ForwardRefExoticComponent<AssessmentPresetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
18007
18227
|
|
|
18008
18228
|
export declare const NiceRadioGroup: default_2.FC<NiceRadioGroupProps>;
|
|
18009
18229
|
|
|
@@ -19568,7 +19788,7 @@ export declare interface NiceSensorGaugePanelProps extends NiceBaseProps {
|
|
|
19568
19788
|
* @example
|
|
19569
19789
|
* ```tsx
|
|
19570
19790
|
* <NiceSetupWizard
|
|
19571
|
-
* layout="
|
|
19791
|
+
* layout="vertical"
|
|
19572
19792
|
* steps={[
|
|
19573
19793
|
* { id: 'welcome', title: 'Welcome', content: <WelcomeScreen /> },
|
|
19574
19794
|
* { id: 'account', title: 'Account', fields: [
|
|
@@ -19621,8 +19841,43 @@ export declare interface NiceSetupWizardProps {
|
|
|
19621
19841
|
persistKey?: string;
|
|
19622
19842
|
/** Animation type */
|
|
19623
19843
|
animation?: 'slide' | 'fade' | 'none';
|
|
19624
|
-
/** Brand/logo element
|
|
19844
|
+
/** Brand/logo element. Rendered inline at the start of the header — swap it
|
|
19845
|
+
* per-product (e.g. your own logo + product name). */
|
|
19625
19846
|
branding?: default_2.ReactNode;
|
|
19847
|
+
/**
|
|
19848
|
+
* Show the built-in {@link NiceLanguagePicker} inline in the header, right
|
|
19849
|
+
* after {@link branding}. Default: `false`. Wire it up via
|
|
19850
|
+
* {@link languagePickerProps} (`value` / `onChange` / `allowedCodes` …).
|
|
19851
|
+
*/
|
|
19852
|
+
showLanguagePicker?: boolean;
|
|
19853
|
+
/**
|
|
19854
|
+
* Props forwarded to the built-in header {@link NiceLanguagePicker}. The
|
|
19855
|
+
* wizard defaults it to a dense `compact` `ghost` toolbar control; anything
|
|
19856
|
+
* here overrides those defaults. Provide `value` + `onChange` to control it.
|
|
19857
|
+
*/
|
|
19858
|
+
languagePickerProps?: Partial<NiceLanguagePickerProps>;
|
|
19859
|
+
/**
|
|
19860
|
+
* Show the built-in {@link NiceThemePicker} inline in the header, right after
|
|
19861
|
+
* {@link branding} (and after the language picker when both are shown).
|
|
19862
|
+
* Default: `false`. Wire it up via {@link themePickerProps}.
|
|
19863
|
+
*/
|
|
19864
|
+
showThemePicker?: boolean;
|
|
19865
|
+
/**
|
|
19866
|
+
* Props forwarded to the built-in header {@link NiceThemePicker}. The wizard
|
|
19867
|
+
* defaults it to a dense `compact` `ghost` toolbar control; anything here
|
|
19868
|
+
* overrides those defaults. Provide `value` + `onChange` to control it.
|
|
19869
|
+
*/
|
|
19870
|
+
themePickerProps?: Partial<NiceThemePickerProps>;
|
|
19871
|
+
/**
|
|
19872
|
+
* Show the **restart** control (refresh icon) inline in the header. Clicking
|
|
19873
|
+
* it opens a confirmation popup (unless {@link NiceSetupWizardRestartConfig.skipConfirm})
|
|
19874
|
+
* and then fires {@link onRestart}. Default: `false`.
|
|
19875
|
+
*/
|
|
19876
|
+
showRestart?: boolean;
|
|
19877
|
+
/** Fired when the user confirms the restart action (see {@link showRestart}). */
|
|
19878
|
+
onRestart?: () => void;
|
|
19879
|
+
/** Customize the restart control + its confirmation popup. */
|
|
19880
|
+
restart?: NiceSetupWizardRestartConfig;
|
|
19626
19881
|
/** Header content */
|
|
19627
19882
|
header?: default_2.ReactNode;
|
|
19628
19883
|
/** Footer content */
|
|
@@ -19652,6 +19907,29 @@ export declare interface NiceSetupWizardProps {
|
|
|
19652
19907
|
style?: default_2.CSSProperties;
|
|
19653
19908
|
}
|
|
19654
19909
|
|
|
19910
|
+
/**
|
|
19911
|
+
* Configuration for the built-in header **restart** control — a refresh-icon
|
|
19912
|
+
* button that (by default) opens a confirmation popup before firing
|
|
19913
|
+
* {@link NiceSetupWizardProps.onRestart}. Use it to let operators start the
|
|
19914
|
+
* whole setup process over from the beginning.
|
|
19915
|
+
*/
|
|
19916
|
+
export declare interface NiceSetupWizardRestartConfig {
|
|
19917
|
+
/** Custom icon. Defaults to a refresh / circular-arrow glyph. */
|
|
19918
|
+
icon?: default_2.ReactNode;
|
|
19919
|
+
/** Tooltip + accessible label for the button. */
|
|
19920
|
+
label?: string;
|
|
19921
|
+
/** Confirmation popup title. */
|
|
19922
|
+
confirmTitle?: string;
|
|
19923
|
+
/** Confirmation popup message/body. */
|
|
19924
|
+
confirmMessage?: default_2.ReactNode;
|
|
19925
|
+
/** Confirm (accept) button label. */
|
|
19926
|
+
confirmLabel?: string;
|
|
19927
|
+
/** Cancel (reject) button label. */
|
|
19928
|
+
cancelLabel?: string;
|
|
19929
|
+
/** Skip the confirmation popup and call `onRestart` immediately. Default: `false`. */
|
|
19930
|
+
skipConfirm?: boolean;
|
|
19931
|
+
}
|
|
19932
|
+
|
|
19655
19933
|
export declare interface NiceShellProps extends NiceBaseProps {
|
|
19656
19934
|
/** Navigation data for sidebar / menus. */
|
|
19657
19935
|
menu?: NiceUserMenuResponse;
|
|
@@ -20668,58 +20946,11 @@ declare interface NiceSuffixOption {
|
|
|
20668
20946
|
weight?: number;
|
|
20669
20947
|
}
|
|
20670
20948
|
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
/** Survey title. */
|
|
20677
|
-
title: string;
|
|
20678
|
-
/** Survey description. */
|
|
20679
|
-
description?: string;
|
|
20680
|
-
/** List of questions. */
|
|
20681
|
-
questions: SurveyQuestion[];
|
|
20682
|
-
/** Display mode. */
|
|
20683
|
-
mode?: SurveyDisplayMode;
|
|
20684
|
-
/** Allow going back to previous questions (question-by-question mode). */
|
|
20685
|
-
allowBack?: boolean;
|
|
20686
|
-
/** Show progress indicator. */
|
|
20687
|
-
showProgress?: boolean;
|
|
20688
|
-
/** Show question numbers. */
|
|
20689
|
-
showNumbers?: boolean;
|
|
20690
|
-
/** Time limit for entire survey (seconds). */
|
|
20691
|
-
timeLimit?: number;
|
|
20692
|
-
/** Called when survey is submitted. */
|
|
20693
|
-
onSubmit?: (submission: SurveySubmission) => void;
|
|
20694
|
-
/** Called when an answer changes. */
|
|
20695
|
-
onAnswerChange?: (questionId: string, value: SurveyAnswer['value']) => void;
|
|
20696
|
-
/** Called when time runs out. */
|
|
20697
|
-
onTimeOut?: () => void;
|
|
20698
|
-
/** Initial answers (for resuming). */
|
|
20699
|
-
initialAnswers?: SurveyAnswer[];
|
|
20700
|
-
/** Whether survey is read-only (for review). */
|
|
20701
|
-
readOnly?: boolean;
|
|
20702
|
-
/** Show results after submission. */
|
|
20703
|
-
showResultsAfterSubmit?: boolean;
|
|
20704
|
-
/** Existing results to display. */
|
|
20705
|
-
results?: SurveyResults;
|
|
20706
|
-
/** Custom submit button text. */
|
|
20707
|
-
submitText?: string;
|
|
20708
|
-
/** Custom next button text. */
|
|
20709
|
-
nextText?: string;
|
|
20710
|
-
/** Custom back button text. */
|
|
20711
|
-
backText?: string;
|
|
20712
|
-
/** Custom skip button text. */
|
|
20713
|
-
skipText?: string;
|
|
20714
|
-
/** Participant ID (for tracking). */
|
|
20715
|
-
participantId?: string;
|
|
20716
|
-
/** Participant name (for display). */
|
|
20717
|
-
participantName?: string;
|
|
20718
|
-
/** Theme. */
|
|
20719
|
-
theme?: 'light' | 'dark';
|
|
20720
|
-
/** Custom class name. */
|
|
20721
|
-
className?: string;
|
|
20722
|
-
}
|
|
20949
|
+
/**
|
|
20950
|
+
* {@link NiceSurvey} — no scoring; collects responses and can display aggregate
|
|
20951
|
+
* (global) results via `results` / `fetchAggregateResults`.
|
|
20952
|
+
*/
|
|
20953
|
+
export declare const NiceSurvey: default_2.ForwardRefExoticComponent<AssessmentPresetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
20723
20954
|
|
|
20724
20955
|
/**
|
|
20725
20956
|
* Drop-in replacement for `<React.Suspense>` with a `delay` knob to
|
|
@@ -24688,72 +24919,6 @@ export declare interface PlatformConnection {
|
|
|
24688
24919
|
error?: string;
|
|
24689
24920
|
}
|
|
24690
24921
|
|
|
24691
|
-
/**
|
|
24692
|
-
* Poll configuration
|
|
24693
|
-
*/
|
|
24694
|
-
export declare interface PollConfig {
|
|
24695
|
-
/** Allow multiple selection */
|
|
24696
|
-
multiSelect?: boolean;
|
|
24697
|
-
/** Maximum selections when multiSelect is true */
|
|
24698
|
-
maxSelections?: number;
|
|
24699
|
-
/** Allow changing vote */
|
|
24700
|
-
allowChangeVote?: boolean;
|
|
24701
|
-
/** Show results before voting */
|
|
24702
|
-
showResultsBeforeVote?: boolean;
|
|
24703
|
-
/** Show results after voting */
|
|
24704
|
-
showResultsAfterVote?: boolean;
|
|
24705
|
-
/** Show vote count */
|
|
24706
|
-
showVoteCount?: boolean;
|
|
24707
|
-
/** Show percentages */
|
|
24708
|
-
showPercentages?: boolean;
|
|
24709
|
-
/** Animate results */
|
|
24710
|
-
animateResults?: boolean;
|
|
24711
|
-
/** Poll closes at this date */
|
|
24712
|
-
closesAt?: Date;
|
|
24713
|
-
/** Poll is closed */
|
|
24714
|
-
isClosed?: boolean;
|
|
24715
|
-
/** Allow anonymous voting */
|
|
24716
|
-
anonymous?: boolean;
|
|
24717
|
-
}
|
|
24718
|
-
|
|
24719
|
-
/**
|
|
24720
|
-
* Poll option
|
|
24721
|
-
*/
|
|
24722
|
-
export declare interface PollOption {
|
|
24723
|
-
id: string;
|
|
24724
|
-
text: string;
|
|
24725
|
-
icon?: string;
|
|
24726
|
-
image?: string;
|
|
24727
|
-
color?: string;
|
|
24728
|
-
}
|
|
24729
|
-
|
|
24730
|
-
/**
|
|
24731
|
-
* Poll results for an option
|
|
24732
|
-
*/
|
|
24733
|
-
export declare interface PollOptionResult {
|
|
24734
|
-
optionId: string;
|
|
24735
|
-
votes: number;
|
|
24736
|
-
percentage: number;
|
|
24737
|
-
}
|
|
24738
|
-
|
|
24739
|
-
/**
|
|
24740
|
-
* Poll results
|
|
24741
|
-
*/
|
|
24742
|
-
export declare interface PollResults {
|
|
24743
|
-
totalVotes: number;
|
|
24744
|
-
options: PollOptionResult[];
|
|
24745
|
-
lastUpdated: Date;
|
|
24746
|
-
}
|
|
24747
|
-
|
|
24748
|
-
/**
|
|
24749
|
-
* Poll vote
|
|
24750
|
-
*/
|
|
24751
|
-
export declare interface PollVote {
|
|
24752
|
-
optionId: string;
|
|
24753
|
-
voterId?: string;
|
|
24754
|
-
timestamp: Date;
|
|
24755
|
-
}
|
|
24756
|
-
|
|
24757
24922
|
/**
|
|
24758
24923
|
* Port position
|
|
24759
24924
|
*/
|
|
@@ -25045,75 +25210,6 @@ declare interface QuickFilter<T = any> {
|
|
|
25045
25210
|
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'secondary';
|
|
25046
25211
|
}
|
|
25047
25212
|
|
|
25048
|
-
/**
|
|
25049
|
-
* Quiz answer
|
|
25050
|
-
*/
|
|
25051
|
-
export declare interface QuizAnswer {
|
|
25052
|
-
questionId: string;
|
|
25053
|
-
value: string | string[];
|
|
25054
|
-
isCorrect: boolean;
|
|
25055
|
-
timeTaken: number;
|
|
25056
|
-
pointsEarned: number;
|
|
25057
|
-
hintsUsed?: number;
|
|
25058
|
-
}
|
|
25059
|
-
|
|
25060
|
-
/**
|
|
25061
|
-
* Quiz difficulty level
|
|
25062
|
-
*/
|
|
25063
|
-
export declare type QuizDifficulty = 'easy' | 'medium' | 'hard';
|
|
25064
|
-
|
|
25065
|
-
/**
|
|
25066
|
-
* Quiz lifeline type
|
|
25067
|
-
*/
|
|
25068
|
-
export declare type QuizLifeline = 'fiftyFifty' | 'hint' | 'skipQuestion' | 'extraTime';
|
|
25069
|
-
|
|
25070
|
-
/**
|
|
25071
|
-
* Quiz option
|
|
25072
|
-
*/
|
|
25073
|
-
export declare interface QuizOption {
|
|
25074
|
-
id: string;
|
|
25075
|
-
text: string;
|
|
25076
|
-
icon?: string;
|
|
25077
|
-
image?: string;
|
|
25078
|
-
}
|
|
25079
|
-
|
|
25080
|
-
/**
|
|
25081
|
-
* Quiz question
|
|
25082
|
-
*/
|
|
25083
|
-
export declare interface QuizQuestion {
|
|
25084
|
-
id: string;
|
|
25085
|
-
type: QuizQuestionType;
|
|
25086
|
-
text: string;
|
|
25087
|
-
description?: string;
|
|
25088
|
-
image?: string;
|
|
25089
|
-
options?: QuizOption[];
|
|
25090
|
-
correctAnswer: string | string[];
|
|
25091
|
-
points?: number;
|
|
25092
|
-
timeLimit?: number;
|
|
25093
|
-
difficulty?: QuizDifficulty;
|
|
25094
|
-
explanation?: string;
|
|
25095
|
-
hint?: string;
|
|
25096
|
-
}
|
|
25097
|
-
|
|
25098
|
-
/**
|
|
25099
|
-
* Quiz question type
|
|
25100
|
-
*/
|
|
25101
|
-
export declare type QuizQuestionType = 'single' | 'multiple' | 'text' | 'trueFalse' | 'ordering';
|
|
25102
|
-
|
|
25103
|
-
/**
|
|
25104
|
-
* Quiz result
|
|
25105
|
-
*/
|
|
25106
|
-
export declare interface QuizResult {
|
|
25107
|
-
totalQuestions: number;
|
|
25108
|
-
answeredCorrectly: number;
|
|
25109
|
-
totalPoints: number;
|
|
25110
|
-
maxPoints: number;
|
|
25111
|
-
percentageScore: number;
|
|
25112
|
-
timeTaken: number;
|
|
25113
|
-
answers: QuizAnswer[];
|
|
25114
|
-
passed: boolean;
|
|
25115
|
-
}
|
|
25116
|
-
|
|
25117
25213
|
export { RADIUS_VALUES }
|
|
25118
25214
|
|
|
25119
25215
|
export { RadiusVariant }
|
|
@@ -26108,8 +26204,9 @@ export declare interface SetupWizardContext {
|
|
|
26108
26204
|
t: (key: string, defaultValue: string) => string;
|
|
26109
26205
|
}
|
|
26110
26206
|
|
|
26111
|
-
/** Layout variant
|
|
26112
|
-
|
|
26207
|
+
/** Layout variant. (`cards` + `sidebar` removed in 1.0.28; `vertical` now renders
|
|
26208
|
+
* the former sidebar-style stepper column with sticky, independently-scrollable nav.) */
|
|
26209
|
+
export declare type SetupWizardLayout = 'horizontal' | 'vertical' | 'minimal';
|
|
26113
26210
|
|
|
26114
26211
|
/** Step definition */
|
|
26115
26212
|
export declare interface SetupWizardStep {
|
|
@@ -26138,7 +26235,7 @@ export declare interface SetupWizardStep {
|
|
|
26138
26235
|
minDuration?: number;
|
|
26139
26236
|
/** Summary to show in review step */
|
|
26140
26237
|
summary?: (values: Record<string, unknown>) => default_2.ReactNode;
|
|
26141
|
-
/** Category/group for
|
|
26238
|
+
/** Category/group for the vertical layout stepper */
|
|
26142
26239
|
category?: string;
|
|
26143
26240
|
/** Badge to show on step indicator */
|
|
26144
26241
|
badge?: default_2.ReactNode;
|
|
@@ -26194,6 +26291,8 @@ export declare interface SidebarNavDataNode {
|
|
|
26194
26291
|
export declare interface SidebarNavDataSource {
|
|
26195
26292
|
id: string;
|
|
26196
26293
|
label: string;
|
|
26294
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26295
|
+
tooltip?: ReactNode;
|
|
26197
26296
|
icon?: ReactNode;
|
|
26198
26297
|
color?: string;
|
|
26199
26298
|
/** Server URL or connection string hint */
|
|
@@ -26205,6 +26304,8 @@ export declare interface SidebarNavDataSource {
|
|
|
26205
26304
|
export declare interface SidebarNavFavorite {
|
|
26206
26305
|
id: string;
|
|
26207
26306
|
label: string;
|
|
26307
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26308
|
+
tooltip?: ReactNode;
|
|
26208
26309
|
icon?: ReactNode;
|
|
26209
26310
|
route?: string;
|
|
26210
26311
|
sourceId?: string;
|
|
@@ -26249,6 +26350,8 @@ export declare type SidebarNavMode = 'all' | 'by-role' | 'by-unit' | 'favorites'
|
|
|
26249
26350
|
export declare interface SidebarNavModule {
|
|
26250
26351
|
id: string;
|
|
26251
26352
|
label: string;
|
|
26353
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26354
|
+
tooltip?: ReactNode;
|
|
26252
26355
|
icon?: ReactNode;
|
|
26253
26356
|
views: SidebarNavView[];
|
|
26254
26357
|
/** Source this module belongs to */
|
|
@@ -26259,6 +26362,8 @@ export declare interface SidebarNavModule {
|
|
|
26259
26362
|
export declare interface SidebarNavRole {
|
|
26260
26363
|
id: string;
|
|
26261
26364
|
label: string;
|
|
26365
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26366
|
+
tooltip?: ReactNode;
|
|
26262
26367
|
icon?: ReactNode;
|
|
26263
26368
|
modules: SidebarNavModule[];
|
|
26264
26369
|
/** Source this role belongs to */
|
|
@@ -26269,6 +26374,8 @@ export declare interface SidebarNavRole {
|
|
|
26269
26374
|
export declare interface SidebarNavUnit {
|
|
26270
26375
|
id: string;
|
|
26271
26376
|
label: string;
|
|
26377
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26378
|
+
tooltip?: ReactNode;
|
|
26272
26379
|
icon?: ReactNode;
|
|
26273
26380
|
modules: SidebarNavModule[];
|
|
26274
26381
|
/** Source this unit belongs to */
|
|
@@ -26322,6 +26429,8 @@ export declare interface SidebarNavUserPrefs {
|
|
|
26322
26429
|
export declare interface SidebarNavView {
|
|
26323
26430
|
id: string;
|
|
26324
26431
|
label: string;
|
|
26432
|
+
/** Custom hover tooltip. Falls back to `label` when omitted. */
|
|
26433
|
+
tooltip?: ReactNode;
|
|
26325
26434
|
icon?: ReactNode;
|
|
26326
26435
|
/** Route path for navigation */
|
|
26327
26436
|
route?: string;
|
|
@@ -26866,60 +26975,6 @@ declare interface SuggestionFactor {
|
|
|
26866
26975
|
entryValue?: string;
|
|
26867
26976
|
}
|
|
26868
26977
|
|
|
26869
|
-
export declare interface SurveyAnswer {
|
|
26870
|
-
questionId: string;
|
|
26871
|
-
value: string | string[] | number | null;
|
|
26872
|
-
answeredAt?: string;
|
|
26873
|
-
timeSpent?: number;
|
|
26874
|
-
}
|
|
26875
|
-
|
|
26876
|
-
export declare type SurveyDisplayMode = 'all-at-once' | 'question-by-question' | 'timed';
|
|
26877
|
-
|
|
26878
|
-
export declare interface SurveyOption {
|
|
26879
|
-
id: string;
|
|
26880
|
-
text: string;
|
|
26881
|
-
icon?: default_2.ReactNode;
|
|
26882
|
-
imageUrl?: string;
|
|
26883
|
-
}
|
|
26884
|
-
|
|
26885
|
-
export declare interface SurveyQuestion {
|
|
26886
|
-
id: string;
|
|
26887
|
-
text: string;
|
|
26888
|
-
description?: string;
|
|
26889
|
-
type: SurveyQuestionType;
|
|
26890
|
-
options?: SurveyOption[];
|
|
26891
|
-
required?: boolean;
|
|
26892
|
-
minValue?: number;
|
|
26893
|
-
maxValue?: number;
|
|
26894
|
-
placeholder?: string;
|
|
26895
|
-
timeLimit?: number;
|
|
26896
|
-
imageUrl?: string;
|
|
26897
|
-
category?: string;
|
|
26898
|
-
}
|
|
26899
|
-
|
|
26900
|
-
export declare type SurveyQuestionType = 'single' | 'multiple' | 'text' | 'rating' | 'scale' | 'date' | 'time';
|
|
26901
|
-
|
|
26902
|
-
export declare interface SurveyResults {
|
|
26903
|
-
totalResponses: number;
|
|
26904
|
-
questionStats: Record<string, {
|
|
26905
|
-
responses: number;
|
|
26906
|
-
optionCounts: Record<string, number>;
|
|
26907
|
-
averageRating?: number;
|
|
26908
|
-
textResponses?: string[];
|
|
26909
|
-
}>;
|
|
26910
|
-
}
|
|
26911
|
-
|
|
26912
|
-
export declare interface SurveySubmission {
|
|
26913
|
-
id: string;
|
|
26914
|
-
surveyId: string;
|
|
26915
|
-
participantId?: string;
|
|
26916
|
-
participantName?: string;
|
|
26917
|
-
answers: SurveyAnswer[];
|
|
26918
|
-
submittedAt: string;
|
|
26919
|
-
totalTime: number;
|
|
26920
|
-
completed: boolean;
|
|
26921
|
-
}
|
|
26922
|
-
|
|
26923
26978
|
/** Swap event types. */
|
|
26924
26979
|
export declare type SwapEventType = 'swap-start' | 'swap-success' | 'swap-error' | 'swap-rollback';
|
|
26925
26980
|
|
|
@@ -28084,6 +28139,59 @@ export { useAICompletion }
|
|
|
28084
28139
|
*/
|
|
28085
28140
|
export declare function useAnalytics(): AnalyticsContextValue;
|
|
28086
28141
|
|
|
28142
|
+
export declare function useAssessment(opts: UseAssessmentOptions): UseAssessmentReturn;
|
|
28143
|
+
|
|
28144
|
+
declare interface UseAssessmentOptions {
|
|
28145
|
+
id?: string;
|
|
28146
|
+
mode: AssessmentMode;
|
|
28147
|
+
pages?: AssessmentPage[];
|
|
28148
|
+
questions?: AssessmentQuestion[];
|
|
28149
|
+
sections?: AssessmentSection[];
|
|
28150
|
+
scoring?: AssessmentScoringConfig;
|
|
28151
|
+
timer?: AssessmentTimerConfig;
|
|
28152
|
+
shuffleQuestions?: boolean;
|
|
28153
|
+
shuffleOptions?: boolean;
|
|
28154
|
+
randomizeSeed?: string | number;
|
|
28155
|
+
pool?: {
|
|
28156
|
+
count: number;
|
|
28157
|
+
section?: string;
|
|
28158
|
+
};
|
|
28159
|
+
lockNavigation?: boolean;
|
|
28160
|
+
allowBack?: boolean;
|
|
28161
|
+
persistKey?: string;
|
|
28162
|
+
/** Translator (injected by the shell). Defaults to the fallback string. */
|
|
28163
|
+
t?: (key: string, defaultValue: string) => string;
|
|
28164
|
+
onAnswer?: (answer: AssessmentAnswer) => void;
|
|
28165
|
+
onPageChange?: (pageId: string, index: number) => void;
|
|
28166
|
+
onComplete?: (result: AssessmentResult) => void | Promise<void>;
|
|
28167
|
+
onSubmit?: (submission: AssessmentSubmission) => void | Promise<void>;
|
|
28168
|
+
onTimeout?: (scope: 'total' | 'page' | 'question') => void;
|
|
28169
|
+
}
|
|
28170
|
+
|
|
28171
|
+
declare interface UseAssessmentReturn {
|
|
28172
|
+
ctx: AssessmentContext;
|
|
28173
|
+
pages: AssessmentPage[];
|
|
28174
|
+
currentPage: AssessmentPage | undefined;
|
|
28175
|
+
currentIndex: number;
|
|
28176
|
+
totalPages: number;
|
|
28177
|
+
isFirst: boolean;
|
|
28178
|
+
isLast: boolean;
|
|
28179
|
+
progress: number;
|
|
28180
|
+
answers: Record<string, AssessmentAnswerValue>;
|
|
28181
|
+
setAnswer: (questionId: string, value: AssessmentAnswerValue) => void;
|
|
28182
|
+
getAnswer: (questionId: string) => AssessmentAnswerValue;
|
|
28183
|
+
goNext: () => void;
|
|
28184
|
+
goPrev: () => void;
|
|
28185
|
+
goTo: (pageId: string) => void;
|
|
28186
|
+
skip: () => void;
|
|
28187
|
+
submit: () => void;
|
|
28188
|
+
restart: () => void;
|
|
28189
|
+
completed: boolean;
|
|
28190
|
+
result: AssessmentResult | null;
|
|
28191
|
+
submission: AssessmentSubmission | null;
|
|
28192
|
+
timeLeft: number | null;
|
|
28193
|
+
}
|
|
28194
|
+
|
|
28087
28195
|
export declare function useAuditLog(options?: UseAuditLogOptions): UseAuditLogResult;
|
|
28088
28196
|
|
|
28089
28197
|
export declare interface UseAuditLogOptions {
|