@jmruthers/pace-core 0.6.7 → 0.6.8
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/audit-tool/00-dependencies.cjs +215 -9
- package/audit-tool/audits/02-project-structure.cjs +3 -18
- package/audit-tool/audits/03-architecture.cjs +34 -6
- package/audit-tool/audits/06-security-rbac.cjs +10 -0
- package/audit-tool/audits/07-api-tech-stack.cjs +55 -1
- package/audit-tool/index.cjs +23 -19
- package/audit-tool/utils/report-utils.cjs +141 -2
- package/dist/{DataTable-7PMH7XN7.js → DataTable-6RMSCQJ6.js} +5 -5
- package/dist/{PublicPageProvider-DlsCaR5v.d.ts → PublicPageProvider-CIGSujI2.d.ts} +14 -8
- package/dist/{UnifiedAuthProvider-ZT6TIGM7.js → UnifiedAuthProvider-7SNDOWYD.js} +2 -2
- package/dist/{api-Y4MQWOFW.js → api-7P7DI652.js} +1 -1
- package/dist/{chunk-L4XMVJKY.js → chunk-4DDCYDQ3.js} +8 -7
- package/dist/{chunk-ZKAWKYT4.js → chunk-5W2A3DRC.js} +2 -1
- package/dist/{chunk-VBCS3DUA.js → chunk-EF2UGZWY.js} +3 -3
- package/dist/{chunk-JGWDVX64.js → chunk-EURB7QFZ.js} +123 -53
- package/dist/{chunk-BM4CQ5P3.js → chunk-GS5672WG.js} +6 -6
- package/dist/{chunk-ZFYPMX46.js → chunk-LX6U42O3.js} +1 -1
- package/dist/{chunk-5X4QLXRG.js → chunk-MPBLMWVR.js} +5 -3
- package/dist/{chunk-Q7Q7V5NV.js → chunk-NKHKXPI4.js} +7 -7
- package/dist/{chunk-6F3IILHI.js → chunk-S6ZQKDY6.js} +1 -1
- package/dist/{chunk-FTCRZOG2.js → chunk-T5CVK4R3.js} +5 -5
- package/dist/{chunk-GHYHJTYV.js → chunk-Z2FNRKF3.js} +13 -13
- package/dist/components.d.ts +1 -1
- package/dist/components.js +12 -12
- package/dist/eslint-rules/rules/04-code-quality.cjs +66 -10
- package/dist/eslint-rules/rules/06-security-rbac.cjs +8 -3
- package/dist/eslint-rules/rules/07-api-tech-stack.cjs +190 -68
- package/dist/{functions-DHebl8-F.d.ts → functions-lBy5L2ry.d.ts} +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -15
- package/dist/providers.js +2 -2
- package/dist/rbac/index.d.ts +1 -1
- package/dist/rbac/index.js +6 -6
- package/dist/theming/runtime.d.ts +48 -1
- package/dist/theming/runtime.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/docs/api/modules.md +63 -14
- package/docs/getting-started/dependencies.md +23 -0
- package/docs/implementation-guides/app-layout.md +1 -1
- package/docs/implementation-guides/data-tables.md +1 -1
- package/docs/standards/1-pace-core-compliance-standards.md +38 -1
- package/eslint-config-pace-core.cjs +30 -11
- package/package.json +45 -15
- package/scripts/eslint-audit.cjs +123 -0
- package/scripts/install-eslint-config.cjs +67 -2
- package/scripts/validate-dependencies.cjs +248 -0
- package/src/__tests__/helpers/__tests__/test-utils.test.tsx +20 -8
- package/src/__tests__/templates/accessibility.test.template.tsx +1 -0
- package/src/components/AddressField/AddressField.tsx +26 -1
- package/src/components/Alert/Alert.test.tsx +86 -22
- package/src/components/Alert/Alert.tsx +19 -11
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Checkbox/Checkbox.test.tsx +2 -1
- package/src/components/ContextSelector/ContextSelector.tsx +39 -41
- package/src/components/DataTable/DataTable.tsx +1 -19
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +6 -10
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +18 -9
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +3 -2
- package/src/components/DataTable/components/EmptyState.tsx +1 -1
- package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.test.tsx +1 -1
- package/src/components/DataTable/components/__tests__/EmptyState.test.tsx +3 -3
- package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +33 -29
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +1 -2
- package/src/components/FileUpload/FileUpload.test.tsx +22 -31
- package/src/components/FileUpload/FileUpload.tsx +29 -0
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +48 -12
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +9 -9
- package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +30 -30
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +4 -4
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +7 -1
- package/src/hooks/__tests__/useDataTablePerformance.unit.test.ts +8 -5
- package/src/hooks/__tests__/useFileUrl.unit.test.ts +4 -0
- package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +3 -3
- package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +45 -8
- package/src/hooks/__tests__/usePerformanceMonitor.unit.test.ts +22 -2
- package/src/hooks/public/usePublicRouteParams.ts +8 -4
- package/src/hooks/useAddressAutocomplete.test.ts +18 -18
- package/src/hooks/useEventTheme.ts +5 -1
- package/src/hooks/useFileUrl.ts +52 -8
- package/src/hooks/useOrganisationSecurity.test.ts +2 -1
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +1 -1
- package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +15 -6
- package/src/rbac/__tests__/rbac-functions.test.ts +3 -3
- package/src/rbac/api.test.ts +104 -0
- package/src/rbac/engine.ts +1 -1
- package/src/rbac/hooks/useCan.test.ts +2 -2
- package/src/rbac/secureClient.ts +1 -1
- package/src/rbac/types/functions.ts +1 -1
- package/src/theming/__tests__/parseEventColours.test.ts +117 -8
- package/src/theming/parseEventColours.ts +56 -2
- package/src/types/supabase.ts +2 -3
- package/src/utils/__tests__/bundleAnalysis.unit.test.ts +9 -9
- package/src/utils/file-reference/__tests__/file-reference.test.ts +4 -0
- package/src/utils/formatting/formatDate.test.ts +3 -2
- package/src/utils/formatting/formatDateTime.test.ts +2 -2
- package/src/utils/google-places/googlePlacesUtils.test.ts +36 -24
- package/src/utils/storage/__tests__/helpers.unit.test.ts +19 -12
- package/src/utils/storage/helpers.test.ts +69 -3
|
@@ -83,13 +83,127 @@ function formatStandardSection(standard, standardName, issues, standardDocPath)
|
|
|
83
83
|
return section;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Format dependency audit section for markdown report
|
|
88
|
+
* @param {Object} dependencyResult - Dependency audit result
|
|
89
|
+
* @returns {string} - Formatted markdown section
|
|
90
|
+
*/
|
|
91
|
+
function formatDependencyAuditSection(dependencyResult) {
|
|
92
|
+
if (dependencyResult.error) {
|
|
93
|
+
return `\n### ❌ Dependency Audit\n\n**Error:** ${dependencyResult.error}\n\n`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const issues = dependencyResult.issues || {};
|
|
97
|
+
const includedDeps = issues.includedDeps || [];
|
|
98
|
+
const missingRequired = issues.missingRequired || [];
|
|
99
|
+
const missingOptional = issues.missingOptional || [];
|
|
100
|
+
const versionIssues = issues.versionIssues || [];
|
|
101
|
+
const wrongLocation = issues.wrongLocation || [];
|
|
102
|
+
const missingDevDeps = issues.missingDevDeps || [];
|
|
103
|
+
const devVersionIssues = issues.devVersionIssues || [];
|
|
104
|
+
|
|
105
|
+
const totalIssues = includedDeps.length + missingRequired.length + versionIssues.length + wrongLocation.length + missingDevDeps.length + devVersionIssues.length;
|
|
106
|
+
|
|
107
|
+
if (totalIssues === 0 && missingOptional.length === 0) {
|
|
108
|
+
return `\n### ✅ Dependency Audit\n\nNo issues found.\n`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let section = `\n### ${totalIssues > 0 ? '❌' : '⚠️'} Dependency Audit\n\n`;
|
|
112
|
+
section += `**Reference:** [Dependencies Guide](https://github.com/jmruthers/pace-core/blob/main/packages/core/docs/getting-started/dependencies.md)\n\n`;
|
|
113
|
+
|
|
114
|
+
if (totalIssues > 0) {
|
|
115
|
+
section += `**Issues Found:** ${totalIssues}\n\n`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Included dependencies (errors)
|
|
119
|
+
if (includedDeps.length > 0) {
|
|
120
|
+
section += `#### ❌ Included Dependencies (MUST REMOVE) - ${includedDeps.length} issue${includedDeps.length > 1 ? 's' : ''}\n\n`;
|
|
121
|
+
section += `These packages are already included in pace-core and should NOT be installed in your app:\n\n`;
|
|
122
|
+
includedDeps.forEach(issue => {
|
|
123
|
+
section += `- **${issue.package}**@${issue.installed} (in ${issue.location})\n`;
|
|
124
|
+
section += ` - Should NOT be installed (already included in pace-core)\n`;
|
|
125
|
+
section += ` - Fix: \`npm uninstall ${issue.package}\`\n\n`;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Missing required dependencies (errors)
|
|
130
|
+
if (missingRequired.length > 0) {
|
|
131
|
+
section += `#### ❌ Missing Required Dependencies - ${missingRequired.length} issue${missingRequired.length > 1 ? 's' : ''}\n\n`;
|
|
132
|
+
section += `These packages are required for pace-core to function:\n\n`;
|
|
133
|
+
missingRequired.forEach(issue => {
|
|
134
|
+
section += `- **${issue.package}** (required: ${issue.required})\n`;
|
|
135
|
+
section += ` - Fix: \`npm install ${issue.package}@${issue.required}\`\n\n`;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Version issues (errors)
|
|
140
|
+
if (versionIssues.length > 0) {
|
|
141
|
+
section += `#### ⚠️ Version Issues - ${versionIssues.length} issue${versionIssues.length > 1 ? 's' : ''}\n\n`;
|
|
142
|
+
section += `These packages have incorrect version ranges:\n\n`;
|
|
143
|
+
versionIssues.forEach(issue => {
|
|
144
|
+
section += `- **${issue.package}**\n`;
|
|
145
|
+
section += ` - Installed: ${issue.installed}\n`;
|
|
146
|
+
section += ` - Required: ${issue.required}\n`;
|
|
147
|
+
section += ` - Fix: \`npm install ${issue.package}@${issue.required}\`\n\n`;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Wrong location (warnings)
|
|
152
|
+
if (wrongLocation.length > 0) {
|
|
153
|
+
section += `#### ⚠️ Wrong Location - ${wrongLocation.length} issue${wrongLocation.length > 1 ? 's' : ''}\n\n`;
|
|
154
|
+
section += `These packages are in the wrong location in package.json:\n\n`;
|
|
155
|
+
wrongLocation.forEach(issue => {
|
|
156
|
+
section += `- **${issue.package}**\n`;
|
|
157
|
+
section += ` - Currently in: ${issue.current}\n`;
|
|
158
|
+
section += ` - Should be in: ${issue.shouldBe}\n`;
|
|
159
|
+
section += ` - Fix: \`npm uninstall ${issue.package} && npm install -D ${issue.package}\`\n\n`;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Missing optional dependencies (info)
|
|
164
|
+
if (missingOptional.length > 0) {
|
|
165
|
+
section += `#### ℹ️ Missing Optional Dependencies - ${missingOptional.length} package${missingOptional.length > 1 ? 's' : ''}\n\n`;
|
|
166
|
+
section += `These packages are optional and only needed if you use specific features:\n\n`;
|
|
167
|
+
missingOptional.forEach(issue => {
|
|
168
|
+
section += `- **${issue.package}** (required: ${issue.required})\n`;
|
|
169
|
+
section += ` - Install only if you use this feature\n`;
|
|
170
|
+
section += ` - Fix: \`npm install ${issue.package}@${issue.required}\`\n\n`;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Missing dev dependencies (errors)
|
|
175
|
+
if (missingDevDeps.length > 0) {
|
|
176
|
+
section += `#### ❌ Missing Required Dev Dependencies - ${missingDevDeps.length} issue${missingDevDeps.length > 1 ? 's' : ''}\n\n`;
|
|
177
|
+
section += `These dev dependencies are required for a compatible development environment:\n\n`;
|
|
178
|
+
missingDevDeps.forEach(issue => {
|
|
179
|
+
section += `- **${issue.package}** (required: ${issue.required})\n`;
|
|
180
|
+
section += ` - Fix: \`npm install -D ${issue.package}@${issue.required}\`\n\n`;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Dev version issues (errors)
|
|
185
|
+
if (devVersionIssues.length > 0) {
|
|
186
|
+
section += `#### ⚠️ Dev Dependency Version Issues - ${devVersionIssues.length} issue${devVersionIssues.length > 1 ? 's' : ''}\n\n`;
|
|
187
|
+
section += `These dev dependencies have incorrect version ranges:\n\n`;
|
|
188
|
+
devVersionIssues.forEach(issue => {
|
|
189
|
+
section += `- **${issue.package}** (in ${issue.location})\n`;
|
|
190
|
+
section += ` - Installed: ${issue.installed}\n`;
|
|
191
|
+
section += ` - Required: ${issue.required}\n`;
|
|
192
|
+
section += ` - Fix: \`npm install -D ${issue.package}@${issue.required}\`\n\n`;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return section;
|
|
197
|
+
}
|
|
198
|
+
|
|
86
199
|
/**
|
|
87
200
|
* Generate markdown report from audit results
|
|
88
|
-
* @param {Object} results - Audit results object
|
|
201
|
+
* @param {Object} results - Audit results object (standard audits)
|
|
89
202
|
* @param {string} consumingAppPath - Path to consuming app
|
|
203
|
+
* @param {Object} dependencyResult - Dependency audit result (optional)
|
|
90
204
|
* @returns {string} - Complete markdown report
|
|
91
205
|
*/
|
|
92
|
-
function generateMarkdownReport(results, consumingAppPath) {
|
|
206
|
+
function generateMarkdownReport(results, consumingAppPath, dependencyResult = null) {
|
|
93
207
|
const now = new Date();
|
|
94
208
|
const timestamp = now.toISOString();
|
|
95
209
|
|
|
@@ -141,10 +255,29 @@ function generateMarkdownReport(results, consumingAppPath) {
|
|
|
141
255
|
}
|
|
142
256
|
});
|
|
143
257
|
|
|
258
|
+
// Count dependency audit issues
|
|
259
|
+
let dependencyIssues = 0;
|
|
260
|
+
if (dependencyResult && !dependencyResult.error) {
|
|
261
|
+
const depIssues = dependencyResult.issues || {};
|
|
262
|
+
dependencyIssues = (depIssues.includedDeps?.length || 0) +
|
|
263
|
+
(depIssues.missingRequired?.length || 0) +
|
|
264
|
+
(depIssues.versionIssues?.length || 0) +
|
|
265
|
+
(depIssues.wrongLocation?.length || 0) +
|
|
266
|
+
(depIssues.missingDevDeps?.length || 0) +
|
|
267
|
+
(depIssues.devVersionIssues?.length || 0);
|
|
268
|
+
totalIssues += dependencyIssues;
|
|
269
|
+
}
|
|
270
|
+
|
|
144
271
|
report += `**Total Issues:** ${totalIssues}\n\n`;
|
|
145
272
|
report += `| Standard | Issues |\n`;
|
|
146
273
|
report += `|----------|--------|\n`;
|
|
147
274
|
|
|
275
|
+
// Add dependency audit to summary table first
|
|
276
|
+
if (dependencyResult) {
|
|
277
|
+
const depIcon = dependencyIssues === 0 ? '✅' : '❌';
|
|
278
|
+
report += `| ${depIcon} Dependency Audit | ${dependencyIssues} |\n`;
|
|
279
|
+
}
|
|
280
|
+
|
|
148
281
|
Object.entries(standardCounts).forEach(([standard, count]) => {
|
|
149
282
|
const icon = count === 0 ? '✅' : '❌';
|
|
150
283
|
report += `| ${icon} ${standardNames[standard]} | ${count} |\n`;
|
|
@@ -153,6 +286,11 @@ function generateMarkdownReport(results, consumingAppPath) {
|
|
|
153
286
|
report += `\n---\n\n`;
|
|
154
287
|
report += `## Detailed Results\n\n`;
|
|
155
288
|
|
|
289
|
+
// Add dependency audit section first
|
|
290
|
+
if (dependencyResult) {
|
|
291
|
+
report += formatDependencyAuditSection(dependencyResult);
|
|
292
|
+
}
|
|
293
|
+
|
|
156
294
|
// Generate sections for each standard
|
|
157
295
|
Object.keys(standardNames).forEach(standard => {
|
|
158
296
|
const standardResult = results[standard];
|
|
@@ -236,6 +374,7 @@ function generateSummary(results) {
|
|
|
236
374
|
module.exports = {
|
|
237
375
|
formatIssue,
|
|
238
376
|
formatStandardSection,
|
|
377
|
+
formatDependencyAuditSection,
|
|
239
378
|
generateMarkdownReport,
|
|
240
379
|
generateSummary,
|
|
241
380
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ActionButtons, BulkOperationsDropdown, ColumnFactory, ColumnVisibilityDropdown, DataTable, DataTableCore, DataTableErrorBoundary, DataTableModals, DataTableToolbar, EditableRow, EmptyState, EnhancedPaginationControls, GroupingDropdown, ImportModal, LoadingState, PaginationControls, SortIndicator, UnifiedTableBody, announce, announceBulkOperation, announceFilterChange, announceLoadingState, announcePaginationChange, announceSearchResults, announceSelectionChange, announceSortChange, average, calculateAllDepths, calculateAllIndentation, calculateIndentation, calculateOptimalPageSize, cleanupLiveRegion, count, createHierarchicalStructure, defaultDataTableFeatures, exportToCSV, exportToCSVWithTableRows, generateCSVContent, getAriaSortState, getAriaSortValue, getCellRenderer, getColumnHeaderText, getHierarchicalSortConfig, getPageSizeOptions, getPaginationBinding, getRowDepth, getRowDescription, getRowIdSafe, getSortButtonLabel, groupHierarchicalData, hasValidRowId, initializeLiveRegion, isHierarchicalSortableColumn, max, min, normalizeDataTableFeatures, shouldShowColumnForRow, sortHierarchicalDataByStructure, sortHierarchicalDataWithSorting, sum, validateHierarchicalData, validatePaginationConfig } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { ActionButtons, BulkOperationsDropdown, ColumnFactory, ColumnVisibilityDropdown, DataTable, DataTableCore, DataTableErrorBoundary, DataTableModals, DataTableToolbar, EditableRow, EmptyState, EnhancedPaginationControls, GroupingDropdown, ImportModal, LoadingState, PaginationControls, SortIndicator, UnifiedTableBody, announce, announceBulkOperation, announceFilterChange, announceLoadingState, announcePaginationChange, announceSearchResults, announceSelectionChange, announceSortChange, average, calculateAllDepths, calculateAllIndentation, calculateIndentation, calculateOptimalPageSize, cleanupLiveRegion, count, createHierarchicalStructure, defaultDataTableFeatures, exportToCSV, exportToCSVWithTableRows, generateCSVContent, getAriaSortState, getAriaSortValue, getCellRenderer, getColumnHeaderText, getHierarchicalSortConfig, getPageSizeOptions, getPaginationBinding, getRowDepth, getRowDescription, getRowIdSafe, getSortButtonLabel, groupHierarchicalData, hasValidRowId, initializeLiveRegion, isHierarchicalSortableColumn, max, min, normalizeDataTableFeatures, shouldShowColumnForRow, sortHierarchicalDataByStructure, sortHierarchicalDataWithSorting, sum, validateHierarchicalData, validatePaginationConfig } from './chunk-NKHKXPI4.js';
|
|
2
|
+
import './chunk-GS5672WG.js';
|
|
3
3
|
export { CircuitBreaker, DEFAULT_FALLBACK_CONFIG, DataChunkManager, DataTableError, DataTableErrorType, ErrorRecoveryManager, MemoryMonitor, SearchIndex, VisibilityTracker, chunkData, debounce, determinePaginationMode, getOptimalPageSizeOptions, safeExecute, throttle, useDataTablePerformance } from './chunk-S7DKJPLT.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-EF2UGZWY.js';
|
|
5
5
|
import './chunk-C7NSAPTL.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-T5CVK4R3.js';
|
|
7
|
+
import './chunk-LX6U42O3.js';
|
|
8
8
|
import './chunk-AHU7G2R5.js';
|
|
9
9
|
import './chunk-4SXLQIZO.js';
|
|
10
10
|
import './chunk-A3W6LW53.js';
|
|
@@ -473,27 +473,32 @@ declare namespace Textarea {
|
|
|
473
473
|
* Features:
|
|
474
474
|
* - Multiple visual variants (default, destructive, inline)
|
|
475
475
|
* - Title and description support
|
|
476
|
-
* - Semantic HTML: renders as `<
|
|
477
|
-
* - ARIA role="alert" for accessibility
|
|
476
|
+
* - Semantic HTML: renders as `<p>` element with `role="alert"` (default) or custom role
|
|
478
477
|
* - Keyboard and screen reader accessible
|
|
479
478
|
* - Composable with icons and actions
|
|
480
479
|
* - Inline variant for lightweight text formatting
|
|
481
480
|
*
|
|
482
481
|
* @example
|
|
483
482
|
* ```tsx
|
|
484
|
-
* // Basic alert (renders as <
|
|
483
|
+
* // Basic alert (renders as <p role="alert"> with <h5> title and <p> description)
|
|
485
484
|
* <Alert>
|
|
486
485
|
* <AlertTitle>Success</AlertTitle>
|
|
487
486
|
* <AlertDescription>Your changes have been saved.</AlertDescription>
|
|
488
487
|
* </Alert>
|
|
489
488
|
*
|
|
490
|
-
* // Destructive alert with icon (renders as <
|
|
489
|
+
* // Destructive alert with icon (renders as <p role="alert"> with <h5> title and <p> description)
|
|
491
490
|
* <Alert variant="destructive">
|
|
492
491
|
* <ErrorIcon />
|
|
493
492
|
* <AlertTitle>Error</AlertTitle>
|
|
494
493
|
* <AlertDescription>Something went wrong.</AlertDescription>
|
|
495
494
|
* </Alert>
|
|
496
495
|
*
|
|
496
|
+
* // Status message (renders as <p role="status"> for informational messages)
|
|
497
|
+
* <Alert role="status" aria-live="polite">
|
|
498
|
+
* <AlertTitle>No data available</AlertTitle>
|
|
499
|
+
* <AlertDescription>Get started by adding your first entry.</AlertDescription>
|
|
500
|
+
* </Alert>
|
|
501
|
+
*
|
|
497
502
|
* // Inline alert (renders as React.Fragment with <strong> title and <span> description)
|
|
498
503
|
* <Alert variant="inline">
|
|
499
504
|
* <AlertTitle>Note:</AlertTitle>
|
|
@@ -502,15 +507,16 @@ declare namespace Textarea {
|
|
|
502
507
|
* ```
|
|
503
508
|
*
|
|
504
509
|
* @accessibility
|
|
505
|
-
* - Uses semantic HTML: `<
|
|
506
|
-
* -
|
|
510
|
+
* - Uses semantic HTML: `<p>` element with `role="alert"` (default) for screen reader announcements
|
|
511
|
+
* - Can be customized with `role="status"` for informational messages
|
|
507
512
|
* - Title and description are semantically structured
|
|
508
513
|
* - Supports keyboard navigation and focus
|
|
509
514
|
*/
|
|
510
515
|
|
|
511
|
-
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<
|
|
516
|
+
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & {
|
|
512
517
|
variant?: "default" | "destructive" | "inline";
|
|
513
|
-
|
|
518
|
+
role?: string;
|
|
519
|
+
} & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
514
520
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
515
521
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
516
522
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { UnifiedAuthContext, UnifiedAuthProvider, useUnifiedAuth } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { UnifiedAuthContext, UnifiedAuthProvider, useUnifiedAuth } from './chunk-T5CVK4R3.js';
|
|
2
|
+
import './chunk-LX6U42O3.js';
|
|
3
3
|
import './chunk-AHU7G2R5.js';
|
|
4
4
|
import './chunk-4SXLQIZO.js';
|
|
5
5
|
import './chunk-HF6O3O37.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { OrganisationContextRequiredError, clearCache, getAccessLevel, getPageScopeType, getPermissionMap, getRoleContext, hasAllPermissions, hasAnyPermission, invalidateAppCache, invalidateEventCache, invalidateOrganisationCache, invalidateUserCache, isEventAdmin, isOrganisationAdmin, isPermitted, isPermittedCached, isRBACInitialized, isSuperAdmin, resolveAppContext, setupRBAC } from './chunk-
|
|
1
|
+
export { OrganisationContextRequiredError, clearCache, getAccessLevel, getPageScopeType, getPermissionMap, getRoleContext, hasAllPermissions, hasAnyPermission, invalidateAppCache, invalidateEventCache, invalidateOrganisationCache, invalidateUserCache, isEventAdmin, isOrganisationAdmin, isPermitted, isPermittedCached, isRBACInitialized, isSuperAdmin, resolveAppContext, setupRBAC } from './chunk-LX6U42O3.js';
|
|
2
2
|
import './chunk-AHU7G2R5.js';
|
|
3
3
|
import './chunk-TTRFSOKR.js';
|
|
4
4
|
import './chunk-3RG5ZIWI.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { generateFilePath, generateUniqueFileName, extractFileMetadata, uploadFile, getPublicUrl, getSignedUrl, deleteFile, downloadFile, listFiles, archiveFile } from './chunk-
|
|
2
|
-
import { useOrganisationSecurity, usePublicPageContext } from './chunk-
|
|
3
|
-
import { useOrganisations } from './chunk-
|
|
1
|
+
import { generateFilePath, generateUniqueFileName, extractFileMetadata, uploadFile, getPublicUrl, getSignedUrl, deleteFile, downloadFile, listFiles, archiveFile } from './chunk-MPBLMWVR.js';
|
|
2
|
+
import { useOrganisationSecurity, usePublicPageContext } from './chunk-EF2UGZWY.js';
|
|
3
|
+
import { useOrganisations } from './chunk-T5CVK4R3.js';
|
|
4
4
|
import { assertOrganisationId } from './chunk-4SXLQIZO.js';
|
|
5
5
|
import { createLogger, logger } from './chunk-TTRFSOKR.js';
|
|
6
6
|
import { useForm } from 'react-hook-form';
|
|
@@ -481,13 +481,14 @@ function usePublicRouteParams(options = {}) {
|
|
|
481
481
|
}, [fetchEventData, eventLoading]);
|
|
482
482
|
const finalError = useMemo(() => {
|
|
483
483
|
if (error) return error;
|
|
484
|
-
if (
|
|
484
|
+
if (!validateEventCode) return null;
|
|
485
|
+
if (fetchEventData && eventError) return eventError;
|
|
485
486
|
return null;
|
|
486
|
-
}, [error, eventError]);
|
|
487
|
+
}, [error, eventError, fetchEventData, validateEventCode]);
|
|
487
488
|
const eventId = useMemo(() => {
|
|
488
|
-
if (!event) return null;
|
|
489
|
+
if (!fetchEventData || !event) return null;
|
|
489
490
|
return event.event_id || event.id;
|
|
490
|
-
}, [event]);
|
|
491
|
+
}, [fetchEventData, event]);
|
|
491
492
|
const refetch = useCallback(async () => {
|
|
492
493
|
if (!fetchEventData) return;
|
|
493
494
|
await refetchEvent();
|
|
@@ -26,7 +26,8 @@ function parseAndNormalizeEventColours(input) {
|
|
|
26
26
|
for (const key in p) {
|
|
27
27
|
const value = p[key];
|
|
28
28
|
if (value !== null && value !== void 0 && value !== "") {
|
|
29
|
-
|
|
29
|
+
const normalizedKey = typeof key === "string" && key.startsWith("ev-") ? key.substring(3) : key;
|
|
30
|
+
out[normalizedKey] = value;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
return out;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnifiedAuthContext, useUnifiedAuth, useOrganisations } from './chunk-
|
|
1
|
+
import { UnifiedAuthContext, useUnifiedAuth, useOrganisations } from './chunk-T5CVK4R3.js';
|
|
2
2
|
import { cn, performanceBudgetMonitor } from './chunk-7ILTDCL2.js';
|
|
3
3
|
import { logger } from './chunk-TTRFSOKR.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -507,7 +507,7 @@ var useOrganisationSecurity = () => {
|
|
|
507
507
|
const targetOrgId = orgId || selectedOrganisation?.id;
|
|
508
508
|
if (!targetOrgId || !user) return false;
|
|
509
509
|
try {
|
|
510
|
-
const { isPermittedCached } = await import('./api-
|
|
510
|
+
const { isPermittedCached } = await import('./api-7P7DI652.js');
|
|
511
511
|
const scope = {
|
|
512
512
|
organisationId: targetOrgId,
|
|
513
513
|
eventId: user.user_metadata?.eventId || user.app_metadata?.eventId,
|
|
@@ -530,7 +530,7 @@ var useOrganisationSecurity = () => {
|
|
|
530
530
|
const targetOrgId = orgId || selectedOrganisation?.id;
|
|
531
531
|
if (!targetOrgId || !user) return [];
|
|
532
532
|
try {
|
|
533
|
-
const { getPermissionMap } = await import('./api-
|
|
533
|
+
const { getPermissionMap } = await import('./api-7P7DI652.js');
|
|
534
534
|
const scope = {
|
|
535
535
|
organisationId: targetOrgId,
|
|
536
536
|
eventId: user.user_metadata?.eventId || user.app_metadata?.eventId,
|