@exxatdesignux/ui 0.3.0 → 0.4.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/CHANGELOG.md +701 -6
- package/README.md +138 -0
- package/bin/init.mjs +134 -31
- package/consumer-extras/cursor-rules/exxat-board-cards.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +2 -2
- package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-data-tables.mdc +2 -0
- package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +3 -3
- package/consumer-extras/cursor-rules/exxat-library-hub-header.mdc +28 -0
- package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +6 -6
- package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +1 -1
- package/consumer-extras/cursor-skills/exxat-board-cards/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-collaboration-access/SKILL.md +3 -3
- package/consumer-extras/cursor-skills/exxat-dedicated-search-surfaces/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +7 -7
- package/consumer-extras/cursor-skills/exxat-kpi-flat-band/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-list-page-view-shells/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-mono-ids/SKILL.md +4 -4
- package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +8 -8
- package/consumer-extras/cursor-skills/exxat-token-economy/SKILL.md +277 -0
- package/consumer-extras/handbook/HANDBOOK.md +2 -0
- package/consumer-extras/handbook/glossary.md +2 -1
- package/consumer-extras/handbook/reference-implementations.md +31 -4
- package/consumer-extras/patterns/collaboration-access-pattern.md +7 -7
- package/consumer-extras/patterns/data-views-pattern.md +18 -16
- package/consumer-extras/patterns/kpi-flat-band-pattern.md +2 -2
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/data-table/pagination.js +3 -3
- package/dist/components/data-table/pagination.js.map +1 -1
- package/dist/components/data-table/use-table-state.d.ts +1 -1
- package/dist/components/data-table/use-table-state.js.map +1 -1
- package/dist/components/data-views/data-row-list.js.map +1 -1
- package/dist/components/data-views/finder-panel-view.d.ts +1 -1
- package/dist/components/data-views/finder-panel-view.js.map +1 -1
- package/dist/components/data-views/hub-table.d.ts +9 -3
- package/dist/components/data-views/hub-table.js +262 -40
- package/dist/components/data-views/hub-table.js.map +1 -1
- package/dist/components/data-views/index.js +262 -40
- package/dist/components/data-views/index.js.map +1 -1
- package/dist/components/data-views/list-page-split-hub-tokens.d.ts +2 -2
- package/dist/components/data-views/list-page-split-hub-tokens.js.map +1 -1
- package/dist/components/data-views/list-page-tree-column-header.d.ts +1 -1
- package/dist/components/data-views/list-page-tree-column-header.js.map +1 -1
- package/dist/components/data-views/list-page-tree-panel-shell.js.map +1 -1
- package/dist/components/data-views/os-folder-glyph.d.ts +1 -1
- package/dist/components/data-views/os-folder-glyph.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +1 -1
- package/dist/components/ui/key-metrics.js.map +1 -1
- package/dist/index.js +136 -39
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/components/data-table/index.tsx +2 -2
- package/src/components/data-table/pagination.tsx +5 -1
- package/src/components/data-table/use-table-state.ts +1 -1
- package/src/components/data-views/data-row-list.tsx +1 -1
- package/src/components/data-views/finder-panel-view.tsx +2 -2
- package/src/components/data-views/hub-table.tsx +149 -41
- package/src/components/data-views/list-page-split-hub-tokens.ts +2 -2
- package/src/components/data-views/list-page-tree-column-header.tsx +1 -1
- package/src/components/data-views/os-folder-glyph.tsx +1 -1
- package/src/components/ui/key-metrics.tsx +1 -1
- package/template/.claude/skills/exxat-ds-skill/SKILL.md +8 -7
- package/template/.cursor/rules/exxat-accessibility.mdc +1 -1
- package/template/.cursor/rules/exxat-command-menu.mdc +1 -1
- package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +6 -6
- package/template/.cursor/rules/exxat-data-tables.mdc +3 -3
- package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +5 -5
- package/template/.cursor/rules/exxat-mono-ids.mdc +1 -1
- package/template/.cursor/rules/exxat-page-vs-drawer.mdc +1 -1
- package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
- package/template/AGENTS.md +43 -37
- package/template/app/(app)/columns/page.tsx +11 -0
- package/template/app/(app)/library/all/page.tsx +11 -0
- package/template/app/(app)/library/find/page.tsx +12 -0
- package/template/app/(app)/{question-bank → library}/layout.tsx +16 -16
- package/template/app/(app)/library/list/page.tsx +12 -0
- package/template/app/(app)/{question-bank → library}/new/page.tsx +10 -10
- package/template/app/(app)/library/page.tsx +11 -0
- package/template/app/(app)/tokens-themes/page.tsx +11 -0
- package/template/components/ask-leo-composer.tsx +2 -2
- package/template/components/columns-client.tsx +158 -0
- package/template/components/columns-showcase.tsx +541 -0
- package/template/components/data-views/index.ts +32 -6
- package/template/components/data-views/{question-bank-folder-tree-branch.tsx → library-folder-tree-branch.tsx} +19 -19
- package/template/components/data-views/table-cells.tsx +673 -0
- package/template/components/folder-details-shell.tsx +11 -11
- package/template/components/hub-tree-panel-view.tsx +24 -24
- package/template/components/{question-bank-board-view.tsx → library-board-view.tsx} +44 -44
- package/template/components/{question-bank-client.tsx → library-client.tsx} +82 -82
- package/template/components/{question-bank-dashboard-charts.tsx → library-dashboard-charts.tsx} +14 -14
- package/template/components/{question-bank-favorite-button.tsx → library-favorite-button.tsx} +7 -7
- package/template/components/{question-bank-hub-client.tsx → library-hub-client.tsx} +43 -43
- package/template/components/{question-bank-new-folder-sheet.tsx → library-new-folder-sheet.tsx} +14 -14
- package/template/components/{question-bank-os-folder-view.tsx → library-os-folder-view.tsx} +31 -31
- package/template/components/{question-bank-page-header.tsx → library-page-header.tsx} +6 -6
- package/template/components/library-panel-activator.tsx +8 -0
- package/template/components/{question-bank-secondary-nav.tsx → library-secondary-nav.tsx} +60 -60
- package/template/components/{question-bank-table.tsx → library-table.tsx} +97 -97
- package/template/components/list-hub-status-badge.tsx +2 -2
- package/template/components/{new-question-composer.tsx → new-library-item-form.tsx} +37 -37
- package/template/components/sidebar/app-sidebar.tsx +61 -5
- package/template/components/sidebar/secondary-panel.tsx +109 -56
- package/template/components/sidebar/sidebar-auto-collapse.tsx +2 -2
- package/template/components/sidebar/sidebar-auto-open.tsx +2 -1
- package/template/components/table-properties/types.ts +1 -1
- package/template/components/templates/discovery-hub-template.tsx +1 -1
- package/template/components/templates/new-focus-template.tsx +2 -2
- package/template/components/templates/secondary-panel-hub-template.tsx +1 -1
- package/template/components/tokens-secondary-nav.tsx +192 -0
- package/template/components/tokens-themes-client.tsx +476 -0
- package/template/components/tokens-themes-section.tsx +386 -0
- package/template/docs/HANDBOOK.md +187 -0
- package/template/docs/blueprints/README.md +1 -1
- package/template/docs/blueprints/board-card.md +1 -1
- package/template/docs/blueprints/data-table.md +2 -2
- package/template/docs/blueprints/list-page-template.md +3 -3
- package/template/docs/blueprints/page-header.md +4 -4
- package/template/docs/collaboration-access-pattern.md +7 -7
- package/template/docs/component-selection-guide.md +1 -1
- package/template/docs/data-views-pattern.md +18 -16
- package/template/docs/glossary.md +58 -0
- package/template/docs/kpi-flat-band-pattern.md +3 -3
- package/template/docs/kpi-trend-pattern.md +18 -3
- package/template/docs/large-dataset-strategy.md +155 -0
- package/template/docs/library-hub-header-pattern.md +25 -0
- package/template/docs/migrations/_template.md +1 -1
- package/template/docs/reference-implementations.md +151 -0
- package/template/docs/token-taxonomy.md +1 -1
- package/template/docs/voice-and-tone.md +262 -0
- package/template/eslint.config.mjs +9 -39
- package/template/hooks/use-secondary-panel-hub-nav.ts +10 -10
- package/template/lib/ask-leo-route-context.ts +6 -18
- package/template/lib/coach-mark-registry.ts +0 -16
- package/template/lib/command-menu-config.ts +5 -12
- package/template/lib/command-menu-search-data.ts +8 -39
- package/template/lib/{question-bank-authoring.ts → library-authoring.ts} +89 -88
- package/template/lib/library-dedicated-search.ts +19 -0
- package/template/lib/library-hub-search.ts +90 -0
- package/template/lib/library-nav.ts +477 -0
- package/template/lib/library-recent-searches.ts +22 -0
- package/template/lib/{placements-supported-views.ts → library-supported-views.ts} +2 -2
- package/template/lib/list-status-badges.ts +16 -104
- package/template/lib/mock/dashboard.ts +1 -1
- package/template/lib/mock/{question-bank-folders.ts → library-folders.ts} +30 -30
- package/template/lib/mock/library-header-collaborators.ts +54 -0
- package/template/lib/mock/{question-bank-inspector.ts → library-inspector.ts} +29 -29
- package/template/lib/mock/{question-bank-kpi.ts → library-kpi.ts} +20 -20
- package/template/lib/mock/library.ts +249 -0
- package/template/lib/mock/navigation.tsx +32 -26
- package/template/lib/table-state-lifecycle.ts +1 -1
- package/template/next.config.mjs +7 -4
- package/template/package.json +0 -1
- package/tokens/hooks-index.json +2874 -0
- package/consumer-extras/cursor-rules/exxat-question-bank-hub-header.mdc +0 -28
- package/template/app/(app)/examples/page.tsx +0 -41
- package/template/app/(app)/question-bank/find/page.tsx +0 -12
- package/template/app/(app)/question-bank/library/page.tsx +0 -11
- package/template/app/(app)/question-bank/list/page.tsx +0 -12
- package/template/app/(app)/question-bank/page.tsx +0 -11
- package/template/components/compliance-board-view.tsx +0 -142
- package/template/components/compliance-client.tsx +0 -92
- package/template/components/compliance-page-header.tsx +0 -89
- package/template/components/compliance-table.tsx +0 -468
- package/template/components/data-view-dashboard-charts-compliance.tsx +0 -963
- package/template/components/data-view-dashboard-charts-team.tsx +0 -971
- package/template/components/data-view-dashboard-charts.tsx +0 -1503
- package/template/components/new-placement-back-btn.tsx +0 -28
- package/template/components/new-placement-form.tsx +0 -942
- package/template/components/placement-board-card.tsx +0 -250
- package/template/components/placement-detail.tsx +0 -438
- package/template/components/placements-board-view.tsx +0 -397
- package/template/components/placements-client.tsx +0 -220
- package/template/components/placements-list-view.tsx +0 -124
- package/template/components/placements-page-header.tsx +0 -166
- package/template/components/placements-table-cells.test.tsx +0 -22
- package/template/components/placements-table-cells.tsx +0 -173
- package/template/components/placements-table-columns.tsx +0 -210
- package/template/components/placements-table.tsx +0 -934
- package/template/components/question-bank-panel-activator.tsx +0 -8
- package/template/components/rotations-empty-state.tsx +0 -50
- package/template/components/rotations-panel-activator.tsx +0 -8
- package/template/components/sites-board-view.tsx +0 -67
- package/template/components/sites-client.tsx +0 -154
- package/template/components/sites-table.tsx +0 -249
- package/template/components/team-board-view.tsx +0 -122
- package/template/components/team-client.tsx +0 -100
- package/template/components/team-page-header.tsx +0 -92
- package/template/components/team-table.tsx +0 -553
- package/template/docs/question-bank-hub-header-pattern.md +0 -25
- package/template/lib/compliance-supported-views.ts +0 -10
- package/template/lib/data-view-dashboard-placements-layout.ts +0 -215
- package/template/lib/mock/compliance-kpi.ts +0 -61
- package/template/lib/mock/compliance.ts +0 -146
- package/template/lib/mock/placements-kpi.ts +0 -134
- package/template/lib/mock/placements.ts +0 -176
- package/template/lib/mock/question-bank-header-collaborators.ts +0 -54
- package/template/lib/mock/question-bank.ts +0 -249
- package/template/lib/mock/sites-directory.ts +0 -16
- package/template/lib/mock/sites-kpi.ts +0 -25
- package/template/lib/mock/team-kpi.ts +0 -60
- package/template/lib/mock/team.ts +0 -118
- package/template/lib/placement-board-card-layout.ts +0 -79
- package/template/lib/question-bank-dedicated-search.ts +0 -19
- package/template/lib/question-bank-hub-search.ts +0 -90
- package/template/lib/question-bank-nav.ts +0 -477
- package/template/lib/question-bank-recent-searches.ts +0 -22
- package/template/lib/question-bank-supported-views.ts +0 -12
- package/template/lib/sites-supported-views.ts +0 -10
- package/template/lib/team-supported-views.ts +0 -10
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mock team directory — replace with API data in production.
|
|
3
|
-
* Kept at 11+ rows so the Team page demonstrates search / sort / properties toolbar (see data-views-pattern.md).
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface TeamMember extends Record<string, unknown> {
|
|
7
|
-
id: string
|
|
8
|
-
name: string
|
|
9
|
-
role: string
|
|
10
|
-
email: string
|
|
11
|
-
/** US 10-digit storage (filter uses masked entry; matching normalizes digits). */
|
|
12
|
-
phone: string
|
|
13
|
-
initials: string
|
|
14
|
-
/** Shown as a subtle status chip */
|
|
15
|
-
status: "active" | "away" | "invited"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const TEAM_MEMBERS: TeamMember[] = [
|
|
19
|
-
{
|
|
20
|
-
id: "1",
|
|
21
|
-
name: "Alex Rivera",
|
|
22
|
-
role: "Program Administrator",
|
|
23
|
-
email: "alex.rivera@school.edu",
|
|
24
|
-
phone: "5550100001",
|
|
25
|
-
initials: "AR",
|
|
26
|
-
status: "active",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: "2",
|
|
30
|
-
name: "Jordan Chen",
|
|
31
|
-
role: "Clinical Coordinator",
|
|
32
|
-
email: "jordan.chen@school.edu",
|
|
33
|
-
phone: "5550100002",
|
|
34
|
-
initials: "JC",
|
|
35
|
-
status: "active",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "3",
|
|
39
|
-
name: "Sam Patel",
|
|
40
|
-
role: "Field Education",
|
|
41
|
-
email: "sam.patel@school.edu",
|
|
42
|
-
phone: "5550100003",
|
|
43
|
-
initials: "SP",
|
|
44
|
-
status: "away",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: "4",
|
|
48
|
-
name: "Taylor Brooks",
|
|
49
|
-
role: "Viewer",
|
|
50
|
-
email: "taylor.brooks@school.edu",
|
|
51
|
-
phone: "5550100004",
|
|
52
|
-
initials: "TB",
|
|
53
|
-
status: "invited",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: "5",
|
|
57
|
-
name: "Morgan Lee",
|
|
58
|
-
role: "Program Administrator",
|
|
59
|
-
email: "morgan.lee@school.edu",
|
|
60
|
-
phone: "5550100005",
|
|
61
|
-
initials: "ML",
|
|
62
|
-
status: "active",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "6",
|
|
66
|
-
name: "Casey Nguyen",
|
|
67
|
-
role: "Clinical Coordinator",
|
|
68
|
-
email: "casey.nguyen@school.edu",
|
|
69
|
-
phone: "5550100006",
|
|
70
|
-
initials: "CN",
|
|
71
|
-
status: "active",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "7",
|
|
75
|
-
name: "Riley Johnson",
|
|
76
|
-
role: "Field Education",
|
|
77
|
-
email: "riley.johnson@school.edu",
|
|
78
|
-
phone: "5550100007",
|
|
79
|
-
initials: "RJ",
|
|
80
|
-
status: "away",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "8",
|
|
84
|
-
name: "Quinn Martinez",
|
|
85
|
-
role: "Viewer",
|
|
86
|
-
email: "quinn.martinez@school.edu",
|
|
87
|
-
phone: "5550100008",
|
|
88
|
-
initials: "QM",
|
|
89
|
-
status: "active",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
id: "9",
|
|
93
|
-
name: "Jamie Wilson",
|
|
94
|
-
role: "Program Administrator",
|
|
95
|
-
email: "jamie.wilson@school.edu",
|
|
96
|
-
phone: "5550100009",
|
|
97
|
-
initials: "JW",
|
|
98
|
-
status: "invited",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: "10",
|
|
102
|
-
name: "Drew Anderson",
|
|
103
|
-
role: "Clinical Coordinator",
|
|
104
|
-
email: "drew.anderson@school.edu",
|
|
105
|
-
phone: "5550100010",
|
|
106
|
-
initials: "DA",
|
|
107
|
-
status: "active",
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: "11",
|
|
111
|
-
name: "Skyler Kim",
|
|
112
|
-
role: "Field Education",
|
|
113
|
-
email: "skyler.kim@school.edu",
|
|
114
|
-
phone: "5550100011",
|
|
115
|
-
initials: "SK",
|
|
116
|
-
status: "active",
|
|
117
|
-
},
|
|
118
|
-
]
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Board placement card layout — which fields appear on the card by default,
|
|
3
|
-
* which keys are grouped into header / site / schedule blocks, and helpers to
|
|
4
|
-
* resolve "active" fields against current column visibility.
|
|
5
|
-
*
|
|
6
|
-
* Previously parameterized by `lifecycleTabId` (all / upcoming / ongoing / completed).
|
|
7
|
-
* Lifecycle has been removed — one canonical card definition is used everywhere
|
|
8
|
-
* and the card falls back to existing row data when a column is hidden.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { ColumnDef } from "@/components/data-table/types"
|
|
12
|
-
import type { Placement } from "@/lib/mock/placements"
|
|
13
|
-
|
|
14
|
-
/** Default card fields — intersected with visible table columns (except header-only rules below). */
|
|
15
|
-
export const DEFAULT_BOARD_CARD_KEYS: readonly string[] = [
|
|
16
|
-
"student",
|
|
17
|
-
"specialization",
|
|
18
|
-
"site",
|
|
19
|
-
"status",
|
|
20
|
-
"internship",
|
|
21
|
-
"start",
|
|
22
|
-
"duration",
|
|
23
|
-
"progressWeeksDone",
|
|
24
|
-
"endDate",
|
|
25
|
-
"daysUntilStart",
|
|
26
|
-
"completionDate",
|
|
27
|
-
"finalStatus",
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
export const SCHEDULE_KEYS: readonly string[] = [
|
|
31
|
-
"start",
|
|
32
|
-
"duration",
|
|
33
|
-
"daysUntilStart",
|
|
34
|
-
"progressWeeksDone",
|
|
35
|
-
"endDate",
|
|
36
|
-
"completionDate",
|
|
37
|
-
"finalStatus",
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
/** Keys rendered in the title/header cluster (not as icon rows). */
|
|
41
|
-
export function consumedKeysForCard(): Set<string> {
|
|
42
|
-
return new Set<string>(["student", "status", "site", ...SCHEDULE_KEYS])
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function isKeyInBoardWhitelist(key: string): boolean {
|
|
46
|
-
return DEFAULT_BOARD_CARD_KEYS.includes(key)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Field is allowed on the card when it is in the whitelist, not hidden, and either
|
|
51
|
-
* the column exists in this view and is visible, or the column does not exist —
|
|
52
|
-
* then we still show from row data for header/summary fields.
|
|
53
|
-
*/
|
|
54
|
-
export function isBoardFieldActive<Row extends Placement>(
|
|
55
|
-
key: string,
|
|
56
|
-
hiddenColKeys: Set<string>,
|
|
57
|
-
boardColumns: ColumnDef<Row>[],
|
|
58
|
-
): boolean {
|
|
59
|
-
if (hiddenColKeys.has(key)) return false
|
|
60
|
-
if (!isKeyInBoardWhitelist(key)) return false
|
|
61
|
-
const hasCol = boardColumns.some(c => c.key === key)
|
|
62
|
-
if (!hasCol) return true
|
|
63
|
-
return boardColumns.some(c => c.key === key && !hiddenColKeys.has(c.key))
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** Visible columns that pass whitelist (intersection). Order follows boardColumns. */
|
|
67
|
-
export function filterColumnsForBoardCard<Row extends Placement>(
|
|
68
|
-
visibleCols: ColumnDef<Row>[],
|
|
69
|
-
): ColumnDef<Row>[] {
|
|
70
|
-
return visibleCols.filter(c => isKeyInBoardWhitelist(c.key))
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** Body rows only: columns not consumed by title, header badges, site block, or schedule block. */
|
|
74
|
-
export function remainingBodyColumns<Row extends Placement>(
|
|
75
|
-
cardCols: ColumnDef<Row>[],
|
|
76
|
-
): ColumnDef<Row>[] {
|
|
77
|
-
const consumed = consumedKeysForCard()
|
|
78
|
-
return cardCols.filter(c => !consumed.has(c.key))
|
|
79
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { patchQuestionBankUrlSearchParams } from "@/lib/question-bank-nav"
|
|
2
|
-
|
|
3
|
-
/** Rotating example queries for dedicated search composers on list/find surfaces. */
|
|
4
|
-
export const QUESTION_BANK_DEDICATED_SEARCH_PLACEHOLDERS = [
|
|
5
|
-
"all the questions I used in last year's assessment",
|
|
6
|
-
"what did we run for the spring OSCE checkout?",
|
|
7
|
-
"Clinical folder, cardiology tagged, for third-year summative",
|
|
8
|
-
"find QB-2024-0012 and anything like it",
|
|
9
|
-
"that anemia vignette from the shelf-style block",
|
|
10
|
-
"MCQs I still need before next week's diabetes station",
|
|
11
|
-
] as const
|
|
12
|
-
|
|
13
|
-
export function patchQuestionBankDedicatedSearchParams(
|
|
14
|
-
current: URLSearchParams,
|
|
15
|
-
submittedText: string,
|
|
16
|
-
): URLSearchParams {
|
|
17
|
-
const t = submittedText.trim()
|
|
18
|
-
return patchQuestionBankUrlSearchParams(current, { q: t || null })
|
|
19
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { DiscoveryHubSearchGroup } from "@/lib/discovery-hub"
|
|
2
|
-
import {
|
|
3
|
-
QUESTION_BANK_ENTRY_PATH,
|
|
4
|
-
QUESTION_BANK_LIBRARY_PATH,
|
|
5
|
-
} from "@/lib/question-bank-nav"
|
|
6
|
-
|
|
7
|
-
export type { DiscoveryHubSearchGroup, DiscoveryHubSearchItem } from "@/lib/discovery-hub"
|
|
8
|
-
|
|
9
|
-
export function buildQuestionBankHubSearchGroups(): DiscoveryHubSearchGroup[] {
|
|
10
|
-
return [
|
|
11
|
-
{
|
|
12
|
-
id: "ai-create",
|
|
13
|
-
heading: "Create with AI",
|
|
14
|
-
items: [
|
|
15
|
-
{
|
|
16
|
-
id: "ai-mcq",
|
|
17
|
-
label: "Draft a multiple-choice question on clinical reasoning",
|
|
18
|
-
keywords: "ai leo create mcq multiple choice clinical reasoning",
|
|
19
|
-
askLeoPrompt:
|
|
20
|
-
"Help me draft a multiple-choice assessment question focused on clinical reasoning. Ask clarifying questions about topic, difficulty, and learning objective before proposing stems and distractors.",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: "ai-osce",
|
|
24
|
-
label: "Generate an OSCE checklist from a case vignette",
|
|
25
|
-
keywords: "ai leo osce checklist vignette station",
|
|
26
|
-
askLeoPrompt:
|
|
27
|
-
"I want to generate an OSCE checklist from a case vignette. Walk me through the case details you need, then propose observable behaviors and scoring notes.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "ai-remediation",
|
|
31
|
-
label: "Turn missed items into remediation questions",
|
|
32
|
-
keywords: "ai leo remediation review missed items",
|
|
33
|
-
askLeoPrompt:
|
|
34
|
-
"Turn a list of missed assessment items into remediation questions. Ask what content area and learner level to target, then suggest short-answer or MCQ follow-ups.",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "ai-bank-outline",
|
|
38
|
-
label: "Outline a new question bank for a course module",
|
|
39
|
-
keywords: "ai leo outline bank module taxonomy folders",
|
|
40
|
-
askLeoPrompt:
|
|
41
|
-
"Help me outline a new question bank for a course module. Suggest folder structure, item types, and a balanced mix of difficulty before we add items.",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "actions",
|
|
47
|
-
heading: "Quick actions",
|
|
48
|
-
items: [
|
|
49
|
-
{
|
|
50
|
-
id: "browse-library",
|
|
51
|
-
label: "Browse question library",
|
|
52
|
-
keywords: "library table folder panel tree views",
|
|
53
|
-
icon: "fa-light fa-table-list",
|
|
54
|
-
href: QUESTION_BANK_LIBRARY_PATH,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: "browse-my",
|
|
58
|
-
label: "Open my questions",
|
|
59
|
-
keywords: "my questions author scope",
|
|
60
|
-
icon: "fa-light fa-user",
|
|
61
|
-
href: `${QUESTION_BANK_LIBRARY_PATH}?scope=my`,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: "new-question",
|
|
65
|
-
label: "Create new question",
|
|
66
|
-
keywords: "new question create draft author",
|
|
67
|
-
icon: "fa-light fa-plus",
|
|
68
|
-
askLeoPrompt:
|
|
69
|
-
"Help me create a new assessment question. Start by asking for topic, item type, difficulty, and learning objective, then draft the stem, answer choices, and rationale.",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: "hub-entry",
|
|
73
|
-
label: "Question bank home",
|
|
74
|
-
keywords: "home hub search",
|
|
75
|
-
icon: "fa-light fa-house",
|
|
76
|
-
href: QUESTION_BANK_ENTRY_PATH,
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const QUESTION_BANK_HUB_SEARCH_PLACEHOLDER =
|
|
84
|
-
"Search questions, folders, or describe what you want to create…"
|
|
85
|
-
|
|
86
|
-
export const QUESTION_BANK_HUB_ASK_LEO_PROMPTS = [
|
|
87
|
-
"Draft five MCQs on pharmacology with rationales",
|
|
88
|
-
"Suggest folder names for a new pediatrics bank",
|
|
89
|
-
"Rewrite this stem for clarity and bias-free wording",
|
|
90
|
-
] as const
|