@almadar/ui 5.21.7 → 5.21.9
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/dist/avl/index.cjs +970 -650
- package/dist/avl/index.js +970 -650
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +675 -370
- package/dist/components/index.js +675 -370
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +675 -370
- package/dist/providers/index.js +675 -370
- package/dist/runtime/index.cjs +675 -370
- package/dist/runtime/index.js +675 -370
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -2036,7 +2036,10 @@ var en_default;
|
|
|
2036
2036
|
var init_en = __esm({
|
|
2037
2037
|
"locales/en.json"() {
|
|
2038
2038
|
en_default = {
|
|
2039
|
-
$meta: {
|
|
2039
|
+
$meta: {
|
|
2040
|
+
locale: "en",
|
|
2041
|
+
direction: "ltr"
|
|
2042
|
+
},
|
|
2040
2043
|
"common.save": "Save",
|
|
2041
2044
|
"common.cancel": "Cancel",
|
|
2042
2045
|
"common.delete": "Delete",
|
|
@@ -2178,7 +2181,6 @@ var init_en = __esm({
|
|
|
2178
2181
|
"error.somethingWentWrong": "Something went wrong",
|
|
2179
2182
|
"error.loadingItems": "Loading items...",
|
|
2180
2183
|
"error.noItemsFound": "No items found",
|
|
2181
|
-
"error.notFound": "Not found",
|
|
2182
2184
|
"debug.noEntityData": "No entity data",
|
|
2183
2185
|
"debug.noEntities": "No entities",
|
|
2184
2186
|
"debug.noTicks": "No ticks registered",
|
|
@@ -2210,7 +2212,298 @@ var init_en = __esm({
|
|
|
2210
2212
|
"template.showcase": "Showcase",
|
|
2211
2213
|
"template.faq": "Frequently Asked Questions",
|
|
2212
2214
|
"template.ourTeam": "Our Team",
|
|
2213
|
-
"template.caseStudies": "Case Studies"
|
|
2215
|
+
"template.caseStudies": "Case Studies",
|
|
2216
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
2217
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
2218
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
2219
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
2220
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
2221
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
2222
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
2223
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
2224
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
2225
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
2226
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
2227
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
2228
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
2229
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
2230
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
2231
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
2232
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
2233
|
+
"richBlockEditor.blockType.code": "Code",
|
|
2234
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
2235
|
+
"richBlockEditor.blockType.image": "Image",
|
|
2236
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
2237
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
2238
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
2239
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
2240
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
2241
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
2242
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
2243
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
2244
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
2245
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
2246
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
2247
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
2248
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
2249
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
2250
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
2251
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
2252
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
2253
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
2254
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
2255
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
2256
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
2257
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
2258
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
2259
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
2260
|
+
"richBlockEditor.addItem": "Add item",
|
|
2261
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
2262
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
2263
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
2264
|
+
"versionDiff.compare": "Compare",
|
|
2265
|
+
"versionDiff.to": "to",
|
|
2266
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
2267
|
+
"versionDiff.afterRevision": "After revision",
|
|
2268
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
2269
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
2270
|
+
"versionDiff.revert": "Revert",
|
|
2271
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
2272
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
2273
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
2274
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
2275
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
2276
|
+
"violationAlert.adminLabel": "Admin:",
|
|
2277
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
2278
|
+
"violationAlert.goToField": "Go to field",
|
|
2279
|
+
"branchingLogic.title": "Branching logic",
|
|
2280
|
+
"branchingLogic.if": "If",
|
|
2281
|
+
"branchingLogic.goTo": "go to",
|
|
2282
|
+
"branchingLogic.rules": "Rules",
|
|
2283
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
2284
|
+
"branchingLogic.addRule": "Add rule",
|
|
2285
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
2286
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
2287
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
2288
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
2289
|
+
"branchingLogic.selectTarget": "Select target",
|
|
2290
|
+
"branchingLogic.selectValue": "Select value",
|
|
2291
|
+
"branchingLogic.addValue": "Add value",
|
|
2292
|
+
"branchingLogic.value": "Value",
|
|
2293
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
2294
|
+
"branchingLogic.operatorEquals": "equals",
|
|
2295
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
2296
|
+
"branchingLogic.operatorContains": "contains",
|
|
2297
|
+
"branchingLogic.operatorIn": "is one of",
|
|
2298
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
2299
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
2300
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
2301
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
2302
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
2303
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
2304
|
+
"filterGroup.filters": "Filters",
|
|
2305
|
+
"filterGroup.all": "All",
|
|
2306
|
+
"filterGroup.clear": "Clear",
|
|
2307
|
+
"filterGroup.clearAll": "Clear all",
|
|
2308
|
+
"filterGroup.from": "From",
|
|
2309
|
+
"filterGroup.to": "To",
|
|
2310
|
+
"filterGroup.allOf": "All {{label}}",
|
|
2311
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
2312
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
2313
|
+
"debug.expression": "Expression",
|
|
2314
|
+
"debug.inputs": "Inputs",
|
|
2315
|
+
"debug.trait": "Trait",
|
|
2316
|
+
"debug.filterAll": "All",
|
|
2317
|
+
"debug.filterPassed": "Passed",
|
|
2318
|
+
"debug.filterFailed": "Failed",
|
|
2319
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
2320
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
2321
|
+
"debug.activeStates": "Active States",
|
|
2322
|
+
"debug.availableEvents": "Available Events",
|
|
2323
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
2324
|
+
"debug.guarded": "guarded",
|
|
2325
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
2326
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
2327
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
2328
|
+
"debug.states": "States",
|
|
2329
|
+
"debug.transitions": "Transitions",
|
|
2330
|
+
"debug.guards": "Guards",
|
|
2331
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
2332
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
2333
|
+
"debug.singleton": "Singleton",
|
|
2334
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
2335
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
2336
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
2337
|
+
"debug.persistent": "Persistent",
|
|
2338
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
2339
|
+
"debug.notLoaded": "not loaded",
|
|
2340
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
2341
|
+
"debug.allCount": "All ({{count}})",
|
|
2342
|
+
"debug.autoScroll": "Auto-scroll",
|
|
2343
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
2344
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
2345
|
+
"debug.guardLabel": "guard:",
|
|
2346
|
+
"debug.effectsCount": "{{count}} effects",
|
|
2347
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
2348
|
+
"debug.never": "Never",
|
|
2349
|
+
"debug.connected": "Connected",
|
|
2350
|
+
"debug.disconnected": "Disconnected",
|
|
2351
|
+
"debug.lastError": "Last Error",
|
|
2352
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
2353
|
+
"debug.server": "server",
|
|
2354
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
2355
|
+
"debug.emitLabel": "emit:",
|
|
2356
|
+
"debug.rowsCount": "{{count}} rows",
|
|
2357
|
+
"debug.serverResponse": "server response",
|
|
2358
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
2359
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
2360
|
+
"debug.failCount": "{{count}} fail",
|
|
2361
|
+
"debug.ok": "OK",
|
|
2362
|
+
"debug.localCount": "{{count}} local",
|
|
2363
|
+
"debug.serverCount": "{{count}} server",
|
|
2364
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
2365
|
+
"debug.tabDispatch": "Dispatch",
|
|
2366
|
+
"debug.tabVerify": "Verify",
|
|
2367
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
2368
|
+
"debug.tabTimeline": "Timeline",
|
|
2369
|
+
"debug.tabBridge": "Bridge",
|
|
2370
|
+
"debug.tabTraits": "Traits",
|
|
2371
|
+
"debug.tabTicks": "Ticks",
|
|
2372
|
+
"debug.tabEntities": "Entities",
|
|
2373
|
+
"debug.tabEvents": "Events",
|
|
2374
|
+
"debug.tabGuards": "Guards",
|
|
2375
|
+
"debug.debugger": "Debugger",
|
|
2376
|
+
"debug.failedCount": "{{count}} failed",
|
|
2377
|
+
"debug.traitsCount": "{{count}} traits",
|
|
2378
|
+
"debug.idle": "Idle",
|
|
2379
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
2380
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
2381
|
+
"debug.allPassing": "All passing",
|
|
2382
|
+
"debug.runtime": "Runtime",
|
|
2383
|
+
"debug.close": "Close (`)",
|
|
2384
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
2385
|
+
"replyTree.expandReplies": "Expand replies",
|
|
2386
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
2387
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
2388
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
2389
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
2390
|
+
"replyTree.reply": "Reply",
|
|
2391
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
2392
|
+
"replyTree.flag": "Flag",
|
|
2393
|
+
"replyTree.send": "Send",
|
|
2394
|
+
"replyTree.continueThread": "Continue thread",
|
|
2395
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
2396
|
+
"signaturePad.label": "Signature",
|
|
2397
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
2398
|
+
"signaturePad.clear": "Clear",
|
|
2399
|
+
"signaturePad.confirm": "Confirm",
|
|
2400
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
2401
|
+
"qrScanner.paused": "Paused",
|
|
2402
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
2403
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
2404
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
2405
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
2406
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
2407
|
+
"docSearch.placeholder": "Search documentation...",
|
|
2408
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
2409
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
2410
|
+
"avl.trigger": "Trigger",
|
|
2411
|
+
"avl.guard": "Guard",
|
|
2412
|
+
"avl.effects": "Effects",
|
|
2413
|
+
"avl.props": "Props",
|
|
2414
|
+
"avl.entity": "Entity",
|
|
2415
|
+
"avl.traits": "Traits",
|
|
2416
|
+
"avl.transition": "Transition",
|
|
2417
|
+
"avl.onEntity": "on {{entity}}",
|
|
2418
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
2419
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
2420
|
+
"avl.zoomIn": "Zoom in",
|
|
2421
|
+
"avl.zoomOut": "Zoom out",
|
|
2422
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
2423
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
2424
|
+
"avl.noTraitData": "No trait data",
|
|
2425
|
+
"avl.computingLayout": "Computing layout...",
|
|
2426
|
+
"avl.noStateMachine": "No state machine",
|
|
2427
|
+
"avl.listensFor": "listens for {{event}}",
|
|
2428
|
+
"avl.emits": "emits {{event}}",
|
|
2429
|
+
"avl.pageLayout": "Page Layout",
|
|
2430
|
+
"avl.overlaySuffix": "(overlay)",
|
|
2431
|
+
"orbPreview.previewBadge": "Preview",
|
|
2432
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
2433
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
2434
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
2435
|
+
"orbPreview.noPreview": "No preview available",
|
|
2436
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
2437
|
+
"detailView.noTransitionData": "No transition data",
|
|
2438
|
+
"orbInspector.required": "req",
|
|
2439
|
+
"orbInspector.addField": "Add Field",
|
|
2440
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
2441
|
+
"orbInspector.standalone": "Standalone",
|
|
2442
|
+
"orbInspector.embedded": "Embedded",
|
|
2443
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
2444
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
2445
|
+
"orbInspector.addEffect": "Add Effect",
|
|
2446
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
2447
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
2448
|
+
"orbInspector.tokens": "Tokens",
|
|
2449
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
2450
|
+
"orbInspector.variant": "Variant",
|
|
2451
|
+
"orbInspector.size": "Size",
|
|
2452
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
2453
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
2454
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
2455
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
2456
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
2457
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
2458
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
2459
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
2460
|
+
"orbInspector.tab.styles": "Styles",
|
|
2461
|
+
"orbInspector.tab.code": "Code",
|
|
2462
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
2463
|
+
"canvas.overview": "Overview",
|
|
2464
|
+
"canvas.expanded": "Expanded",
|
|
2465
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
2466
|
+
"canvas.screensCount": "{{count}} screens",
|
|
2467
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
2468
|
+
"lawReference.viewFullText": "View full law text",
|
|
2469
|
+
"statCard.defaultLabel": "Stat",
|
|
2470
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
2471
|
+
"mediaGallery.upload": "Upload",
|
|
2472
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
2473
|
+
"pagination.jumpPlaceholder": "Page",
|
|
2474
|
+
"table.selectRow": "Select row {{id}}",
|
|
2475
|
+
"card.selectItem": "Select {{item}}",
|
|
2476
|
+
"card.itemFallback": "item",
|
|
2477
|
+
"fileTree.noFiles": "No files",
|
|
2478
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
2479
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
2480
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
2481
|
+
"upload.dropFilesHere": "Drop files here",
|
|
2482
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
2483
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
2484
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
2485
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
2486
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
2487
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
2488
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
2489
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
2490
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
2491
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
2492
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
2493
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
2494
|
+
"optionConstraint.optional": "Optional",
|
|
2495
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
2496
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
2497
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
2498
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
2499
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
2500
|
+
"stateMachine.pinned": "Pinned",
|
|
2501
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
2502
|
+
"stateMachine.externalEffects": "External Effects",
|
|
2503
|
+
"stateMachine.legend.initial": "Initial",
|
|
2504
|
+
"stateMachine.legend.final": "Final",
|
|
2505
|
+
"stateMachine.legend.state": "State",
|
|
2506
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
2214
2507
|
};
|
|
2215
2508
|
}
|
|
2216
2509
|
});
|
|
@@ -4672,6 +4965,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4672
4965
|
init_Typography();
|
|
4673
4966
|
init_Divider();
|
|
4674
4967
|
init_cn();
|
|
4968
|
+
init_useTranslate();
|
|
4675
4969
|
positionStyles2 = {
|
|
4676
4970
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4677
4971
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -4690,6 +4984,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4690
4984
|
position = "top",
|
|
4691
4985
|
className
|
|
4692
4986
|
}) => {
|
|
4987
|
+
const { t } = useTranslate();
|
|
4693
4988
|
const [isVisible, setIsVisible] = React79__default.useState(false);
|
|
4694
4989
|
const timeoutRef = React79__default.useRef(null);
|
|
4695
4990
|
const handleMouseEnter = () => {
|
|
@@ -4773,7 +5068,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4773
5068
|
target: "_blank",
|
|
4774
5069
|
rel: "noopener noreferrer",
|
|
4775
5070
|
onClick: (e) => e.stopPropagation(),
|
|
4776
|
-
children: "
|
|
5071
|
+
children: t("lawReference.viewFullText")
|
|
4777
5072
|
}
|
|
4778
5073
|
)
|
|
4779
5074
|
] }),
|
|
@@ -12083,6 +12378,7 @@ var log4, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
12083
12378
|
var init_BehaviorView = __esm({
|
|
12084
12379
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12085
12380
|
"use client";
|
|
12381
|
+
init_useTranslate();
|
|
12086
12382
|
init_AvlState();
|
|
12087
12383
|
init_AvlTransitionLane();
|
|
12088
12384
|
init_AvlSwimLane();
|
|
@@ -12092,6 +12388,7 @@ var init_BehaviorView = __esm({
|
|
|
12092
12388
|
SWIM_GUTTER = 120;
|
|
12093
12389
|
CENTER_W = 360;
|
|
12094
12390
|
BehaviorView = ({ data }) => {
|
|
12391
|
+
const { t } = useTranslate();
|
|
12095
12392
|
const [layout, setLayout] = useState(null);
|
|
12096
12393
|
const traitName = data.traits[0]?.name;
|
|
12097
12394
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -12101,10 +12398,10 @@ var init_BehaviorView = __esm({
|
|
|
12101
12398
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log4.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12102
12399
|
}, [dataKey]);
|
|
12103
12400
|
if (!traitData) {
|
|
12104
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
12401
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
12105
12402
|
}
|
|
12106
12403
|
if (!layout) {
|
|
12107
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
12404
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.computingLayout") });
|
|
12108
12405
|
}
|
|
12109
12406
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
12110
12407
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -12120,10 +12417,7 @@ var init_BehaviorView = __esm({
|
|
|
12120
12417
|
const machineHeight = scaledH + 100;
|
|
12121
12418
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
12122
12419
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
12123
|
-
/* @__PURE__ */
|
|
12124
|
-
"on ",
|
|
12125
|
-
traitData.linkedEntity
|
|
12126
|
-
] }),
|
|
12420
|
+
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 36, textAnchor: "middle", fill: "var(--color-muted-foreground)", fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.onEntity", { entity: traitData.linkedEntity }) }),
|
|
12127
12421
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
12128
12422
|
/* @__PURE__ */ jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
12129
12423
|
/* @__PURE__ */ jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -12431,7 +12725,7 @@ var init_CodeBlock = __esm({
|
|
|
12431
12725
|
const isLolo = language === "lolo";
|
|
12432
12726
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
12433
12727
|
const eventBus = useEventBus();
|
|
12434
|
-
const { t
|
|
12728
|
+
const { t } = useTranslate();
|
|
12435
12729
|
const scrollRef = useRef(null);
|
|
12436
12730
|
const codeRef = useRef(null);
|
|
12437
12731
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -12686,7 +12980,7 @@ var init_CodeBlock = __esm({
|
|
|
12686
12980
|
size: "sm",
|
|
12687
12981
|
onClick: handleCopy,
|
|
12688
12982
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
12689
|
-
"aria-label": "
|
|
12983
|
+
"aria-label": t("common.copy"),
|
|
12690
12984
|
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
12691
12985
|
}
|
|
12692
12986
|
)
|
|
@@ -12907,9 +13201,18 @@ var init_MarkdownContent = __esm({
|
|
|
12907
13201
|
);
|
|
12908
13202
|
}
|
|
12909
13203
|
return /* @__PURE__ */ jsx(
|
|
12910
|
-
"
|
|
13204
|
+
"code",
|
|
12911
13205
|
{
|
|
13206
|
+
...props,
|
|
13207
|
+
className: codeClassName,
|
|
12912
13208
|
style: {
|
|
13209
|
+
backgroundColor: "var(--color-muted)",
|
|
13210
|
+
color: "var(--color-foreground)",
|
|
13211
|
+
border: "1px solid var(--color-border)",
|
|
13212
|
+
padding: "0.125rem 0.375rem",
|
|
13213
|
+
borderRadius: "0.25rem",
|
|
13214
|
+
fontSize: "0.875em",
|
|
13215
|
+
fontFamily: "ui-monospace, monospace",
|
|
12913
13216
|
whiteSpace: "pre-wrap",
|
|
12914
13217
|
wordBreak: "break-word"
|
|
12915
13218
|
},
|
|
@@ -13332,7 +13635,7 @@ var init_StateMachineView = __esm({
|
|
|
13332
13635
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13333
13636
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13334
13637
|
const isSingle2 = bundle.labels.length === 1;
|
|
13335
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
13638
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13336
13639
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
13337
13640
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
13338
13641
|
const cx = fromState.x;
|
|
@@ -13458,7 +13761,7 @@ var init_StateMachineView = __esm({
|
|
|
13458
13761
|
const controlX = midX + perpX;
|
|
13459
13762
|
const controlY = midY + perpY;
|
|
13460
13763
|
const isSingle = bundle.labels.length === 1;
|
|
13461
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
13764
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13462
13765
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
13463
13766
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
13464
13767
|
const curveMidpoint = {
|
|
@@ -13613,7 +13916,7 @@ var init_StateMachineView = __esm({
|
|
|
13613
13916
|
{
|
|
13614
13917
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
13615
13918
|
style: { backgroundColor: "var(--color-success)" },
|
|
13616
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
13919
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
13617
13920
|
}
|
|
13618
13921
|
),
|
|
13619
13922
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -13635,10 +13938,7 @@ var init_StateMachineView = __esm({
|
|
|
13635
13938
|
{
|
|
13636
13939
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
13637
13940
|
style: { backgroundColor: "var(--color-accent)" },
|
|
13638
|
-
children: /* @__PURE__ */
|
|
13639
|
-
bundle.labels.length,
|
|
13640
|
-
" events"
|
|
13641
|
-
] })
|
|
13941
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
13642
13942
|
}
|
|
13643
13943
|
)
|
|
13644
13944
|
]
|
|
@@ -13783,7 +14083,7 @@ var init_StateMachineView = __esm({
|
|
|
13783
14083
|
align: "center",
|
|
13784
14084
|
className: "mb-2",
|
|
13785
14085
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
13786
|
-
children: "
|
|
14086
|
+
children: t("stateMachine.externalEffects")
|
|
13787
14087
|
}
|
|
13788
14088
|
),
|
|
13789
14089
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -13803,10 +14103,10 @@ var init_StateMachineView = __esm({
|
|
|
13803
14103
|
Legend = ({ config, y }) => {
|
|
13804
14104
|
const { t } = useTranslate();
|
|
13805
14105
|
const items = [
|
|
13806
|
-
{ label: "
|
|
13807
|
-
{ label: "
|
|
13808
|
-
{ label: "
|
|
13809
|
-
{ label: "
|
|
14106
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
14107
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
14108
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
14109
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
13810
14110
|
];
|
|
13811
14111
|
return /* @__PURE__ */ jsx(
|
|
13812
14112
|
HStack,
|
|
@@ -13821,8 +14121,8 @@ var init_StateMachineView = __esm({
|
|
|
13821
14121
|
{
|
|
13822
14122
|
className: "w-3 h-3 rounded-full",
|
|
13823
14123
|
style: {
|
|
13824
|
-
backgroundColor: item.
|
|
13825
|
-
border: item.
|
|
14124
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
14125
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
13826
14126
|
}
|
|
13827
14127
|
}
|
|
13828
14128
|
),
|
|
@@ -13834,7 +14134,7 @@ var init_StateMachineView = __esm({
|
|
|
13834
14134
|
children: item.label
|
|
13835
14135
|
}
|
|
13836
14136
|
)
|
|
13837
|
-
] }, item.
|
|
14137
|
+
] }, item.key))
|
|
13838
14138
|
}
|
|
13839
14139
|
);
|
|
13840
14140
|
};
|
|
@@ -14628,13 +14928,13 @@ var init_JazariStateMachine = __esm({
|
|
|
14628
14928
|
);
|
|
14629
14929
|
}, [resolvedTrait, entityFields]);
|
|
14630
14930
|
if (isLoading) {
|
|
14631
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
14931
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
14632
14932
|
}
|
|
14633
14933
|
if (error) {
|
|
14634
14934
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
14635
14935
|
}
|
|
14636
14936
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
14637
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
14937
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
14638
14938
|
}
|
|
14639
14939
|
return /* @__PURE__ */ jsx(
|
|
14640
14940
|
StateMachineView,
|
|
@@ -15678,13 +15978,13 @@ var init_LayoutPatterns = __esm({
|
|
|
15678
15978
|
function generateRuleId() {
|
|
15679
15979
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
15680
15980
|
}
|
|
15681
|
-
function questionsToOptions(questions,
|
|
15981
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
15682
15982
|
const opts = questions.map((q) => ({
|
|
15683
15983
|
value: q.id,
|
|
15684
15984
|
label: q.label
|
|
15685
15985
|
}));
|
|
15686
|
-
if (
|
|
15687
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
15986
|
+
if (endOfSurveyLabel !== null) {
|
|
15987
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
15688
15988
|
}
|
|
15689
15989
|
return opts;
|
|
15690
15990
|
}
|
|
@@ -15693,7 +15993,7 @@ function isRuleBroken(rule, questions) {
|
|
|
15693
15993
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
15694
15994
|
return !sourceExists || !targetExists;
|
|
15695
15995
|
}
|
|
15696
|
-
var END_OF_SURVEY,
|
|
15996
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
15697
15997
|
var init_BranchingLogicBuilder = __esm({
|
|
15698
15998
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
15699
15999
|
"use client";
|
|
@@ -15706,14 +16006,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15706
16006
|
init_FilterPill();
|
|
15707
16007
|
init_Box();
|
|
15708
16008
|
init_useEventBus();
|
|
16009
|
+
init_useTranslate();
|
|
15709
16010
|
init_cn();
|
|
15710
16011
|
END_OF_SURVEY = "end-of-survey";
|
|
15711
|
-
OPERATOR_OPTIONS = [
|
|
15712
|
-
{ value: "equals", label: "equals" },
|
|
15713
|
-
{ value: "not-equals", label: "does not equal" },
|
|
15714
|
-
{ value: "contains", label: "contains" },
|
|
15715
|
-
{ value: "in", label: "is one of" }
|
|
15716
|
-
];
|
|
15717
16012
|
RuleRow = ({
|
|
15718
16013
|
rule,
|
|
15719
16014
|
questions,
|
|
@@ -15722,8 +16017,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15722
16017
|
onChange,
|
|
15723
16018
|
onDelete
|
|
15724
16019
|
}) => {
|
|
15725
|
-
const
|
|
15726
|
-
const
|
|
16020
|
+
const { t } = useTranslate();
|
|
16021
|
+
const operatorOptions = useMemo(
|
|
16022
|
+
() => [
|
|
16023
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
16024
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
16025
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
16026
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
16027
|
+
],
|
|
16028
|
+
[t]
|
|
16029
|
+
);
|
|
16030
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
16031
|
+
const targetOptions = useMemo(
|
|
16032
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
16033
|
+
[questions, t]
|
|
16034
|
+
);
|
|
15727
16035
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
15728
16036
|
const valueOptions = useMemo(() => {
|
|
15729
16037
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -15768,22 +16076,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15768
16076
|
),
|
|
15769
16077
|
children: [
|
|
15770
16078
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
15771
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
16079
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
15772
16080
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
15773
16081
|
Select,
|
|
15774
16082
|
{
|
|
15775
16083
|
options: sourceOptions,
|
|
15776
16084
|
value: rule.sourceQuestionId,
|
|
15777
|
-
placeholder: "
|
|
16085
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
15778
16086
|
onChange: handleSource,
|
|
15779
16087
|
disabled: readOnly,
|
|
15780
|
-
error: broken ? "
|
|
16088
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
15781
16089
|
}
|
|
15782
16090
|
) }),
|
|
15783
16091
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
15784
16092
|
Select,
|
|
15785
16093
|
{
|
|
15786
|
-
options:
|
|
16094
|
+
options: operatorOptions,
|
|
15787
16095
|
value: rule.operator,
|
|
15788
16096
|
onChange: handleOperator,
|
|
15789
16097
|
disabled: readOnly
|
|
@@ -15806,7 +16114,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15806
16114
|
{
|
|
15807
16115
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
15808
16116
|
value: "",
|
|
15809
|
-
placeholder: "
|
|
16117
|
+
placeholder: t("branchingLogic.addValue"),
|
|
15810
16118
|
onChange: handleAddChip,
|
|
15811
16119
|
disabled: readOnly
|
|
15812
16120
|
}
|
|
@@ -15814,7 +16122,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15814
16122
|
Input,
|
|
15815
16123
|
{
|
|
15816
16124
|
inputType: "text",
|
|
15817
|
-
placeholder: "
|
|
16125
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
15818
16126
|
value: "",
|
|
15819
16127
|
onKeyDown: (e) => {
|
|
15820
16128
|
if (e.key !== "Enter") return;
|
|
@@ -15832,7 +16140,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15832
16140
|
{
|
|
15833
16141
|
options: valueOptions,
|
|
15834
16142
|
value: scalarValue,
|
|
15835
|
-
placeholder: "
|
|
16143
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
15836
16144
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
15837
16145
|
disabled: readOnly
|
|
15838
16146
|
}
|
|
@@ -15840,7 +16148,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15840
16148
|
Input,
|
|
15841
16149
|
{
|
|
15842
16150
|
inputType: "text",
|
|
15843
|
-
placeholder: "
|
|
16151
|
+
placeholder: t("branchingLogic.value"),
|
|
15844
16152
|
value: scalarValue,
|
|
15845
16153
|
onChange: handleScalarValue,
|
|
15846
16154
|
disabled: readOnly
|
|
@@ -15848,17 +16156,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15848
16156
|
) }),
|
|
15849
16157
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
15850
16158
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
15851
|
-
"
|
|
16159
|
+
t("branchingLogic.goTo")
|
|
15852
16160
|
] }),
|
|
15853
16161
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
15854
16162
|
Select,
|
|
15855
16163
|
{
|
|
15856
16164
|
options: targetOptions,
|
|
15857
16165
|
value: rule.targetQuestionId,
|
|
15858
|
-
placeholder: "
|
|
16166
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
15859
16167
|
onChange: handleTarget,
|
|
15860
16168
|
disabled: readOnly,
|
|
15861
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
16169
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
15862
16170
|
}
|
|
15863
16171
|
) }),
|
|
15864
16172
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -15870,11 +16178,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15870
16178
|
action: "DELETE_RULE",
|
|
15871
16179
|
actionPayload: { ruleId: rule.id },
|
|
15872
16180
|
onClick: onDelete,
|
|
15873
|
-
"aria-label": "
|
|
16181
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
15874
16182
|
}
|
|
15875
16183
|
)
|
|
15876
16184
|
] }),
|
|
15877
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
16185
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
15878
16186
|
]
|
|
15879
16187
|
}
|
|
15880
16188
|
);
|
|
@@ -15884,10 +16192,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15884
16192
|
NODE_GAP_Y = 80;
|
|
15885
16193
|
PADDING = 32;
|
|
15886
16194
|
LogicGraph = ({ questions, rules }) => {
|
|
16195
|
+
const { t } = useTranslate();
|
|
16196
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
15887
16197
|
const layout = useMemo(() => {
|
|
15888
16198
|
const items = [
|
|
15889
16199
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
15890
|
-
{ id: END_OF_SURVEY, label:
|
|
16200
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
15891
16201
|
];
|
|
15892
16202
|
const positions = {};
|
|
15893
16203
|
items.forEach((item, i) => {
|
|
@@ -15899,14 +16209,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15899
16209
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
15900
16210
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
15901
16211
|
return { items, positions, width, height };
|
|
15902
|
-
}, [questions]);
|
|
16212
|
+
}, [questions, endOfSurveyLabel]);
|
|
15903
16213
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
15904
16214
|
"svg",
|
|
15905
16215
|
{
|
|
15906
16216
|
width: layout.width,
|
|
15907
16217
|
height: layout.height,
|
|
15908
16218
|
role: "img",
|
|
15909
|
-
"aria-label": "
|
|
16219
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
15910
16220
|
style: { display: "block" },
|
|
15911
16221
|
children: [
|
|
15912
16222
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -16014,6 +16324,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16014
16324
|
readOnly = false,
|
|
16015
16325
|
className
|
|
16016
16326
|
}) => {
|
|
16327
|
+
const { t } = useTranslate();
|
|
16017
16328
|
const eventBus = useEventBus();
|
|
16018
16329
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
16019
16330
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -16066,16 +16377,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16066
16377
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
16067
16378
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
16068
16379
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
16069
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
16380
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
16070
16381
|
/* @__PURE__ */ jsx(
|
|
16071
16382
|
Badge,
|
|
16072
16383
|
{
|
|
16073
16384
|
variant: "neutral",
|
|
16074
16385
|
size: "sm",
|
|
16075
|
-
label:
|
|
16386
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
16076
16387
|
}
|
|
16077
16388
|
),
|
|
16078
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
16389
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
16390
|
+
Badge,
|
|
16391
|
+
{
|
|
16392
|
+
variant: "error",
|
|
16393
|
+
size: "sm",
|
|
16394
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
16395
|
+
}
|
|
16396
|
+
)
|
|
16079
16397
|
] }),
|
|
16080
16398
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
16081
16399
|
/* @__PURE__ */ jsx(
|
|
@@ -16086,7 +16404,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16086
16404
|
leftIcon: Pencil,
|
|
16087
16405
|
action: "VIEW_EDIT",
|
|
16088
16406
|
onClick: () => setView("edit"),
|
|
16089
|
-
children: "
|
|
16407
|
+
children: t("branchingLogic.rules")
|
|
16090
16408
|
}
|
|
16091
16409
|
),
|
|
16092
16410
|
/* @__PURE__ */ jsx(
|
|
@@ -16097,13 +16415,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16097
16415
|
leftIcon: Eye,
|
|
16098
16416
|
action: "VIEW_GRAPH",
|
|
16099
16417
|
onClick: () => setView("graph"),
|
|
16100
|
-
children: "
|
|
16418
|
+
children: t("branchingLogic.logicGraph")
|
|
16101
16419
|
}
|
|
16102
16420
|
)
|
|
16103
16421
|
] })
|
|
16104
16422
|
] }),
|
|
16105
16423
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
16106
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
16424
|
+
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsx(
|
|
16107
16425
|
RuleRow,
|
|
16108
16426
|
{
|
|
16109
16427
|
rule,
|
|
@@ -16124,7 +16442,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16124
16442
|
action: "ADD_RULE",
|
|
16125
16443
|
onClick: handleAddRule,
|
|
16126
16444
|
disabled: noQuestions,
|
|
16127
|
-
children: "
|
|
16445
|
+
children: t("branchingLogic.addRule")
|
|
16128
16446
|
}
|
|
16129
16447
|
) })
|
|
16130
16448
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -16751,7 +17069,7 @@ function CalendarGrid({
|
|
|
16751
17069
|
onClick: stepPrev,
|
|
16752
17070
|
"aria-disabled": !canPrev || void 0,
|
|
16753
17071
|
"aria-label": t("aria.previousDays"),
|
|
16754
|
-
children: "
|
|
17072
|
+
children: t("nav.previous")
|
|
16755
17073
|
}
|
|
16756
17074
|
),
|
|
16757
17075
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -16764,7 +17082,7 @@ function CalendarGrid({
|
|
|
16764
17082
|
onClick: stepNext,
|
|
16765
17083
|
"aria-disabled": !canNext || void 0,
|
|
16766
17084
|
"aria-label": t("aria.nextDays"),
|
|
16767
|
-
children: "
|
|
17085
|
+
children: t("nav.next")
|
|
16768
17086
|
}
|
|
16769
17087
|
)
|
|
16770
17088
|
] }),
|
|
@@ -18314,7 +18632,7 @@ var init_Pagination = __esm({
|
|
|
18314
18632
|
type: "number",
|
|
18315
18633
|
value: jumpToPage,
|
|
18316
18634
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
18317
|
-
placeholder: "
|
|
18635
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
18318
18636
|
className: "w-20",
|
|
18319
18637
|
onKeyDown: (e) => {
|
|
18320
18638
|
if (e.key === "Enter") {
|
|
@@ -18452,13 +18770,10 @@ var init_CardGrid = __esm({
|
|
|
18452
18770
|
return children;
|
|
18453
18771
|
}
|
|
18454
18772
|
if (isLoading) {
|
|
18455
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
18773
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
18456
18774
|
}
|
|
18457
18775
|
if (error) {
|
|
18458
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
18459
|
-
"Error loading items: ",
|
|
18460
|
-
error.message
|
|
18461
|
-
] }) });
|
|
18776
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
18462
18777
|
}
|
|
18463
18778
|
if (normalizedData.length === 0) {
|
|
18464
18779
|
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -22555,7 +22870,7 @@ function DataGrid({
|
|
|
22555
22870
|
onChange: () => toggleSelection(id),
|
|
22556
22871
|
onClick: (e) => e.stopPropagation(),
|
|
22557
22872
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
22558
|
-
"aria-label":
|
|
22873
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
22559
22874
|
}
|
|
22560
22875
|
),
|
|
22561
22876
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -22753,7 +23068,7 @@ function formatDate3(value) {
|
|
|
22753
23068
|
if (isNaN(d.getTime())) return String(value);
|
|
22754
23069
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
22755
23070
|
}
|
|
22756
|
-
function formatValue2(value, format) {
|
|
23071
|
+
function formatValue2(value, format, boolLabels) {
|
|
22757
23072
|
if (value === void 0 || value === null) return "";
|
|
22758
23073
|
switch (format) {
|
|
22759
23074
|
case "date":
|
|
@@ -22765,7 +23080,7 @@ function formatValue2(value, format) {
|
|
|
22765
23080
|
case "percent":
|
|
22766
23081
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
22767
23082
|
case "boolean":
|
|
22768
|
-
return value ? "Yes" : "No";
|
|
23083
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
22769
23084
|
default:
|
|
22770
23085
|
return String(value);
|
|
22771
23086
|
}
|
|
@@ -23061,7 +23376,7 @@ function DataList({
|
|
|
23061
23376
|
field.label ?? fieldLabel3(field.name),
|
|
23062
23377
|
":"
|
|
23063
23378
|
] }),
|
|
23064
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
23379
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
23065
23380
|
] }, field.name);
|
|
23066
23381
|
}) }),
|
|
23067
23382
|
progressFields.map((field) => {
|
|
@@ -23191,6 +23506,7 @@ var init_FileTree = __esm({
|
|
|
23191
23506
|
init_Box();
|
|
23192
23507
|
init_Typography();
|
|
23193
23508
|
init_Icon();
|
|
23509
|
+
init_useTranslate();
|
|
23194
23510
|
TreeNodeItem = ({
|
|
23195
23511
|
node,
|
|
23196
23512
|
depth,
|
|
@@ -23276,8 +23592,9 @@ var init_FileTree = __esm({
|
|
|
23276
23592
|
className,
|
|
23277
23593
|
indent = 16
|
|
23278
23594
|
}) => {
|
|
23595
|
+
const { t } = useTranslate();
|
|
23279
23596
|
if (tree.length === 0) {
|
|
23280
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
23597
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23281
23598
|
}
|
|
23282
23599
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
23283
23600
|
TreeNodeItem,
|
|
@@ -23404,6 +23721,7 @@ var init_FilterGroup = __esm({
|
|
|
23404
23721
|
init_Icon();
|
|
23405
23722
|
init_useEventBus();
|
|
23406
23723
|
init_useQuerySingleton();
|
|
23724
|
+
init_useTranslate();
|
|
23407
23725
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
23408
23726
|
lookStyles6 = {
|
|
23409
23727
|
toolbar: "",
|
|
@@ -23424,6 +23742,7 @@ var init_FilterGroup = __esm({
|
|
|
23424
23742
|
isLoading,
|
|
23425
23743
|
look = "toolbar"
|
|
23426
23744
|
}) => {
|
|
23745
|
+
const { t } = useTranslate();
|
|
23427
23746
|
const eventBus = useEventBus();
|
|
23428
23747
|
const queryState = useQuerySingleton(query);
|
|
23429
23748
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -23505,7 +23824,7 @@ var init_FilterGroup = __esm({
|
|
|
23505
23824
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
23506
23825
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
23507
23826
|
),
|
|
23508
|
-
children: "
|
|
23827
|
+
children: t("filterGroup.all")
|
|
23509
23828
|
}
|
|
23510
23829
|
),
|
|
23511
23830
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -23533,7 +23852,7 @@ var init_FilterGroup = __esm({
|
|
|
23533
23852
|
size: "sm",
|
|
23534
23853
|
onClick: handleClearAll,
|
|
23535
23854
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23536
|
-
children: "
|
|
23855
|
+
children: t("filterGroup.clear")
|
|
23537
23856
|
}
|
|
23538
23857
|
)
|
|
23539
23858
|
]
|
|
@@ -23544,7 +23863,7 @@ var init_FilterGroup = __esm({
|
|
|
23544
23863
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
23545
23864
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23546
23865
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23547
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
23866
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23548
23867
|
] }),
|
|
23549
23868
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
23550
23869
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -23567,7 +23886,7 @@ var init_FilterGroup = __esm({
|
|
|
23567
23886
|
`${filter.field}_from`,
|
|
23568
23887
|
e.target.value || null
|
|
23569
23888
|
),
|
|
23570
|
-
placeholder: "
|
|
23889
|
+
placeholder: t("filterGroup.from"),
|
|
23571
23890
|
clearable: true,
|
|
23572
23891
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
23573
23892
|
}
|
|
@@ -23581,7 +23900,7 @@ var init_FilterGroup = __esm({
|
|
|
23581
23900
|
`${filter.field}_to`,
|
|
23582
23901
|
e.target.value || null
|
|
23583
23902
|
),
|
|
23584
|
-
placeholder: "
|
|
23903
|
+
placeholder: t("filterGroup.to"),
|
|
23585
23904
|
clearable: true,
|
|
23586
23905
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
23587
23906
|
}
|
|
@@ -23601,7 +23920,7 @@ var init_FilterGroup = __esm({
|
|
|
23601
23920
|
value: selectedValues[filter.field] || "all",
|
|
23602
23921
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23603
23922
|
options: [
|
|
23604
|
-
{ value: "all", label: "
|
|
23923
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23605
23924
|
...filter.options?.map((opt) => ({
|
|
23606
23925
|
value: opt,
|
|
23607
23926
|
label: opt
|
|
@@ -23618,7 +23937,7 @@ var init_FilterGroup = __esm({
|
|
|
23618
23937
|
onClick: handleClearAll,
|
|
23619
23938
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23620
23939
|
className: "self-start",
|
|
23621
|
-
children: "
|
|
23940
|
+
children: t("filterGroup.clearAll")
|
|
23622
23941
|
}
|
|
23623
23942
|
)
|
|
23624
23943
|
] });
|
|
@@ -23684,7 +24003,7 @@ var init_FilterGroup = __esm({
|
|
|
23684
24003
|
value: selectedValues[filter.field] || "all",
|
|
23685
24004
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23686
24005
|
options: [
|
|
23687
|
-
{ value: "all", label:
|
|
24006
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23688
24007
|
...filter.options?.map((opt) => ({
|
|
23689
24008
|
value: opt,
|
|
23690
24009
|
label: opt
|
|
@@ -23713,7 +24032,7 @@ var init_FilterGroup = __esm({
|
|
|
23713
24032
|
field
|
|
23714
24033
|
);
|
|
23715
24034
|
}),
|
|
23716
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
24035
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
23717
24036
|
] })
|
|
23718
24037
|
]
|
|
23719
24038
|
}
|
|
@@ -23738,7 +24057,7 @@ var init_FilterGroup = __esm({
|
|
|
23738
24057
|
className: "text-muted-foreground",
|
|
23739
24058
|
children: [
|
|
23740
24059
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23741
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24060
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23742
24061
|
]
|
|
23743
24062
|
}
|
|
23744
24063
|
),
|
|
@@ -23764,7 +24083,7 @@ var init_FilterGroup = __esm({
|
|
|
23764
24083
|
`${filter.field}_from`,
|
|
23765
24084
|
e.target.value || null
|
|
23766
24085
|
),
|
|
23767
|
-
placeholder: "
|
|
24086
|
+
placeholder: t("filterGroup.from"),
|
|
23768
24087
|
clearable: true,
|
|
23769
24088
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
23770
24089
|
className: "min-w-[130px]"
|
|
@@ -23780,7 +24099,7 @@ var init_FilterGroup = __esm({
|
|
|
23780
24099
|
`${filter.field}_to`,
|
|
23781
24100
|
e.target.value || null
|
|
23782
24101
|
),
|
|
23783
|
-
placeholder: "
|
|
24102
|
+
placeholder: t("filterGroup.to"),
|
|
23784
24103
|
clearable: true,
|
|
23785
24104
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
23786
24105
|
className: "min-w-[130px]"
|
|
@@ -23802,7 +24121,7 @@ var init_FilterGroup = __esm({
|
|
|
23802
24121
|
value: selectedValues[filter.field] || "all",
|
|
23803
24122
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23804
24123
|
options: [
|
|
23805
|
-
{ value: "all", label: "
|
|
24124
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23806
24125
|
...filter.options?.map((opt) => ({
|
|
23807
24126
|
value: opt,
|
|
23808
24127
|
label: opt
|
|
@@ -23813,10 +24132,7 @@ var init_FilterGroup = __esm({
|
|
|
23813
24132
|
)
|
|
23814
24133
|
] }, filter.field)),
|
|
23815
24134
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
23816
|
-
/* @__PURE__ */
|
|
23817
|
-
activeFilterCount,
|
|
23818
|
-
" active"
|
|
23819
|
-
] }),
|
|
24135
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
23820
24136
|
/* @__PURE__ */ jsx(
|
|
23821
24137
|
Button,
|
|
23822
24138
|
{
|
|
@@ -23824,7 +24140,7 @@ var init_FilterGroup = __esm({
|
|
|
23824
24140
|
size: "sm",
|
|
23825
24141
|
onClick: handleClearAll,
|
|
23826
24142
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23827
|
-
children: "
|
|
24143
|
+
children: t("filterGroup.clearAll")
|
|
23828
24144
|
}
|
|
23829
24145
|
)
|
|
23830
24146
|
] })
|
|
@@ -25019,19 +25335,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25019
25335
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25020
25336
|
}
|
|
25021
25337
|
});
|
|
25022
|
-
var
|
|
25338
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
25023
25339
|
var init_ViolationAlert = __esm({
|
|
25024
25340
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25025
25341
|
init_cn();
|
|
25342
|
+
init_useTranslate();
|
|
25026
25343
|
init_Box();
|
|
25027
25344
|
init_Stack();
|
|
25028
25345
|
init_Typography();
|
|
25029
25346
|
init_Button();
|
|
25030
25347
|
init_Icon();
|
|
25031
|
-
|
|
25032
|
-
measure: "
|
|
25033
|
-
admin: "
|
|
25034
|
-
penalty: "
|
|
25348
|
+
actionTypeLabelKeys = {
|
|
25349
|
+
measure: "violationAlert.actionType.measure",
|
|
25350
|
+
admin: "violationAlert.actionType.admin",
|
|
25351
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25035
25352
|
};
|
|
25036
25353
|
actionTypeIcons = {
|
|
25037
25354
|
measure: "alert-triangle",
|
|
@@ -25048,10 +25365,11 @@ var init_ViolationAlert = __esm({
|
|
|
25048
25365
|
className,
|
|
25049
25366
|
...flatProps
|
|
25050
25367
|
}) => {
|
|
25368
|
+
const { t } = useTranslate();
|
|
25051
25369
|
const resolvedViolation = violation ?? {
|
|
25052
25370
|
law: "",
|
|
25053
25371
|
article: "",
|
|
25054
|
-
message: flatProps.message ?? "
|
|
25372
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25055
25373
|
actionType: "measure"
|
|
25056
25374
|
};
|
|
25057
25375
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25136,7 +25454,7 @@ var init_ViolationAlert = __esm({
|
|
|
25136
25454
|
{
|
|
25137
25455
|
variant: "caption",
|
|
25138
25456
|
className: cn(textColor, "opacity-75"),
|
|
25139
|
-
children:
|
|
25457
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25140
25458
|
}
|
|
25141
25459
|
)
|
|
25142
25460
|
] })
|
|
@@ -25167,7 +25485,7 @@ var init_ViolationAlert = __esm({
|
|
|
25167
25485
|
{
|
|
25168
25486
|
variant: "caption",
|
|
25169
25487
|
className: cn(textColor, "opacity-75"),
|
|
25170
|
-
children: "
|
|
25488
|
+
children: t("violationAlert.adminLabel")
|
|
25171
25489
|
}
|
|
25172
25490
|
),
|
|
25173
25491
|
/* @__PURE__ */ jsx(
|
|
@@ -25186,7 +25504,7 @@ var init_ViolationAlert = __esm({
|
|
|
25186
25504
|
{
|
|
25187
25505
|
variant: "caption",
|
|
25188
25506
|
className: cn(textColor, "opacity-75"),
|
|
25189
|
-
children: "
|
|
25507
|
+
children: t("violationAlert.penaltyLabel")
|
|
25190
25508
|
}
|
|
25191
25509
|
),
|
|
25192
25510
|
/* @__PURE__ */ jsx(
|
|
@@ -25211,7 +25529,7 @@ var init_ViolationAlert = __esm({
|
|
|
25211
25529
|
className: cn(textColor, "self-start"),
|
|
25212
25530
|
children: [
|
|
25213
25531
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25214
|
-
"
|
|
25532
|
+
t("violationAlert.goToField")
|
|
25215
25533
|
]
|
|
25216
25534
|
}
|
|
25217
25535
|
)
|
|
@@ -25527,6 +25845,7 @@ var init_LineChart = __esm({
|
|
|
25527
25845
|
"use client";
|
|
25528
25846
|
init_cn();
|
|
25529
25847
|
init_atoms2();
|
|
25848
|
+
init_useTranslate();
|
|
25530
25849
|
LineChart2 = ({
|
|
25531
25850
|
data,
|
|
25532
25851
|
width = 400,
|
|
@@ -25538,6 +25857,7 @@ var init_LineChart = __esm({
|
|
|
25538
25857
|
areaColor = "var(--color-primary)",
|
|
25539
25858
|
className
|
|
25540
25859
|
}) => {
|
|
25860
|
+
const { t } = useTranslate();
|
|
25541
25861
|
const gradientId = useId();
|
|
25542
25862
|
const safeData = data ?? [];
|
|
25543
25863
|
const sortedData = useMemo(() => {
|
|
@@ -25574,7 +25894,7 @@ var init_LineChart = __esm({
|
|
|
25574
25894
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
25575
25895
|
}, [linePath, points, height, showArea]);
|
|
25576
25896
|
if (safeData.length === 0) {
|
|
25577
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
25897
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
25578
25898
|
}
|
|
25579
25899
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
25580
25900
|
"svg",
|
|
@@ -27765,6 +28085,7 @@ var init_GraphView = __esm({
|
|
|
27765
28085
|
"use client";
|
|
27766
28086
|
init_cn();
|
|
27767
28087
|
init_atoms2();
|
|
28088
|
+
init_useTranslate();
|
|
27768
28089
|
GROUP_COLORS = [
|
|
27769
28090
|
"#3b82f6",
|
|
27770
28091
|
// blue-500
|
|
@@ -27797,6 +28118,7 @@ var init_GraphView = __esm({
|
|
|
27797
28118
|
showLabels = true,
|
|
27798
28119
|
zoomToFit = true
|
|
27799
28120
|
}) => {
|
|
28121
|
+
const { t } = useTranslate();
|
|
27800
28122
|
const containerRef = useRef(null);
|
|
27801
28123
|
const animRef = useRef(0);
|
|
27802
28124
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -27974,7 +28296,7 @@ var init_GraphView = __esm({
|
|
|
27974
28296
|
[onNodeClick]
|
|
27975
28297
|
);
|
|
27976
28298
|
if (nodes.length === 0) {
|
|
27977
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: "
|
|
28299
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
27978
28300
|
}
|
|
27979
28301
|
return /* @__PURE__ */ jsx(
|
|
27980
28302
|
Box,
|
|
@@ -28430,11 +28752,12 @@ var init_UploadDropZone = __esm({
|
|
|
28430
28752
|
init_Icon();
|
|
28431
28753
|
init_Typography();
|
|
28432
28754
|
init_useEventBus();
|
|
28755
|
+
init_useTranslate();
|
|
28433
28756
|
UploadDropZone = ({
|
|
28434
28757
|
accept,
|
|
28435
28758
|
maxSize,
|
|
28436
28759
|
maxFiles = 1,
|
|
28437
|
-
label
|
|
28760
|
+
label,
|
|
28438
28761
|
description,
|
|
28439
28762
|
disabled = false,
|
|
28440
28763
|
action,
|
|
@@ -28442,22 +28765,24 @@ var init_UploadDropZone = __esm({
|
|
|
28442
28765
|
onFiles,
|
|
28443
28766
|
className
|
|
28444
28767
|
}) => {
|
|
28768
|
+
const { t } = useTranslate();
|
|
28769
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28445
28770
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
28446
28771
|
const [error, setError] = useState(null);
|
|
28447
28772
|
const inputRef = useRef(null);
|
|
28448
28773
|
const eventBus = useSafeEventBus7();
|
|
28449
28774
|
const defaultDescription = [
|
|
28450
|
-
accept ?
|
|
28451
|
-
maxSize ?
|
|
28452
|
-
maxFiles > 1 ?
|
|
28775
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
28776
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
28777
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28453
28778
|
].filter(Boolean).join(". ");
|
|
28454
28779
|
const validateFiles = useCallback(
|
|
28455
28780
|
(files) => {
|
|
28456
28781
|
if (files.length > maxFiles) {
|
|
28457
|
-
return { valid: [], error:
|
|
28782
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28458
28783
|
}
|
|
28459
28784
|
if (accept) {
|
|
28460
|
-
const acceptedTypes = accept.split(",").map((
|
|
28785
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28461
28786
|
const invalid = files.filter((file) => {
|
|
28462
28787
|
return !acceptedTypes.some((type) => {
|
|
28463
28788
|
if (type.endsWith("/*")) {
|
|
@@ -28467,7 +28792,7 @@ var init_UploadDropZone = __esm({
|
|
|
28467
28792
|
});
|
|
28468
28793
|
});
|
|
28469
28794
|
if (invalid.length > 0) {
|
|
28470
|
-
return { valid: [], error:
|
|
28795
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28471
28796
|
}
|
|
28472
28797
|
}
|
|
28473
28798
|
if (maxSize) {
|
|
@@ -28475,13 +28800,13 @@ var init_UploadDropZone = __esm({
|
|
|
28475
28800
|
if (tooLarge.length > 0) {
|
|
28476
28801
|
return {
|
|
28477
28802
|
valid: [],
|
|
28478
|
-
error:
|
|
28803
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28479
28804
|
};
|
|
28480
28805
|
}
|
|
28481
28806
|
}
|
|
28482
28807
|
return { valid: files, error: null };
|
|
28483
28808
|
},
|
|
28484
|
-
[accept, maxSize, maxFiles]
|
|
28809
|
+
[accept, maxSize, maxFiles, t]
|
|
28485
28810
|
);
|
|
28486
28811
|
const handleFiles = useCallback(
|
|
28487
28812
|
(files) => {
|
|
@@ -28552,7 +28877,7 @@ var init_UploadDropZone = __esm({
|
|
|
28552
28877
|
handleClick();
|
|
28553
28878
|
}
|
|
28554
28879
|
},
|
|
28555
|
-
"aria-label":
|
|
28880
|
+
"aria-label": resolvedLabel,
|
|
28556
28881
|
children: [
|
|
28557
28882
|
/* @__PURE__ */ jsx(
|
|
28558
28883
|
"input",
|
|
@@ -28568,7 +28893,7 @@ var init_UploadDropZone = __esm({
|
|
|
28568
28893
|
}
|
|
28569
28894
|
),
|
|
28570
28895
|
error ? /* @__PURE__ */ jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
28571
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
28896
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
28572
28897
|
error ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
28573
28898
|
]
|
|
28574
28899
|
}
|
|
@@ -28990,7 +29315,7 @@ function TableView({
|
|
|
28990
29315
|
{
|
|
28991
29316
|
checked: selected.has(id),
|
|
28992
29317
|
onChange: () => toggleRow(id),
|
|
28993
|
-
"aria-label":
|
|
29318
|
+
"aria-label": t("table.selectRow", { id })
|
|
28994
29319
|
}
|
|
28995
29320
|
) }),
|
|
28996
29321
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -31837,7 +32162,7 @@ var init_QrScanner = __esm({
|
|
|
31837
32162
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
31838
32163
|
children: [
|
|
31839
32164
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
31840
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32165
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
31841
32166
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
31842
32167
|
]
|
|
31843
32168
|
}
|
|
@@ -31848,7 +32173,7 @@ var init_QrScanner = __esm({
|
|
|
31848
32173
|
position: "absolute",
|
|
31849
32174
|
display: "flex",
|
|
31850
32175
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
31851
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32176
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
31852
32177
|
}
|
|
31853
32178
|
),
|
|
31854
32179
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -31867,7 +32192,7 @@ var init_QrScanner = __esm({
|
|
|
31867
32192
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31868
32193
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31869
32194
|
),
|
|
31870
|
-
"aria-label": isPaused ? "
|
|
32195
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
31871
32196
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
31872
32197
|
}
|
|
31873
32198
|
),
|
|
@@ -31880,7 +32205,7 @@ var init_QrScanner = __esm({
|
|
|
31880
32205
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31881
32206
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31882
32207
|
),
|
|
31883
|
-
"aria-label":
|
|
32208
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
31884
32209
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31885
32210
|
}
|
|
31886
32211
|
),
|
|
@@ -31894,7 +32219,7 @@ var init_QrScanner = __esm({
|
|
|
31894
32219
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31895
32220
|
),
|
|
31896
32221
|
"aria-label": t("aria.mockScanDev"),
|
|
31897
|
-
children: "
|
|
32222
|
+
children: t("qrScanner.mockScan")
|
|
31898
32223
|
}
|
|
31899
32224
|
)
|
|
31900
32225
|
]
|
|
@@ -31912,6 +32237,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31912
32237
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
31913
32238
|
init_cn();
|
|
31914
32239
|
init_useEventBus();
|
|
32240
|
+
init_useTranslate();
|
|
31915
32241
|
init_Typography();
|
|
31916
32242
|
init_Box();
|
|
31917
32243
|
init_Label();
|
|
@@ -31921,36 +32247,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31921
32247
|
const sign = delta >= 0 ? "+" : "-";
|
|
31922
32248
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
31923
32249
|
};
|
|
31924
|
-
constraintHint = (constraint) => {
|
|
32250
|
+
constraintHint = (constraint, t) => {
|
|
31925
32251
|
if (constraint.type === "single") {
|
|
31926
|
-
return constraint.required ? "
|
|
32252
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
31927
32253
|
}
|
|
31928
32254
|
const { min, max } = constraint;
|
|
31929
32255
|
if (min && max) {
|
|
31930
|
-
return min === max ?
|
|
32256
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
31931
32257
|
}
|
|
31932
|
-
if (min) return
|
|
31933
|
-
if (max) return
|
|
31934
|
-
return "
|
|
32258
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32259
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32260
|
+
return t("optionConstraint.optional");
|
|
31935
32261
|
};
|
|
31936
|
-
validateSelection = (selected, constraint) => {
|
|
32262
|
+
validateSelection = (selected, constraint, t) => {
|
|
31937
32263
|
if (constraint.type === "single") {
|
|
31938
32264
|
if (constraint.required && selected.length === 0) {
|
|
31939
|
-
return "
|
|
32265
|
+
return t("optionConstraint.error.pickOne");
|
|
31940
32266
|
}
|
|
31941
32267
|
if (selected.length > 1) {
|
|
31942
|
-
return "
|
|
32268
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
31943
32269
|
}
|
|
31944
32270
|
return void 0;
|
|
31945
32271
|
}
|
|
31946
32272
|
const { min, max } = constraint;
|
|
31947
32273
|
if (min !== void 0 && selected.length < min) {
|
|
31948
32274
|
const remaining = min - selected.length;
|
|
31949
|
-
return
|
|
32275
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
31950
32276
|
}
|
|
31951
32277
|
if (max !== void 0 && selected.length > max) {
|
|
31952
32278
|
const excess = selected.length - max;
|
|
31953
|
-
return
|
|
32279
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
31954
32280
|
}
|
|
31955
32281
|
return void 0;
|
|
31956
32282
|
};
|
|
@@ -31967,8 +32293,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31967
32293
|
className
|
|
31968
32294
|
}) => {
|
|
31969
32295
|
const eventBus = useEventBus();
|
|
31970
|
-
const
|
|
31971
|
-
const
|
|
32296
|
+
const { t } = useTranslate();
|
|
32297
|
+
const hint = constraintHint(constraint, t);
|
|
32298
|
+
const error = validateSelection(selected, constraint, t);
|
|
31972
32299
|
const inputName = `option-${groupId}`;
|
|
31973
32300
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
31974
32301
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32068,7 +32395,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32068
32395
|
variant: "caption",
|
|
32069
32396
|
color: "warning",
|
|
32070
32397
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32071
|
-
children: "
|
|
32398
|
+
children: t("optionConstraint.outOfStock")
|
|
32072
32399
|
}
|
|
32073
32400
|
)
|
|
32074
32401
|
]
|
|
@@ -32390,6 +32717,7 @@ function changeBlockType(block, type) {
|
|
|
32390
32717
|
return { id: block.id, type, content: seed };
|
|
32391
32718
|
}
|
|
32392
32719
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32720
|
+
const { t } = useTranslate();
|
|
32393
32721
|
const [open, setOpen] = useState(false);
|
|
32394
32722
|
const ref = useRef(null);
|
|
32395
32723
|
useEffect(() => {
|
|
@@ -32409,7 +32737,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32409
32737
|
{
|
|
32410
32738
|
type: "button",
|
|
32411
32739
|
variant: "ghost",
|
|
32412
|
-
"aria-label": "
|
|
32740
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32413
32741
|
className: cn(
|
|
32414
32742
|
"inline-flex items-center justify-center",
|
|
32415
32743
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32431,7 +32759,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32431
32759
|
"py-1 text-sm"
|
|
32432
32760
|
),
|
|
32433
32761
|
children: [
|
|
32434
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
32762
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32435
32763
|
/* @__PURE__ */ jsxs(
|
|
32436
32764
|
Button,
|
|
32437
32765
|
{
|
|
@@ -32445,7 +32773,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32445
32773
|
},
|
|
32446
32774
|
children: [
|
|
32447
32775
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32448
|
-
"
|
|
32776
|
+
" ",
|
|
32777
|
+
t("richBlockEditor.duplicate")
|
|
32449
32778
|
]
|
|
32450
32779
|
}
|
|
32451
32780
|
),
|
|
@@ -32462,14 +32791,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32462
32791
|
},
|
|
32463
32792
|
children: [
|
|
32464
32793
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32465
|
-
"
|
|
32794
|
+
" ",
|
|
32795
|
+
t("common.delete")
|
|
32466
32796
|
]
|
|
32467
32797
|
}
|
|
32468
32798
|
),
|
|
32469
32799
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32470
32800
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
32471
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32472
|
-
CHANGEABLE_TYPES.filter((
|
|
32801
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
32802
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
32473
32803
|
Button,
|
|
32474
32804
|
{
|
|
32475
32805
|
type: "button",
|
|
@@ -32477,12 +32807,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32477
32807
|
role: "menuitem",
|
|
32478
32808
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32479
32809
|
onClick: () => {
|
|
32480
|
-
onChangeType(
|
|
32810
|
+
onChangeType(bt);
|
|
32481
32811
|
setOpen(false);
|
|
32482
32812
|
},
|
|
32483
|
-
children:
|
|
32813
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32484
32814
|
},
|
|
32485
|
-
|
|
32815
|
+
bt
|
|
32486
32816
|
))
|
|
32487
32817
|
] })
|
|
32488
32818
|
]
|
|
@@ -32544,6 +32874,7 @@ function BlockRow({
|
|
|
32544
32874
|
onInsertAfter,
|
|
32545
32875
|
onChangeType
|
|
32546
32876
|
}) {
|
|
32877
|
+
const { t } = useTranslate();
|
|
32547
32878
|
const setContent = useCallback(
|
|
32548
32879
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32549
32880
|
[onUpdate]
|
|
@@ -32593,8 +32924,8 @@ function BlockRow({
|
|
|
32593
32924
|
tag: "h1",
|
|
32594
32925
|
value: block.content ?? "",
|
|
32595
32926
|
readOnly,
|
|
32596
|
-
placeholder: placeholder ?? "
|
|
32597
|
-
ariaLabel: "
|
|
32927
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
32928
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32598
32929
|
className: "text-3xl font-bold leading-tight",
|
|
32599
32930
|
onValueChange: setContent
|
|
32600
32931
|
}
|
|
@@ -32606,8 +32937,8 @@ function BlockRow({
|
|
|
32606
32937
|
tag: "h2",
|
|
32607
32938
|
value: block.content ?? "",
|
|
32608
32939
|
readOnly,
|
|
32609
|
-
placeholder: placeholder ?? "
|
|
32610
|
-
ariaLabel: "
|
|
32940
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
32941
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32611
32942
|
className: "text-2xl font-semibold leading-tight",
|
|
32612
32943
|
onValueChange: setContent
|
|
32613
32944
|
}
|
|
@@ -32619,8 +32950,8 @@ function BlockRow({
|
|
|
32619
32950
|
tag: "h3",
|
|
32620
32951
|
value: block.content ?? "",
|
|
32621
32952
|
readOnly,
|
|
32622
|
-
placeholder: placeholder ?? "
|
|
32623
|
-
ariaLabel: "
|
|
32953
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
32954
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32624
32955
|
className: "text-xl font-semibold leading-tight",
|
|
32625
32956
|
onValueChange: setContent
|
|
32626
32957
|
}
|
|
@@ -32632,8 +32963,8 @@ function BlockRow({
|
|
|
32632
32963
|
tag: "blockquote",
|
|
32633
32964
|
value: block.content ?? "",
|
|
32634
32965
|
readOnly,
|
|
32635
|
-
placeholder: placeholder ?? "
|
|
32636
|
-
ariaLabel: "
|
|
32966
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
32967
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32637
32968
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32638
32969
|
onValueChange: setContent
|
|
32639
32970
|
}
|
|
@@ -32641,13 +32972,13 @@ function BlockRow({
|
|
|
32641
32972
|
case "code":
|
|
32642
32973
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32643
32974
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32644
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
32975
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32645
32976
|
!readOnly && /* @__PURE__ */ jsx(
|
|
32646
32977
|
Input,
|
|
32647
32978
|
{
|
|
32648
32979
|
inputType: "text",
|
|
32649
32980
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32650
|
-
"aria-label": "
|
|
32981
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32651
32982
|
className: cn(
|
|
32652
32983
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32653
32984
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32663,8 +32994,8 @@ function BlockRow({
|
|
|
32663
32994
|
tag: "pre",
|
|
32664
32995
|
value: block.content ?? "",
|
|
32665
32996
|
readOnly,
|
|
32666
|
-
placeholder: placeholder ?? "
|
|
32667
|
-
ariaLabel: "
|
|
32997
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
32998
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32668
32999
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32669
33000
|
onValueChange: setContent
|
|
32670
33001
|
}
|
|
@@ -32677,7 +33008,7 @@ function BlockRow({
|
|
|
32677
33008
|
const caption = String(block.metadata?.caption ?? "");
|
|
32678
33009
|
const imgProps = {
|
|
32679
33010
|
src: url,
|
|
32680
|
-
alt: caption || "
|
|
33011
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32681
33012
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32682
33013
|
};
|
|
32683
33014
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -32691,7 +33022,8 @@ function BlockRow({
|
|
|
32691
33022
|
),
|
|
32692
33023
|
children: [
|
|
32693
33024
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32694
|
-
"
|
|
33025
|
+
" ",
|
|
33026
|
+
t("richBlockEditor.noImageUrl")
|
|
32695
33027
|
]
|
|
32696
33028
|
}
|
|
32697
33029
|
),
|
|
@@ -32702,7 +33034,7 @@ function BlockRow({
|
|
|
32702
33034
|
inputType: "url",
|
|
32703
33035
|
value: url,
|
|
32704
33036
|
placeholder: "https://example.com/image.png",
|
|
32705
|
-
"aria-label": "
|
|
33037
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32706
33038
|
className: cn(
|
|
32707
33039
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32708
33040
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32715,8 +33047,8 @@ function BlockRow({
|
|
|
32715
33047
|
{
|
|
32716
33048
|
inputType: "text",
|
|
32717
33049
|
value: caption,
|
|
32718
|
-
placeholder: "
|
|
32719
|
-
"aria-label": "
|
|
33050
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33051
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32720
33052
|
className: cn(
|
|
32721
33053
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32722
33054
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32747,8 +33079,8 @@ function BlockRow({
|
|
|
32747
33079
|
tag: "span",
|
|
32748
33080
|
value: child.content ?? "",
|
|
32749
33081
|
readOnly,
|
|
32750
|
-
placeholder: "
|
|
32751
|
-
ariaLabel: "
|
|
33082
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33083
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
32752
33084
|
className: "inline-block min-w-[1ch] flex-1",
|
|
32753
33085
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
32754
33086
|
}
|
|
@@ -32758,7 +33090,7 @@ function BlockRow({
|
|
|
32758
33090
|
{
|
|
32759
33091
|
type: "button",
|
|
32760
33092
|
variant: "ghost",
|
|
32761
|
-
"aria-label": "
|
|
33093
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
32762
33094
|
className: cn(
|
|
32763
33095
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
32764
33096
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -32780,7 +33112,8 @@ function BlockRow({
|
|
|
32780
33112
|
onClick: addListItem,
|
|
32781
33113
|
children: [
|
|
32782
33114
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
32783
|
-
"
|
|
33115
|
+
" ",
|
|
33116
|
+
t("richBlockEditor.addItem")
|
|
32784
33117
|
]
|
|
32785
33118
|
}
|
|
32786
33119
|
) })
|
|
@@ -32796,8 +33129,8 @@ function BlockRow({
|
|
|
32796
33129
|
tag: "p",
|
|
32797
33130
|
value: block.content ?? "",
|
|
32798
33131
|
readOnly,
|
|
32799
|
-
placeholder: placeholder ?? "
|
|
32800
|
-
ariaLabel: "
|
|
33132
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33133
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
32801
33134
|
className: "leading-7",
|
|
32802
33135
|
onValueChange: setContent
|
|
32803
33136
|
}
|
|
@@ -32820,7 +33153,7 @@ function BlockRow({
|
|
|
32820
33153
|
{
|
|
32821
33154
|
type: "button",
|
|
32822
33155
|
variant: "ghost",
|
|
32823
|
-
"aria-label": "
|
|
33156
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
32824
33157
|
className: cn(
|
|
32825
33158
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
32826
33159
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -32847,7 +33180,7 @@ function BlockRow({
|
|
|
32847
33180
|
}
|
|
32848
33181
|
);
|
|
32849
33182
|
}
|
|
32850
|
-
var TOOLBAR_ENTRIES,
|
|
33183
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
32851
33184
|
var init_RichBlockEditor = __esm({
|
|
32852
33185
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
32853
33186
|
"use client";
|
|
@@ -32860,29 +33193,30 @@ var init_RichBlockEditor = __esm({
|
|
|
32860
33193
|
init_Input();
|
|
32861
33194
|
init_Icon();
|
|
32862
33195
|
init_useEventBus();
|
|
33196
|
+
init_useTranslate();
|
|
32863
33197
|
TOOLBAR_ENTRIES = [
|
|
32864
|
-
{ type: "paragraph",
|
|
32865
|
-
{ type: "heading-1",
|
|
32866
|
-
{ type: "heading-2",
|
|
32867
|
-
{ type: "heading-3",
|
|
32868
|
-
{ type: "bullet-list",
|
|
32869
|
-
{ type: "numbered-list",
|
|
32870
|
-
{ type: "quote",
|
|
32871
|
-
{ type: "code",
|
|
32872
|
-
{ type: "divider",
|
|
32873
|
-
{ type: "image",
|
|
33198
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33199
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
33200
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
33201
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
33202
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
33203
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
33204
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
33205
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
33206
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
33207
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
32874
33208
|
];
|
|
32875
|
-
|
|
32876
|
-
paragraph: "
|
|
32877
|
-
"heading-1": "
|
|
32878
|
-
"heading-2": "
|
|
32879
|
-
"heading-3": "
|
|
32880
|
-
"bullet-list": "
|
|
32881
|
-
"numbered-list": "
|
|
32882
|
-
quote: "
|
|
32883
|
-
code: "
|
|
32884
|
-
divider: "
|
|
32885
|
-
image: "
|
|
33209
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33210
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33211
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33212
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33213
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33214
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33215
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33216
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33217
|
+
code: "richBlockEditor.blockType.code",
|
|
33218
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33219
|
+
image: "richBlockEditor.blockType.image"
|
|
32886
33220
|
};
|
|
32887
33221
|
CHANGEABLE_TYPES = [
|
|
32888
33222
|
"paragraph",
|
|
@@ -32916,6 +33250,7 @@ var init_RichBlockEditor = __esm({
|
|
|
32916
33250
|
showToolbar = true,
|
|
32917
33251
|
className
|
|
32918
33252
|
}) => {
|
|
33253
|
+
const { t } = useTranslate();
|
|
32919
33254
|
const [blocks, setBlocks] = useState(
|
|
32920
33255
|
() => normalizeBlocks(initialBlocks)
|
|
32921
33256
|
);
|
|
@@ -32987,25 +33322,26 @@ var init_RichBlockEditor = __esm({
|
|
|
32987
33322
|
Box,
|
|
32988
33323
|
{
|
|
32989
33324
|
role: "toolbar",
|
|
32990
|
-
"aria-label": "
|
|
33325
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
32991
33326
|
className: cn(
|
|
32992
33327
|
"flex flex-wrap items-center gap-1",
|
|
32993
33328
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
32994
33329
|
),
|
|
32995
33330
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
32996
33331
|
const Icon3 = entry.icon;
|
|
33332
|
+
const entryLabel = t(entry.labelKey);
|
|
32997
33333
|
return /* @__PURE__ */ jsxs(
|
|
32998
33334
|
Button,
|
|
32999
33335
|
{
|
|
33000
33336
|
type: "button",
|
|
33001
33337
|
variant: "ghost",
|
|
33002
33338
|
size: "sm",
|
|
33003
|
-
"aria-label":
|
|
33004
|
-
title:
|
|
33339
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33340
|
+
title: entryLabel,
|
|
33005
33341
|
onClick: () => handleAppend(entry.type),
|
|
33006
33342
|
children: [
|
|
33007
33343
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33008
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33344
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33009
33345
|
]
|
|
33010
33346
|
},
|
|
33011
33347
|
entry.type
|
|
@@ -33048,6 +33384,7 @@ var init_ReplyTree = __esm({
|
|
|
33048
33384
|
"use client";
|
|
33049
33385
|
init_cn();
|
|
33050
33386
|
init_useEventBus();
|
|
33387
|
+
init_useTranslate();
|
|
33051
33388
|
init_atoms2();
|
|
33052
33389
|
init_VoteStack();
|
|
33053
33390
|
ReplyTreeNode = ({
|
|
@@ -33067,6 +33404,7 @@ var init_ReplyTree = __esm({
|
|
|
33067
33404
|
showActions
|
|
33068
33405
|
}) => {
|
|
33069
33406
|
const eventBus = useEventBus();
|
|
33407
|
+
const { t } = useTranslate();
|
|
33070
33408
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33071
33409
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33072
33410
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33113,7 +33451,7 @@ var init_ReplyTree = __esm({
|
|
|
33113
33451
|
variant: "ghost",
|
|
33114
33452
|
size: "sm",
|
|
33115
33453
|
onClick: handleToggle,
|
|
33116
|
-
"aria-label": isCollapsed ? "
|
|
33454
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33117
33455
|
"aria-expanded": !isCollapsed,
|
|
33118
33456
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33119
33457
|
className: cn(
|
|
@@ -33154,7 +33492,7 @@ var init_ReplyTree = __esm({
|
|
|
33154
33492
|
onVote: handleVote,
|
|
33155
33493
|
size: "sm",
|
|
33156
33494
|
variant: "horizontal",
|
|
33157
|
-
label:
|
|
33495
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33158
33496
|
}
|
|
33159
33497
|
),
|
|
33160
33498
|
/* @__PURE__ */ jsx(
|
|
@@ -33164,8 +33502,8 @@ var init_ReplyTree = __esm({
|
|
|
33164
33502
|
size: "sm",
|
|
33165
33503
|
leftIcon: "message-square",
|
|
33166
33504
|
onClick: handleReply,
|
|
33167
|
-
"aria-label":
|
|
33168
|
-
children: "
|
|
33505
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33506
|
+
children: t("replyTree.reply")
|
|
33169
33507
|
}
|
|
33170
33508
|
),
|
|
33171
33509
|
/* @__PURE__ */ jsx(
|
|
@@ -33175,8 +33513,8 @@ var init_ReplyTree = __esm({
|
|
|
33175
33513
|
size: "sm",
|
|
33176
33514
|
leftIcon: "flag",
|
|
33177
33515
|
onClick: handleFlag,
|
|
33178
|
-
"aria-label":
|
|
33179
|
-
children: "
|
|
33516
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33517
|
+
children: t("replyTree.flag")
|
|
33180
33518
|
}
|
|
33181
33519
|
)
|
|
33182
33520
|
] }),
|
|
@@ -33187,9 +33525,9 @@ var init_ReplyTree = __esm({
|
|
|
33187
33525
|
inputType: "textarea",
|
|
33188
33526
|
rows: 2,
|
|
33189
33527
|
value: draft,
|
|
33190
|
-
placeholder:
|
|
33528
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33191
33529
|
onChange: (e) => setDraft(e.target.value),
|
|
33192
|
-
"aria-label":
|
|
33530
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33193
33531
|
}
|
|
33194
33532
|
),
|
|
33195
33533
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33201,10 +33539,10 @@ var init_ReplyTree = __esm({
|
|
|
33201
33539
|
leftIcon: "send",
|
|
33202
33540
|
onClick: handleSubmitReply,
|
|
33203
33541
|
disabled: !draft.trim(),
|
|
33204
|
-
children: "
|
|
33542
|
+
children: t("replyTree.send")
|
|
33205
33543
|
}
|
|
33206
33544
|
),
|
|
33207
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33545
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33208
33546
|
] })
|
|
33209
33547
|
] }),
|
|
33210
33548
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33218,7 +33556,7 @@ var init_ReplyTree = __esm({
|
|
|
33218
33556
|
"self-start gap-1 px-0 h-auto",
|
|
33219
33557
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33220
33558
|
),
|
|
33221
|
-
children: "
|
|
33559
|
+
children: t("replyTree.continueThread")
|
|
33222
33560
|
}
|
|
33223
33561
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33224
33562
|
ReplyTreeNode,
|
|
@@ -33257,6 +33595,7 @@ var init_ReplyTree = __esm({
|
|
|
33257
33595
|
showActions = true,
|
|
33258
33596
|
className
|
|
33259
33597
|
}) => {
|
|
33598
|
+
const { t } = useTranslate();
|
|
33260
33599
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33261
33600
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33262
33601
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33275,7 +33614,7 @@ var init_ReplyTree = __esm({
|
|
|
33275
33614
|
});
|
|
33276
33615
|
}, []);
|
|
33277
33616
|
if (nodeList.length === 0) {
|
|
33278
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33617
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33279
33618
|
}
|
|
33280
33619
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33281
33620
|
ReplyTreeNode,
|
|
@@ -33353,6 +33692,7 @@ var init_VersionDiff = __esm({
|
|
|
33353
33692
|
"use client";
|
|
33354
33693
|
init_cn();
|
|
33355
33694
|
init_useEventBus();
|
|
33695
|
+
init_useTranslate();
|
|
33356
33696
|
init_atoms2();
|
|
33357
33697
|
init_Stack();
|
|
33358
33698
|
INLINE_STYLES = {
|
|
@@ -33375,6 +33715,7 @@ var init_VersionDiff = __esm({
|
|
|
33375
33715
|
language,
|
|
33376
33716
|
className
|
|
33377
33717
|
}) => {
|
|
33718
|
+
const { t } = useTranslate();
|
|
33378
33719
|
const eventBus = useEventBus();
|
|
33379
33720
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33380
33721
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33456,24 +33797,24 @@ var init_VersionDiff = __esm({
|
|
|
33456
33797
|
children: [
|
|
33457
33798
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33458
33799
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33459
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
33800
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33460
33801
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33461
33802
|
Select,
|
|
33462
33803
|
{
|
|
33463
33804
|
options,
|
|
33464
33805
|
value: activeBeforeId,
|
|
33465
33806
|
onChange: handleBeforeChange,
|
|
33466
|
-
"aria-label": "
|
|
33807
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33467
33808
|
}
|
|
33468
33809
|
) }),
|
|
33469
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
33810
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33470
33811
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33471
33812
|
Select,
|
|
33472
33813
|
{
|
|
33473
33814
|
options,
|
|
33474
33815
|
value: activeAfterId,
|
|
33475
33816
|
onChange: handleAfterChange,
|
|
33476
|
-
"aria-label": "
|
|
33817
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33477
33818
|
}
|
|
33478
33819
|
) }),
|
|
33479
33820
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -33494,7 +33835,7 @@ var init_VersionDiff = __esm({
|
|
|
33494
33835
|
size: "sm",
|
|
33495
33836
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33496
33837
|
onClick: handleViewToggle,
|
|
33497
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
33838
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33498
33839
|
}
|
|
33499
33840
|
),
|
|
33500
33841
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -33504,7 +33845,7 @@ var init_VersionDiff = __esm({
|
|
|
33504
33845
|
size: "sm",
|
|
33505
33846
|
icon: "rotate-ccw",
|
|
33506
33847
|
onClick: handleRevert,
|
|
33507
|
-
children: "
|
|
33848
|
+
children: t("versionDiff.revert")
|
|
33508
33849
|
}
|
|
33509
33850
|
)
|
|
33510
33851
|
] })
|
|
@@ -33521,12 +33862,12 @@ var init_VersionDiff = __esm({
|
|
|
33521
33862
|
children: [
|
|
33522
33863
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33523
33864
|
beforeRev?.label,
|
|
33524
|
-
beforeRev?.author ?
|
|
33865
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33525
33866
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33526
33867
|
] }),
|
|
33527
33868
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33528
33869
|
afterRev?.label,
|
|
33529
|
-
afterRev?.author ?
|
|
33870
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33530
33871
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33531
33872
|
] })
|
|
33532
33873
|
]
|
|
@@ -33919,10 +34260,12 @@ var init_DocPagination = __esm({
|
|
|
33919
34260
|
}
|
|
33920
34261
|
});
|
|
33921
34262
|
function DocSearch({
|
|
33922
|
-
placeholder
|
|
34263
|
+
placeholder,
|
|
33923
34264
|
onSearch,
|
|
33924
34265
|
className
|
|
33925
34266
|
}) {
|
|
34267
|
+
const { t } = useTranslate();
|
|
34268
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
33926
34269
|
const [query, setQuery] = useState("");
|
|
33927
34270
|
const [results, setResults] = useState([]);
|
|
33928
34271
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34029,7 +34372,7 @@ function DocSearch({
|
|
|
34029
34372
|
Input,
|
|
34030
34373
|
{
|
|
34031
34374
|
inputType: "search",
|
|
34032
|
-
placeholder,
|
|
34375
|
+
placeholder: resolvedPlaceholder,
|
|
34033
34376
|
value: query,
|
|
34034
34377
|
onChange: handleChange,
|
|
34035
34378
|
onFocus: handleFocus,
|
|
@@ -34094,6 +34437,7 @@ var init_DocSearch = __esm({
|
|
|
34094
34437
|
init_Typography();
|
|
34095
34438
|
init_Icon();
|
|
34096
34439
|
init_Input();
|
|
34440
|
+
init_useTranslate();
|
|
34097
34441
|
}
|
|
34098
34442
|
});
|
|
34099
34443
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36226,8 +36570,8 @@ var init_SignaturePad = __esm({
|
|
|
36226
36570
|
init_useEventBus();
|
|
36227
36571
|
init_useTranslate();
|
|
36228
36572
|
SignaturePad = ({
|
|
36229
|
-
label
|
|
36230
|
-
helperText
|
|
36573
|
+
label,
|
|
36574
|
+
helperText,
|
|
36231
36575
|
strokeColor,
|
|
36232
36576
|
strokeWidth = 2,
|
|
36233
36577
|
height = 200,
|
|
@@ -36243,6 +36587,8 @@ var init_SignaturePad = __esm({
|
|
|
36243
36587
|
}) => {
|
|
36244
36588
|
const eventBus = useEventBus();
|
|
36245
36589
|
const { t } = useTranslate();
|
|
36590
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36591
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36246
36592
|
const canvasRef = useRef(null);
|
|
36247
36593
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36248
36594
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36345,7 +36691,7 @@ var init_SignaturePad = __esm({
|
|
|
36345
36691
|
);
|
|
36346
36692
|
}
|
|
36347
36693
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36348
|
-
|
|
36694
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36349
36695
|
/* @__PURE__ */ jsx(
|
|
36350
36696
|
Box,
|
|
36351
36697
|
{
|
|
@@ -36374,7 +36720,7 @@ var init_SignaturePad = __esm({
|
|
|
36374
36720
|
)
|
|
36375
36721
|
}
|
|
36376
36722
|
),
|
|
36377
|
-
|
|
36723
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36378
36724
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36379
36725
|
/* @__PURE__ */ jsx(
|
|
36380
36726
|
Button,
|
|
@@ -36384,7 +36730,7 @@ var init_SignaturePad = __esm({
|
|
|
36384
36730
|
icon: Eraser,
|
|
36385
36731
|
onClick: clearSignature,
|
|
36386
36732
|
disabled: !hasSignature,
|
|
36387
|
-
children: "
|
|
36733
|
+
children: t("signaturePad.clear")
|
|
36388
36734
|
}
|
|
36389
36735
|
),
|
|
36390
36736
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36395,7 +36741,7 @@ var init_SignaturePad = __esm({
|
|
|
36395
36741
|
icon: Check,
|
|
36396
36742
|
onClick: confirmSignature,
|
|
36397
36743
|
disabled: !hasSignature,
|
|
36398
|
-
children: "
|
|
36744
|
+
children: t("signaturePad.confirm")
|
|
36399
36745
|
}
|
|
36400
36746
|
)
|
|
36401
36747
|
] })
|
|
@@ -41062,6 +41408,7 @@ function MasterDetail({
|
|
|
41062
41408
|
className,
|
|
41063
41409
|
...rest
|
|
41064
41410
|
}) {
|
|
41411
|
+
const { t } = useTranslate();
|
|
41065
41412
|
const loading = externalLoading ?? false;
|
|
41066
41413
|
const isLoading = externalIsLoading ?? false;
|
|
41067
41414
|
const error = externalError ?? null;
|
|
@@ -41074,8 +41421,8 @@ function MasterDetail({
|
|
|
41074
41421
|
isLoading: loading || isLoading,
|
|
41075
41422
|
error,
|
|
41076
41423
|
className,
|
|
41077
|
-
emptyTitle: "
|
|
41078
|
-
emptyDescription: "
|
|
41424
|
+
emptyTitle: t("table.empty.title"),
|
|
41425
|
+
emptyDescription: t("empty.createFirst"),
|
|
41079
41426
|
...rest
|
|
41080
41427
|
}
|
|
41081
41428
|
);
|
|
@@ -41084,6 +41431,7 @@ var init_MasterDetail = __esm({
|
|
|
41084
41431
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41085
41432
|
"use client";
|
|
41086
41433
|
init_DataTable();
|
|
41434
|
+
init_useTranslate();
|
|
41087
41435
|
MasterDetail.displayName = "MasterDetail";
|
|
41088
41436
|
}
|
|
41089
41437
|
});
|
|
@@ -41092,14 +41440,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41092
41440
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41093
41441
|
init_cn();
|
|
41094
41442
|
init_Typography();
|
|
41095
|
-
|
|
41096
|
-
|
|
41097
|
-
{
|
|
41098
|
-
|
|
41099
|
-
|
|
41100
|
-
|
|
41101
|
-
|
|
41102
|
-
|
|
41443
|
+
init_useTranslate();
|
|
41444
|
+
DefaultEmptyDetail = () => {
|
|
41445
|
+
const { t } = useTranslate();
|
|
41446
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
41447
|
+
Typography,
|
|
41448
|
+
{
|
|
41449
|
+
variant: "body2",
|
|
41450
|
+
className: "text-muted-foreground",
|
|
41451
|
+
children: t("masterDetail.selectItem")
|
|
41452
|
+
}
|
|
41453
|
+
) });
|
|
41454
|
+
};
|
|
41103
41455
|
MasterDetailLayout = ({
|
|
41104
41456
|
master,
|
|
41105
41457
|
detail,
|
|
@@ -41226,7 +41578,7 @@ var init_MediaGallery = __esm({
|
|
|
41226
41578
|
{
|
|
41227
41579
|
icon: Image$1,
|
|
41228
41580
|
title: t("display.noMedia"),
|
|
41229
|
-
description: "
|
|
41581
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41230
41582
|
className
|
|
41231
41583
|
}
|
|
41232
41584
|
);
|
|
@@ -41243,7 +41595,7 @@ var init_MediaGallery = __esm({
|
|
|
41243
41595
|
size: "sm",
|
|
41244
41596
|
icon: Upload,
|
|
41245
41597
|
action: "MEDIA_UPLOAD",
|
|
41246
|
-
children: "
|
|
41598
|
+
children: t("mediaGallery.upload")
|
|
41247
41599
|
}
|
|
41248
41600
|
),
|
|
41249
41601
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41257,10 +41609,7 @@ var init_MediaGallery = __esm({
|
|
|
41257
41609
|
))
|
|
41258
41610
|
] })
|
|
41259
41611
|
] }),
|
|
41260
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41261
|
-
selectedItems.length,
|
|
41262
|
-
" selected"
|
|
41263
|
-
] }) }),
|
|
41612
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsx(Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
41264
41613
|
/* @__PURE__ */ jsx(
|
|
41265
41614
|
Box,
|
|
41266
41615
|
{
|
|
@@ -42253,7 +42602,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42253
42602
|
EmptyState,
|
|
42254
42603
|
{
|
|
42255
42604
|
title: t("debug.noActiveTraits"),
|
|
42256
|
-
description: "
|
|
42605
|
+
description: t("debug.traitsMountHint"),
|
|
42257
42606
|
className: "py-8"
|
|
42258
42607
|
}
|
|
42259
42608
|
);
|
|
@@ -42263,14 +42612,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42263
42612
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42264
42613
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42265
42614
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42266
|
-
/* @__PURE__ */
|
|
42267
|
-
trait.transitionCount,
|
|
42268
|
-
" transitions"
|
|
42269
|
-
] })
|
|
42615
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42270
42616
|
] }),
|
|
42271
42617
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42272
42618
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42273
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42619
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42274
42620
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42275
42621
|
Badge,
|
|
42276
42622
|
{
|
|
@@ -42282,7 +42628,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42282
42628
|
)) })
|
|
42283
42629
|
] }),
|
|
42284
42630
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42285
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42631
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42286
42632
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42287
42633
|
t2.from,
|
|
42288
42634
|
" \u2192 ",
|
|
@@ -42301,7 +42647,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42301
42647
|
] }, i)) })
|
|
42302
42648
|
] }),
|
|
42303
42649
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42304
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42650
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42305
42651
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42306
42652
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42307
42653
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42407,7 +42753,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42407
42753
|
EmptyState,
|
|
42408
42754
|
{
|
|
42409
42755
|
title: t("debug.noEntityData"),
|
|
42410
|
-
description: "
|
|
42756
|
+
description: t("debug.debugModeHint"),
|
|
42411
42757
|
className: "py-8"
|
|
42412
42758
|
}
|
|
42413
42759
|
);
|
|
@@ -42420,7 +42766,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42420
42766
|
EmptyState,
|
|
42421
42767
|
{
|
|
42422
42768
|
title: t("debug.noEntities"),
|
|
42423
|
-
description: "
|
|
42769
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42424
42770
|
className: "py-8"
|
|
42425
42771
|
}
|
|
42426
42772
|
);
|
|
@@ -42428,7 +42774,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42428
42774
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42429
42775
|
id: `singleton-${name}`,
|
|
42430
42776
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42431
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42777
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42432
42778
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42433
42779
|
] }),
|
|
42434
42780
|
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
@@ -42446,31 +42792,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42446
42792
|
}));
|
|
42447
42793
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42448
42794
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42449
|
-
/* @__PURE__ */
|
|
42450
|
-
"Singletons (",
|
|
42451
|
-
singletonItems.length,
|
|
42452
|
-
")"
|
|
42453
|
-
] }),
|
|
42795
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42454
42796
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42455
42797
|
] }),
|
|
42456
42798
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42457
|
-
/* @__PURE__ */
|
|
42458
|
-
"Runtime (",
|
|
42459
|
-
runtimeEntities.length,
|
|
42460
|
-
")"
|
|
42461
|
-
] }),
|
|
42799
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42462
42800
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42463
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42464
|
-
"+",
|
|
42465
|
-
runtimeEntities.length - 20,
|
|
42466
|
-
" more entities"
|
|
42467
|
-
] })
|
|
42801
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42468
42802
|
] }),
|
|
42469
42803
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42470
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42804
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42471
42805
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42472
42806
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42473
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42807
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42474
42808
|
] }, type)) })
|
|
42475
42809
|
] })
|
|
42476
42810
|
] });
|
|
@@ -42514,7 +42848,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42514
42848
|
EmptyState,
|
|
42515
42849
|
{
|
|
42516
42850
|
title: t("debug.noEventsYet"),
|
|
42517
|
-
description: "
|
|
42851
|
+
description: t("debug.eventsExecuteHint"),
|
|
42518
42852
|
className: "py-8"
|
|
42519
42853
|
}
|
|
42520
42854
|
);
|
|
@@ -42525,17 +42859,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42525
42859
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42526
42860
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42527
42861
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42528
|
-
/* @__PURE__ */
|
|
42862
|
+
/* @__PURE__ */ jsx(
|
|
42529
42863
|
Button,
|
|
42530
42864
|
{
|
|
42531
42865
|
size: "sm",
|
|
42532
42866
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42533
42867
|
onClick: () => setFilter("all"),
|
|
42534
|
-
children:
|
|
42535
|
-
"All (",
|
|
42536
|
-
events2.length,
|
|
42537
|
-
")"
|
|
42538
|
-
]
|
|
42868
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42539
42869
|
}
|
|
42540
42870
|
),
|
|
42541
42871
|
eventTypes.map((type) => {
|
|
@@ -42565,7 +42895,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42565
42895
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42566
42896
|
}
|
|
42567
42897
|
),
|
|
42568
|
-
"
|
|
42898
|
+
t("debug.autoScroll")
|
|
42569
42899
|
] })
|
|
42570
42900
|
] }),
|
|
42571
42901
|
/* @__PURE__ */ jsx(
|
|
@@ -42623,7 +42953,7 @@ function GuardsPanel({ guards }) {
|
|
|
42623
42953
|
EmptyState,
|
|
42624
42954
|
{
|
|
42625
42955
|
title: t("debug.noGuardEvaluations"),
|
|
42626
|
-
description: "
|
|
42956
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42627
42957
|
className: "py-8"
|
|
42628
42958
|
}
|
|
42629
42959
|
);
|
|
@@ -42654,15 +42984,15 @@ function GuardsPanel({ guards }) {
|
|
|
42654
42984
|
] }),
|
|
42655
42985
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42656
42986
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42657
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42987
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42658
42988
|
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
|
|
42659
42989
|
] }),
|
|
42660
42990
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42661
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42991
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42662
42992
|
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
42663
42993
|
] }),
|
|
42664
42994
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42665
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42995
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42666
42996
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42667
42997
|
] })
|
|
42668
42998
|
] })
|
|
@@ -42680,9 +43010,9 @@ function GuardsPanel({ guards }) {
|
|
|
42680
43010
|
] })
|
|
42681
43011
|
] }),
|
|
42682
43012
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42683
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42684
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42685
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
43013
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
43014
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
43015
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42686
43016
|
] })
|
|
42687
43017
|
] }),
|
|
42688
43018
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -42808,7 +43138,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42808
43138
|
EmptyState,
|
|
42809
43139
|
{
|
|
42810
43140
|
title: t("debug.noTransitionsRecorded"),
|
|
42811
|
-
description: "
|
|
43141
|
+
description: t("debug.transitionsProcessHint"),
|
|
42812
43142
|
className: "py-8"
|
|
42813
43143
|
}
|
|
42814
43144
|
);
|
|
@@ -42825,10 +43155,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42825
43155
|
const sorted = [...transitions].reverse();
|
|
42826
43156
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42827
43157
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42828
|
-
/* @__PURE__ */
|
|
42829
|
-
transitions.length,
|
|
42830
|
-
" transitions recorded"
|
|
42831
|
-
] }),
|
|
43158
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42832
43159
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42833
43160
|
/* @__PURE__ */ jsx(
|
|
42834
43161
|
Checkbox,
|
|
@@ -42837,7 +43164,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42837
43164
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42838
43165
|
}
|
|
42839
43166
|
),
|
|
42840
|
-
"
|
|
43167
|
+
t("debug.autoScroll")
|
|
42841
43168
|
] })
|
|
42842
43169
|
] }),
|
|
42843
43170
|
/* @__PURE__ */ jsx(
|
|
@@ -42880,15 +43207,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42880
43207
|
variant: trace.guardResult ? "success" : "danger",
|
|
42881
43208
|
size: "sm",
|
|
42882
43209
|
children: [
|
|
42883
|
-
"
|
|
43210
|
+
t("debug.guardLabel"),
|
|
43211
|
+
" ",
|
|
42884
43212
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42885
43213
|
]
|
|
42886
43214
|
}
|
|
42887
43215
|
),
|
|
42888
|
-
/* @__PURE__ */
|
|
42889
|
-
trace.effects.length,
|
|
42890
|
-
" effects"
|
|
42891
|
-
] })
|
|
43216
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42892
43217
|
] }),
|
|
42893
43218
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42894
43219
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -42937,13 +43262,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42937
43262
|
EmptyState,
|
|
42938
43263
|
{
|
|
42939
43264
|
title: t("debug.noBridgeData"),
|
|
42940
|
-
description: "
|
|
43265
|
+
description: t("debug.bridgeInitHint"),
|
|
42941
43266
|
className: "py-8"
|
|
42942
43267
|
}
|
|
42943
43268
|
);
|
|
42944
43269
|
}
|
|
42945
43270
|
const formatTime4 = (ts) => {
|
|
42946
|
-
if (ts === 0) return "
|
|
43271
|
+
if (ts === 0) return t("debug.never");
|
|
42947
43272
|
const d = new Date(ts);
|
|
42948
43273
|
return d.toLocaleTimeString("en-US", {
|
|
42949
43274
|
hour12: false,
|
|
@@ -42956,14 +43281,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42956
43281
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42957
43282
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42958
43283
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
42959
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43284
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42960
43285
|
] }),
|
|
42961
43286
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
42962
43287
|
/* @__PURE__ */ jsx(
|
|
42963
43288
|
StatRow,
|
|
42964
43289
|
{
|
|
42965
43290
|
label: t("debug.status"),
|
|
42966
|
-
value: bridge.connected ? "
|
|
43291
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
42967
43292
|
variant: bridge.connected ? "success" : "danger"
|
|
42968
43293
|
}
|
|
42969
43294
|
),
|
|
@@ -42991,13 +43316,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42991
43316
|
] })
|
|
42992
43317
|
] }),
|
|
42993
43318
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
42994
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43319
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
42995
43320
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
42996
43321
|
] }),
|
|
42997
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
42998
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
42999
|
-
" total events processed"
|
|
43000
|
-
] }) })
|
|
43322
|
+
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
43001
43323
|
] }) });
|
|
43002
43324
|
}
|
|
43003
43325
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43107,7 +43429,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43107
43429
|
EmptyState,
|
|
43108
43430
|
{
|
|
43109
43431
|
title: t("debug.noActiveTraits"),
|
|
43110
|
-
description: "
|
|
43432
|
+
description: t("debug.traitsInitHint"),
|
|
43111
43433
|
className: "py-8"
|
|
43112
43434
|
}
|
|
43113
43435
|
);
|
|
@@ -43124,7 +43446,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43124
43446
|
};
|
|
43125
43447
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43126
43448
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43127
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43449
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
43128
43450
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43129
43451
|
trait.name,
|
|
43130
43452
|
": ",
|
|
@@ -43132,8 +43454,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43132
43454
|
] }, trait.id)) })
|
|
43133
43455
|
] }),
|
|
43134
43456
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43135
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43136
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43457
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43458
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43137
43459
|
/* @__PURE__ */ jsx(
|
|
43138
43460
|
Button,
|
|
43139
43461
|
{
|
|
@@ -43145,15 +43467,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43145
43467
|
}
|
|
43146
43468
|
),
|
|
43147
43469
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43148
|
-
transitions.some((
|
|
43470
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43149
43471
|
] }, event)) })
|
|
43150
43472
|
] }),
|
|
43151
43473
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43152
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43474
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43153
43475
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
43154
43476
|
] }),
|
|
43155
43477
|
log18.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
43156
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43478
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43157
43479
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log18.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43158
43480
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43159
43481
|
" ",
|
|
@@ -43184,21 +43506,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43184
43506
|
}
|
|
43185
43507
|
});
|
|
43186
43508
|
function ServerResponseRow({ sr }) {
|
|
43509
|
+
const { t } = useTranslate();
|
|
43187
43510
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43188
43511
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43189
43512
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43190
43513
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43191
43514
|
sr.success ? "\u2713" : "\u2717",
|
|
43192
|
-
"
|
|
43515
|
+
" ",
|
|
43516
|
+
t("debug.server")
|
|
43193
43517
|
] }),
|
|
43194
43518
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43195
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
43196
|
-
sr.clientEffects,
|
|
43197
|
-
" clientEffect",
|
|
43198
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43199
|
-
] }),
|
|
43519
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
43200
43520
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43201
|
-
"
|
|
43521
|
+
t("debug.emitLabel"),
|
|
43522
|
+
" ",
|
|
43202
43523
|
sr.emittedEvents.join(", ")
|
|
43203
43524
|
] }),
|
|
43204
43525
|
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -43206,13 +43527,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43206
43527
|
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
43207
43528
|
name,
|
|
43208
43529
|
": ",
|
|
43209
|
-
count
|
|
43210
|
-
" row",
|
|
43211
|
-
count !== 1 ? "s" : ""
|
|
43530
|
+
t("debug.rowsCount", { count })
|
|
43212
43531
|
] }, name)) })
|
|
43213
43532
|
] });
|
|
43214
43533
|
}
|
|
43215
43534
|
function TransitionRow({ trace }) {
|
|
43535
|
+
const { t } = useTranslate();
|
|
43216
43536
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43217
43537
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43218
43538
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43220,7 +43540,7 @@ function TransitionRow({ trace }) {
|
|
|
43220
43540
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43221
43541
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43222
43542
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43223
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43543
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43224
43544
|
] }),
|
|
43225
43545
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43226
43546
|
] });
|
|
@@ -43261,6 +43581,7 @@ function VerifyModePanel({
|
|
|
43261
43581
|
serverCount,
|
|
43262
43582
|
localCount
|
|
43263
43583
|
}) {
|
|
43584
|
+
const { t } = useTranslate();
|
|
43264
43585
|
const [expanded, setExpanded] = React79.useState(true);
|
|
43265
43586
|
const scrollRef = React79.useRef(null);
|
|
43266
43587
|
const prevCountRef = React79.useRef(0);
|
|
@@ -43291,30 +43612,20 @@ function VerifyModePanel({
|
|
|
43291
43612
|
onClick: () => setExpanded((v) => !v),
|
|
43292
43613
|
className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-border flex-shrink-0 w-full text-left hover:bg-[var(--color-card-hover,transparent)] cursor-pointer",
|
|
43293
43614
|
"aria-expanded": expanded,
|
|
43294
|
-
"aria-label": expanded ? "
|
|
43615
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43295
43616
|
"data-testid": "debugger-verify-toggle",
|
|
43296
43617
|
children: [
|
|
43297
43618
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43298
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43299
|
-
/* @__PURE__ */
|
|
43300
|
-
|
|
43301
|
-
" local"
|
|
43302
|
-
] }),
|
|
43303
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43304
|
-
serverCount,
|
|
43305
|
-
" server"
|
|
43306
|
-
] }),
|
|
43619
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43620
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43621
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43307
43622
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43308
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43309
|
-
transitions.length,
|
|
43310
|
-
" transition",
|
|
43311
|
-
transitions.length !== 1 ? "s" : ""
|
|
43312
|
-
] })
|
|
43623
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43313
43624
|
]
|
|
43314
43625
|
}
|
|
43315
43626
|
),
|
|
43316
43627
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43317
|
-
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
43628
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
43318
43629
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43319
43630
|
] })
|
|
43320
43631
|
]
|
|
@@ -43330,6 +43641,7 @@ function RuntimeDebugger({
|
|
|
43330
43641
|
defaultTab,
|
|
43331
43642
|
schema
|
|
43332
43643
|
}) {
|
|
43644
|
+
const { t } = useTranslate();
|
|
43333
43645
|
const [isCollapsed, setIsCollapsed] = React79.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43334
43646
|
const [isVisible, setIsVisible] = React79.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43335
43647
|
const debugData = useDebugData();
|
|
@@ -43368,55 +43680,55 @@ function RuntimeDebugger({
|
|
|
43368
43680
|
const tabItems = [
|
|
43369
43681
|
{
|
|
43370
43682
|
id: "dispatch",
|
|
43371
|
-
label: "
|
|
43683
|
+
label: t("debug.tabDispatch"),
|
|
43372
43684
|
badge: debugData.traits.length || void 0,
|
|
43373
43685
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43374
43686
|
},
|
|
43375
43687
|
{
|
|
43376
43688
|
id: "verify",
|
|
43377
|
-
label: failedChecks > 0 ? "
|
|
43689
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43378
43690
|
badge: verification.summary.totalChecks || void 0,
|
|
43379
43691
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43380
43692
|
},
|
|
43381
43693
|
{
|
|
43382
43694
|
id: "timeline",
|
|
43383
|
-
label: "
|
|
43695
|
+
label: t("debug.tabTimeline"),
|
|
43384
43696
|
badge: verification.transitions.length || void 0,
|
|
43385
43697
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43386
43698
|
},
|
|
43387
43699
|
{
|
|
43388
43700
|
id: "bridge",
|
|
43389
|
-
label: "
|
|
43701
|
+
label: t("debug.tabBridge"),
|
|
43390
43702
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43391
43703
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43392
43704
|
},
|
|
43393
43705
|
{
|
|
43394
43706
|
id: "traits",
|
|
43395
|
-
label: "
|
|
43707
|
+
label: t("debug.tabTraits"),
|
|
43396
43708
|
badge: debugData.traits.length || void 0,
|
|
43397
43709
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43398
43710
|
},
|
|
43399
43711
|
{
|
|
43400
43712
|
id: "ticks",
|
|
43401
|
-
label: "
|
|
43402
|
-
badge: debugData.ticks.filter((
|
|
43713
|
+
label: t("debug.tabTicks"),
|
|
43714
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43403
43715
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43404
43716
|
},
|
|
43405
43717
|
{
|
|
43406
43718
|
id: "entities",
|
|
43407
|
-
label: "
|
|
43719
|
+
label: t("debug.tabEntities"),
|
|
43408
43720
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43409
43721
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43410
43722
|
},
|
|
43411
43723
|
{
|
|
43412
43724
|
id: "events",
|
|
43413
|
-
label: "
|
|
43725
|
+
label: t("debug.tabEvents"),
|
|
43414
43726
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43415
43727
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43416
43728
|
},
|
|
43417
43729
|
{
|
|
43418
43730
|
id: "guards",
|
|
43419
|
-
label: "
|
|
43731
|
+
label: t("debug.tabGuards"),
|
|
43420
43732
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43421
43733
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43422
43734
|
}
|
|
@@ -43444,15 +43756,10 @@ function RuntimeDebugger({
|
|
|
43444
43756
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43445
43757
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43446
43758
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43447
|
-
"
|
|
43759
|
+
" ",
|
|
43760
|
+
t("debug.debugger")
|
|
43448
43761
|
] }),
|
|
43449
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43450
|
-
failedChecks,
|
|
43451
|
-
" failed"
|
|
43452
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43453
|
-
debugData.traits.length,
|
|
43454
|
-
" traits"
|
|
43455
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43762
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
43456
43763
|
] })
|
|
43457
43764
|
}
|
|
43458
43765
|
),
|
|
@@ -43470,9 +43777,9 @@ function RuntimeDebugger({
|
|
|
43470
43777
|
);
|
|
43471
43778
|
}
|
|
43472
43779
|
if (mode === "verify") {
|
|
43473
|
-
const traitStates = debugData.traits.map((
|
|
43474
|
-
const serverEntries = verification.transitions.filter((
|
|
43475
|
-
const localEntries = verification.transitions.filter((
|
|
43780
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43781
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43782
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43476
43783
|
return /* @__PURE__ */ jsx(
|
|
43477
43784
|
VerifyModePanel,
|
|
43478
43785
|
{
|
|
@@ -43504,7 +43811,7 @@ function RuntimeDebugger({
|
|
|
43504
43811
|
variant: "secondary",
|
|
43505
43812
|
size: "sm",
|
|
43506
43813
|
className: "runtime-debugger__toggle",
|
|
43507
|
-
title: "
|
|
43814
|
+
title: t("debug.openDebugger"),
|
|
43508
43815
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43509
43816
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43510
43817
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43514,11 +43821,8 @@ function RuntimeDebugger({
|
|
|
43514
43821
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43515
43822
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43516
43823
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43517
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43518
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43519
|
-
failedChecks,
|
|
43520
|
-
" failed"
|
|
43521
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43824
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43825
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
43522
43826
|
] }),
|
|
43523
43827
|
/* @__PURE__ */ jsx(
|
|
43524
43828
|
Button,
|
|
@@ -43526,7 +43830,7 @@ function RuntimeDebugger({
|
|
|
43526
43830
|
onClick: () => setIsCollapsed(true),
|
|
43527
43831
|
variant: "ghost",
|
|
43528
43832
|
size: "sm",
|
|
43529
|
-
title: "
|
|
43833
|
+
title: t("debug.close"),
|
|
43530
43834
|
children: "x"
|
|
43531
43835
|
}
|
|
43532
43836
|
)
|
|
@@ -43540,7 +43844,7 @@ function RuntimeDebugger({
|
|
|
43540
43844
|
className: "runtime-debugger__tabs"
|
|
43541
43845
|
}
|
|
43542
43846
|
) }),
|
|
43543
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43847
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43544
43848
|
] })
|
|
43545
43849
|
}
|
|
43546
43850
|
);
|
|
@@ -43566,6 +43870,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43566
43870
|
init_TransitionTimeline();
|
|
43567
43871
|
init_ServerBridgeTab();
|
|
43568
43872
|
init_EventDispatcherTab();
|
|
43873
|
+
init_useTranslate();
|
|
43569
43874
|
init_RuntimeDebugger();
|
|
43570
43875
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43571
43876
|
}
|
|
@@ -44965,7 +45270,7 @@ var init_StatCard = __esm({
|
|
|
44965
45270
|
}
|
|
44966
45271
|
);
|
|
44967
45272
|
}
|
|
44968
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45273
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
44969
45274
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
44970
45275
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
44971
45276
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45008,7 +45313,7 @@ var init_StatCard = __esm({
|
|
|
45008
45313
|
]
|
|
45009
45314
|
}
|
|
45010
45315
|
),
|
|
45011
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45316
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
45012
45317
|
] }),
|
|
45013
45318
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45014
45319
|
] }),
|