@almadar/ui 5.21.8 → 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 +960 -649
- package/dist/avl/index.js +960 -649
- 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 +665 -369
- package/dist/components/index.js +665 -369
- 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 +665 -369
- package/dist/providers/index.js +665 -369
- package/dist/runtime/index.cjs +665 -369
- package/dist/runtime/index.js +665 -369
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
|
@@ -2085,7 +2085,10 @@ var en_default;
|
|
|
2085
2085
|
var init_en = __esm({
|
|
2086
2086
|
"locales/en.json"() {
|
|
2087
2087
|
en_default = {
|
|
2088
|
-
$meta: {
|
|
2088
|
+
$meta: {
|
|
2089
|
+
locale: "en",
|
|
2090
|
+
direction: "ltr"
|
|
2091
|
+
},
|
|
2089
2092
|
"common.save": "Save",
|
|
2090
2093
|
"common.cancel": "Cancel",
|
|
2091
2094
|
"common.delete": "Delete",
|
|
@@ -2227,7 +2230,6 @@ var init_en = __esm({
|
|
|
2227
2230
|
"error.somethingWentWrong": "Something went wrong",
|
|
2228
2231
|
"error.loadingItems": "Loading items...",
|
|
2229
2232
|
"error.noItemsFound": "No items found",
|
|
2230
|
-
"error.notFound": "Not found",
|
|
2231
2233
|
"debug.noEntityData": "No entity data",
|
|
2232
2234
|
"debug.noEntities": "No entities",
|
|
2233
2235
|
"debug.noTicks": "No ticks registered",
|
|
@@ -2259,7 +2261,298 @@ var init_en = __esm({
|
|
|
2259
2261
|
"template.showcase": "Showcase",
|
|
2260
2262
|
"template.faq": "Frequently Asked Questions",
|
|
2261
2263
|
"template.ourTeam": "Our Team",
|
|
2262
|
-
"template.caseStudies": "Case Studies"
|
|
2264
|
+
"template.caseStudies": "Case Studies",
|
|
2265
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
2266
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
2267
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
2268
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
2269
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
2270
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
2271
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
2272
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
2273
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
2274
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
2275
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
2276
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
2277
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
2278
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
2279
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
2280
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
2281
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
2282
|
+
"richBlockEditor.blockType.code": "Code",
|
|
2283
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
2284
|
+
"richBlockEditor.blockType.image": "Image",
|
|
2285
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
2286
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
2287
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
2288
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
2289
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
2290
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
2291
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
2292
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
2293
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
2294
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
2295
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
2296
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
2297
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
2298
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
2299
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
2300
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
2301
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
2302
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
2303
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
2304
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
2305
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
2306
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
2307
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
2308
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
2309
|
+
"richBlockEditor.addItem": "Add item",
|
|
2310
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
2311
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
2312
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
2313
|
+
"versionDiff.compare": "Compare",
|
|
2314
|
+
"versionDiff.to": "to",
|
|
2315
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
2316
|
+
"versionDiff.afterRevision": "After revision",
|
|
2317
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
2318
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
2319
|
+
"versionDiff.revert": "Revert",
|
|
2320
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
2321
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
2322
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
2323
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
2324
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
2325
|
+
"violationAlert.adminLabel": "Admin:",
|
|
2326
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
2327
|
+
"violationAlert.goToField": "Go to field",
|
|
2328
|
+
"branchingLogic.title": "Branching logic",
|
|
2329
|
+
"branchingLogic.if": "If",
|
|
2330
|
+
"branchingLogic.goTo": "go to",
|
|
2331
|
+
"branchingLogic.rules": "Rules",
|
|
2332
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
2333
|
+
"branchingLogic.addRule": "Add rule",
|
|
2334
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
2335
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
2336
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
2337
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
2338
|
+
"branchingLogic.selectTarget": "Select target",
|
|
2339
|
+
"branchingLogic.selectValue": "Select value",
|
|
2340
|
+
"branchingLogic.addValue": "Add value",
|
|
2341
|
+
"branchingLogic.value": "Value",
|
|
2342
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
2343
|
+
"branchingLogic.operatorEquals": "equals",
|
|
2344
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
2345
|
+
"branchingLogic.operatorContains": "contains",
|
|
2346
|
+
"branchingLogic.operatorIn": "is one of",
|
|
2347
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
2348
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
2349
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
2350
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
2351
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
2352
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
2353
|
+
"filterGroup.filters": "Filters",
|
|
2354
|
+
"filterGroup.all": "All",
|
|
2355
|
+
"filterGroup.clear": "Clear",
|
|
2356
|
+
"filterGroup.clearAll": "Clear all",
|
|
2357
|
+
"filterGroup.from": "From",
|
|
2358
|
+
"filterGroup.to": "To",
|
|
2359
|
+
"filterGroup.allOf": "All {{label}}",
|
|
2360
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
2361
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
2362
|
+
"debug.expression": "Expression",
|
|
2363
|
+
"debug.inputs": "Inputs",
|
|
2364
|
+
"debug.trait": "Trait",
|
|
2365
|
+
"debug.filterAll": "All",
|
|
2366
|
+
"debug.filterPassed": "Passed",
|
|
2367
|
+
"debug.filterFailed": "Failed",
|
|
2368
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
2369
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
2370
|
+
"debug.activeStates": "Active States",
|
|
2371
|
+
"debug.availableEvents": "Available Events",
|
|
2372
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
2373
|
+
"debug.guarded": "guarded",
|
|
2374
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
2375
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
2376
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
2377
|
+
"debug.states": "States",
|
|
2378
|
+
"debug.transitions": "Transitions",
|
|
2379
|
+
"debug.guards": "Guards",
|
|
2380
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
2381
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
2382
|
+
"debug.singleton": "Singleton",
|
|
2383
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
2384
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
2385
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
2386
|
+
"debug.persistent": "Persistent",
|
|
2387
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
2388
|
+
"debug.notLoaded": "not loaded",
|
|
2389
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
2390
|
+
"debug.allCount": "All ({{count}})",
|
|
2391
|
+
"debug.autoScroll": "Auto-scroll",
|
|
2392
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
2393
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
2394
|
+
"debug.guardLabel": "guard:",
|
|
2395
|
+
"debug.effectsCount": "{{count}} effects",
|
|
2396
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
2397
|
+
"debug.never": "Never",
|
|
2398
|
+
"debug.connected": "Connected",
|
|
2399
|
+
"debug.disconnected": "Disconnected",
|
|
2400
|
+
"debug.lastError": "Last Error",
|
|
2401
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
2402
|
+
"debug.server": "server",
|
|
2403
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
2404
|
+
"debug.emitLabel": "emit:",
|
|
2405
|
+
"debug.rowsCount": "{{count}} rows",
|
|
2406
|
+
"debug.serverResponse": "server response",
|
|
2407
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
2408
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
2409
|
+
"debug.failCount": "{{count}} fail",
|
|
2410
|
+
"debug.ok": "OK",
|
|
2411
|
+
"debug.localCount": "{{count}} local",
|
|
2412
|
+
"debug.serverCount": "{{count}} server",
|
|
2413
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
2414
|
+
"debug.tabDispatch": "Dispatch",
|
|
2415
|
+
"debug.tabVerify": "Verify",
|
|
2416
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
2417
|
+
"debug.tabTimeline": "Timeline",
|
|
2418
|
+
"debug.tabBridge": "Bridge",
|
|
2419
|
+
"debug.tabTraits": "Traits",
|
|
2420
|
+
"debug.tabTicks": "Ticks",
|
|
2421
|
+
"debug.tabEntities": "Entities",
|
|
2422
|
+
"debug.tabEvents": "Events",
|
|
2423
|
+
"debug.tabGuards": "Guards",
|
|
2424
|
+
"debug.debugger": "Debugger",
|
|
2425
|
+
"debug.failedCount": "{{count}} failed",
|
|
2426
|
+
"debug.traitsCount": "{{count}} traits",
|
|
2427
|
+
"debug.idle": "Idle",
|
|
2428
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
2429
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
2430
|
+
"debug.allPassing": "All passing",
|
|
2431
|
+
"debug.runtime": "Runtime",
|
|
2432
|
+
"debug.close": "Close (`)",
|
|
2433
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
2434
|
+
"replyTree.expandReplies": "Expand replies",
|
|
2435
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
2436
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
2437
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
2438
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
2439
|
+
"replyTree.reply": "Reply",
|
|
2440
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
2441
|
+
"replyTree.flag": "Flag",
|
|
2442
|
+
"replyTree.send": "Send",
|
|
2443
|
+
"replyTree.continueThread": "Continue thread",
|
|
2444
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
2445
|
+
"signaturePad.label": "Signature",
|
|
2446
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
2447
|
+
"signaturePad.clear": "Clear",
|
|
2448
|
+
"signaturePad.confirm": "Confirm",
|
|
2449
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
2450
|
+
"qrScanner.paused": "Paused",
|
|
2451
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
2452
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
2453
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
2454
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
2455
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
2456
|
+
"docSearch.placeholder": "Search documentation...",
|
|
2457
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
2458
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
2459
|
+
"avl.trigger": "Trigger",
|
|
2460
|
+
"avl.guard": "Guard",
|
|
2461
|
+
"avl.effects": "Effects",
|
|
2462
|
+
"avl.props": "Props",
|
|
2463
|
+
"avl.entity": "Entity",
|
|
2464
|
+
"avl.traits": "Traits",
|
|
2465
|
+
"avl.transition": "Transition",
|
|
2466
|
+
"avl.onEntity": "on {{entity}}",
|
|
2467
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
2468
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
2469
|
+
"avl.zoomIn": "Zoom in",
|
|
2470
|
+
"avl.zoomOut": "Zoom out",
|
|
2471
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
2472
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
2473
|
+
"avl.noTraitData": "No trait data",
|
|
2474
|
+
"avl.computingLayout": "Computing layout...",
|
|
2475
|
+
"avl.noStateMachine": "No state machine",
|
|
2476
|
+
"avl.listensFor": "listens for {{event}}",
|
|
2477
|
+
"avl.emits": "emits {{event}}",
|
|
2478
|
+
"avl.pageLayout": "Page Layout",
|
|
2479
|
+
"avl.overlaySuffix": "(overlay)",
|
|
2480
|
+
"orbPreview.previewBadge": "Preview",
|
|
2481
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
2482
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
2483
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
2484
|
+
"orbPreview.noPreview": "No preview available",
|
|
2485
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
2486
|
+
"detailView.noTransitionData": "No transition data",
|
|
2487
|
+
"orbInspector.required": "req",
|
|
2488
|
+
"orbInspector.addField": "Add Field",
|
|
2489
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
2490
|
+
"orbInspector.standalone": "Standalone",
|
|
2491
|
+
"orbInspector.embedded": "Embedded",
|
|
2492
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
2493
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
2494
|
+
"orbInspector.addEffect": "Add Effect",
|
|
2495
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
2496
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
2497
|
+
"orbInspector.tokens": "Tokens",
|
|
2498
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
2499
|
+
"orbInspector.variant": "Variant",
|
|
2500
|
+
"orbInspector.size": "Size",
|
|
2501
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
2502
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
2503
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
2504
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
2505
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
2506
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
2507
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
2508
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
2509
|
+
"orbInspector.tab.styles": "Styles",
|
|
2510
|
+
"orbInspector.tab.code": "Code",
|
|
2511
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
2512
|
+
"canvas.overview": "Overview",
|
|
2513
|
+
"canvas.expanded": "Expanded",
|
|
2514
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
2515
|
+
"canvas.screensCount": "{{count}} screens",
|
|
2516
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
2517
|
+
"lawReference.viewFullText": "View full law text",
|
|
2518
|
+
"statCard.defaultLabel": "Stat",
|
|
2519
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
2520
|
+
"mediaGallery.upload": "Upload",
|
|
2521
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
2522
|
+
"pagination.jumpPlaceholder": "Page",
|
|
2523
|
+
"table.selectRow": "Select row {{id}}",
|
|
2524
|
+
"card.selectItem": "Select {{item}}",
|
|
2525
|
+
"card.itemFallback": "item",
|
|
2526
|
+
"fileTree.noFiles": "No files",
|
|
2527
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
2528
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
2529
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
2530
|
+
"upload.dropFilesHere": "Drop files here",
|
|
2531
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
2532
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
2533
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
2534
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
2535
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
2536
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
2537
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
2538
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
2539
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
2540
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
2541
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
2542
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
2543
|
+
"optionConstraint.optional": "Optional",
|
|
2544
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
2545
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
2546
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
2547
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
2548
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
2549
|
+
"stateMachine.pinned": "Pinned",
|
|
2550
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
2551
|
+
"stateMachine.externalEffects": "External Effects",
|
|
2552
|
+
"stateMachine.legend.initial": "Initial",
|
|
2553
|
+
"stateMachine.legend.final": "Final",
|
|
2554
|
+
"stateMachine.legend.state": "State",
|
|
2555
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
2263
2556
|
};
|
|
2264
2557
|
}
|
|
2265
2558
|
});
|
|
@@ -4721,6 +5014,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4721
5014
|
init_Typography();
|
|
4722
5015
|
init_Divider();
|
|
4723
5016
|
init_cn();
|
|
5017
|
+
init_useTranslate();
|
|
4724
5018
|
positionStyles2 = {
|
|
4725
5019
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4726
5020
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -4739,6 +5033,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4739
5033
|
position = "top",
|
|
4740
5034
|
className
|
|
4741
5035
|
}) => {
|
|
5036
|
+
const { t } = useTranslate();
|
|
4742
5037
|
const [isVisible, setIsVisible] = React79__namespace.default.useState(false);
|
|
4743
5038
|
const timeoutRef = React79__namespace.default.useRef(null);
|
|
4744
5039
|
const handleMouseEnter = () => {
|
|
@@ -4822,7 +5117,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4822
5117
|
target: "_blank",
|
|
4823
5118
|
rel: "noopener noreferrer",
|
|
4824
5119
|
onClick: (e) => e.stopPropagation(),
|
|
4825
|
-
children: "
|
|
5120
|
+
children: t("lawReference.viewFullText")
|
|
4826
5121
|
}
|
|
4827
5122
|
)
|
|
4828
5123
|
] }),
|
|
@@ -12132,6 +12427,7 @@ var log4, SWIM_GUTTER, CENTER_W; exports.BehaviorView = void 0;
|
|
|
12132
12427
|
var init_BehaviorView = __esm({
|
|
12133
12428
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12134
12429
|
"use client";
|
|
12430
|
+
init_useTranslate();
|
|
12135
12431
|
init_AvlState();
|
|
12136
12432
|
init_AvlTransitionLane();
|
|
12137
12433
|
init_AvlSwimLane();
|
|
@@ -12141,6 +12437,7 @@ var init_BehaviorView = __esm({
|
|
|
12141
12437
|
SWIM_GUTTER = 120;
|
|
12142
12438
|
CENTER_W = 360;
|
|
12143
12439
|
exports.BehaviorView = ({ data }) => {
|
|
12440
|
+
const { t } = useTranslate();
|
|
12144
12441
|
const [layout, setLayout] = React79.useState(null);
|
|
12145
12442
|
const traitName = data.traits[0]?.name;
|
|
12146
12443
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -12150,10 +12447,10 @@ var init_BehaviorView = __esm({
|
|
|
12150
12447
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log4.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12151
12448
|
}, [dataKey]);
|
|
12152
12449
|
if (!traitData) {
|
|
12153
|
-
return /* @__PURE__ */ jsxRuntime.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: "
|
|
12450
|
+
return /* @__PURE__ */ jsxRuntime.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") });
|
|
12154
12451
|
}
|
|
12155
12452
|
if (!layout) {
|
|
12156
|
-
return /* @__PURE__ */ jsxRuntime.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: "
|
|
12453
|
+
return /* @__PURE__ */ jsxRuntime.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") });
|
|
12157
12454
|
}
|
|
12158
12455
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
12159
12456
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -12169,10 +12466,7 @@ var init_BehaviorView = __esm({
|
|
|
12169
12466
|
const machineHeight = scaledH + 100;
|
|
12170
12467
|
const renderMachine = /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
12171
12468
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
12172
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12173
|
-
"on ",
|
|
12174
|
-
traitData.linkedEntity
|
|
12175
|
-
] }),
|
|
12469
|
+
/* @__PURE__ */ jsxRuntime.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 }) }),
|
|
12176
12470
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
12177
12471
|
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
12178
12472
|
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -12480,7 +12774,7 @@ var init_CodeBlock = __esm({
|
|
|
12480
12774
|
const isLolo = language === "lolo";
|
|
12481
12775
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
12482
12776
|
const eventBus = useEventBus();
|
|
12483
|
-
const { t
|
|
12777
|
+
const { t } = useTranslate();
|
|
12484
12778
|
const scrollRef = React79.useRef(null);
|
|
12485
12779
|
const codeRef = React79.useRef(null);
|
|
12486
12780
|
const savedScrollLeftRef = React79.useRef(0);
|
|
@@ -12735,7 +13029,7 @@ var init_CodeBlock = __esm({
|
|
|
12735
13029
|
size: "sm",
|
|
12736
13030
|
onClick: handleCopy,
|
|
12737
13031
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
12738
|
-
"aria-label": "
|
|
13032
|
+
"aria-label": t("common.copy"),
|
|
12739
13033
|
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "copy", className: "w-4 h-4" })
|
|
12740
13034
|
}
|
|
12741
13035
|
)
|
|
@@ -13390,7 +13684,7 @@ var init_StateMachineView = __esm({
|
|
|
13390
13684
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13391
13685
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13392
13686
|
const isSingle2 = bundle.labels.length === 1;
|
|
13393
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
13687
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13394
13688
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
13395
13689
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
13396
13690
|
const cx = fromState.x;
|
|
@@ -13516,7 +13810,7 @@ var init_StateMachineView = __esm({
|
|
|
13516
13810
|
const controlX = midX + perpX;
|
|
13517
13811
|
const controlY = midY + perpY;
|
|
13518
13812
|
const isSingle = bundle.labels.length === 1;
|
|
13519
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
13813
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13520
13814
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
13521
13815
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
13522
13816
|
const curveMidpoint = {
|
|
@@ -13671,7 +13965,7 @@ var init_StateMachineView = __esm({
|
|
|
13671
13965
|
{
|
|
13672
13966
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
13673
13967
|
style: { backgroundColor: "var(--color-success)" },
|
|
13674
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
13968
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
13675
13969
|
}
|
|
13676
13970
|
),
|
|
13677
13971
|
!isSingle && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13693,10 +13987,7 @@ var init_StateMachineView = __esm({
|
|
|
13693
13987
|
{
|
|
13694
13988
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
13695
13989
|
style: { backgroundColor: "var(--color-accent)" },
|
|
13696
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
13697
|
-
bundle.labels.length,
|
|
13698
|
-
" events"
|
|
13699
|
-
] })
|
|
13990
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
13700
13991
|
}
|
|
13701
13992
|
)
|
|
13702
13993
|
]
|
|
@@ -13841,7 +14132,7 @@ var init_StateMachineView = __esm({
|
|
|
13841
14132
|
align: "center",
|
|
13842
14133
|
className: "mb-2",
|
|
13843
14134
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
13844
|
-
children: "
|
|
14135
|
+
children: t("stateMachine.externalEffects")
|
|
13845
14136
|
}
|
|
13846
14137
|
),
|
|
13847
14138
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13861,10 +14152,10 @@ var init_StateMachineView = __esm({
|
|
|
13861
14152
|
Legend = ({ config, y }) => {
|
|
13862
14153
|
const { t } = useTranslate();
|
|
13863
14154
|
const items = [
|
|
13864
|
-
{ label: "
|
|
13865
|
-
{ label: "
|
|
13866
|
-
{ label: "
|
|
13867
|
-
{ label: "
|
|
14155
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
14156
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
14157
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
14158
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
13868
14159
|
];
|
|
13869
14160
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13870
14161
|
exports.HStack,
|
|
@@ -13879,8 +14170,8 @@ var init_StateMachineView = __esm({
|
|
|
13879
14170
|
{
|
|
13880
14171
|
className: "w-3 h-3 rounded-full",
|
|
13881
14172
|
style: {
|
|
13882
|
-
backgroundColor: item.
|
|
13883
|
-
border: item.
|
|
14173
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
14174
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
13884
14175
|
}
|
|
13885
14176
|
}
|
|
13886
14177
|
),
|
|
@@ -13892,7 +14183,7 @@ var init_StateMachineView = __esm({
|
|
|
13892
14183
|
children: item.label
|
|
13893
14184
|
}
|
|
13894
14185
|
)
|
|
13895
|
-
] }, item.
|
|
14186
|
+
] }, item.key))
|
|
13896
14187
|
}
|
|
13897
14188
|
);
|
|
13898
14189
|
};
|
|
@@ -14686,13 +14977,13 @@ var init_JazariStateMachine = __esm({
|
|
|
14686
14977
|
);
|
|
14687
14978
|
}, [resolvedTrait, entityFields]);
|
|
14688
14979
|
if (isLoading) {
|
|
14689
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.LoadingState, { message: "
|
|
14980
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.LoadingState, { message: t("stateMachine.loading") });
|
|
14690
14981
|
}
|
|
14691
14982
|
if (error) {
|
|
14692
14983
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
14693
14984
|
}
|
|
14694
14985
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
14695
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", className: "opacity-60", children: "
|
|
14986
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
14696
14987
|
}
|
|
14697
14988
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14698
14989
|
exports.StateMachineView,
|
|
@@ -15736,13 +16027,13 @@ var init_LayoutPatterns = __esm({
|
|
|
15736
16027
|
function generateRuleId() {
|
|
15737
16028
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
15738
16029
|
}
|
|
15739
|
-
function questionsToOptions(questions,
|
|
16030
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
15740
16031
|
const opts = questions.map((q) => ({
|
|
15741
16032
|
value: q.id,
|
|
15742
16033
|
label: q.label
|
|
15743
16034
|
}));
|
|
15744
|
-
if (
|
|
15745
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
16035
|
+
if (endOfSurveyLabel !== null) {
|
|
16036
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
15746
16037
|
}
|
|
15747
16038
|
return opts;
|
|
15748
16039
|
}
|
|
@@ -15751,7 +16042,7 @@ function isRuleBroken(rule, questions) {
|
|
|
15751
16042
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
15752
16043
|
return !sourceExists || !targetExists;
|
|
15753
16044
|
}
|
|
15754
|
-
var END_OF_SURVEY,
|
|
16045
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph; exports.BranchingLogicBuilder = void 0;
|
|
15755
16046
|
var init_BranchingLogicBuilder = __esm({
|
|
15756
16047
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
15757
16048
|
"use client";
|
|
@@ -15764,14 +16055,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15764
16055
|
init_FilterPill();
|
|
15765
16056
|
init_Box();
|
|
15766
16057
|
init_useEventBus();
|
|
16058
|
+
init_useTranslate();
|
|
15767
16059
|
init_cn();
|
|
15768
16060
|
END_OF_SURVEY = "end-of-survey";
|
|
15769
|
-
OPERATOR_OPTIONS = [
|
|
15770
|
-
{ value: "equals", label: "equals" },
|
|
15771
|
-
{ value: "not-equals", label: "does not equal" },
|
|
15772
|
-
{ value: "contains", label: "contains" },
|
|
15773
|
-
{ value: "in", label: "is one of" }
|
|
15774
|
-
];
|
|
15775
16061
|
RuleRow = ({
|
|
15776
16062
|
rule,
|
|
15777
16063
|
questions,
|
|
@@ -15780,8 +16066,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15780
16066
|
onChange,
|
|
15781
16067
|
onDelete
|
|
15782
16068
|
}) => {
|
|
15783
|
-
const
|
|
15784
|
-
const
|
|
16069
|
+
const { t } = useTranslate();
|
|
16070
|
+
const operatorOptions = React79.useMemo(
|
|
16071
|
+
() => [
|
|
16072
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
16073
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
16074
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
16075
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
16076
|
+
],
|
|
16077
|
+
[t]
|
|
16078
|
+
);
|
|
16079
|
+
const sourceOptions = React79.useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
16080
|
+
const targetOptions = React79.useMemo(
|
|
16081
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
16082
|
+
[questions, t]
|
|
16083
|
+
);
|
|
15785
16084
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
15786
16085
|
const valueOptions = React79.useMemo(() => {
|
|
15787
16086
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -15826,22 +16125,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15826
16125
|
),
|
|
15827
16126
|
children: [
|
|
15828
16127
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
15829
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
16128
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
15830
16129
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15831
16130
|
exports.Select,
|
|
15832
16131
|
{
|
|
15833
16132
|
options: sourceOptions,
|
|
15834
16133
|
value: rule.sourceQuestionId,
|
|
15835
|
-
placeholder: "
|
|
16134
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
15836
16135
|
onChange: handleSource,
|
|
15837
16136
|
disabled: readOnly,
|
|
15838
|
-
error: broken ? "
|
|
16137
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
15839
16138
|
}
|
|
15840
16139
|
) }),
|
|
15841
16140
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15842
16141
|
exports.Select,
|
|
15843
16142
|
{
|
|
15844
|
-
options:
|
|
16143
|
+
options: operatorOptions,
|
|
15845
16144
|
value: rule.operator,
|
|
15846
16145
|
onChange: handleOperator,
|
|
15847
16146
|
disabled: readOnly
|
|
@@ -15864,7 +16163,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15864
16163
|
{
|
|
15865
16164
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
15866
16165
|
value: "",
|
|
15867
|
-
placeholder: "
|
|
16166
|
+
placeholder: t("branchingLogic.addValue"),
|
|
15868
16167
|
onChange: handleAddChip,
|
|
15869
16168
|
disabled: readOnly
|
|
15870
16169
|
}
|
|
@@ -15872,7 +16171,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15872
16171
|
exports.Input,
|
|
15873
16172
|
{
|
|
15874
16173
|
inputType: "text",
|
|
15875
|
-
placeholder: "
|
|
16174
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
15876
16175
|
value: "",
|
|
15877
16176
|
onKeyDown: (e) => {
|
|
15878
16177
|
if (e.key !== "Enter") return;
|
|
@@ -15890,7 +16189,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15890
16189
|
{
|
|
15891
16190
|
options: valueOptions,
|
|
15892
16191
|
value: scalarValue,
|
|
15893
|
-
placeholder: "
|
|
16192
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
15894
16193
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
15895
16194
|
disabled: readOnly
|
|
15896
16195
|
}
|
|
@@ -15898,7 +16197,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15898
16197
|
exports.Input,
|
|
15899
16198
|
{
|
|
15900
16199
|
inputType: "text",
|
|
15901
|
-
placeholder: "
|
|
16200
|
+
placeholder: t("branchingLogic.value"),
|
|
15902
16201
|
value: scalarValue,
|
|
15903
16202
|
onChange: handleScalarValue,
|
|
15904
16203
|
disabled: readOnly
|
|
@@ -15906,17 +16205,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15906
16205
|
) }),
|
|
15907
16206
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
15908
16207
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ArrowRight, { className: "h-4 w-4" }),
|
|
15909
|
-
"
|
|
16208
|
+
t("branchingLogic.goTo")
|
|
15910
16209
|
] }),
|
|
15911
16210
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15912
16211
|
exports.Select,
|
|
15913
16212
|
{
|
|
15914
16213
|
options: targetOptions,
|
|
15915
16214
|
value: rule.targetQuestionId,
|
|
15916
|
-
placeholder: "
|
|
16215
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
15917
16216
|
onChange: handleTarget,
|
|
15918
16217
|
disabled: readOnly,
|
|
15919
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
16218
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
15920
16219
|
}
|
|
15921
16220
|
) }),
|
|
15922
16221
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15928,11 +16227,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15928
16227
|
action: "DELETE_RULE",
|
|
15929
16228
|
actionPayload: { ruleId: rule.id },
|
|
15930
16229
|
onClick: onDelete,
|
|
15931
|
-
"aria-label": "
|
|
16230
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
15932
16231
|
}
|
|
15933
16232
|
)
|
|
15934
16233
|
] }),
|
|
15935
|
-
broken && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "error", size: "sm", label: "
|
|
16234
|
+
broken && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
15936
16235
|
]
|
|
15937
16236
|
}
|
|
15938
16237
|
);
|
|
@@ -15942,10 +16241,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15942
16241
|
NODE_GAP_Y = 80;
|
|
15943
16242
|
PADDING = 32;
|
|
15944
16243
|
LogicGraph = ({ questions, rules }) => {
|
|
16244
|
+
const { t } = useTranslate();
|
|
16245
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
15945
16246
|
const layout = React79.useMemo(() => {
|
|
15946
16247
|
const items = [
|
|
15947
16248
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
15948
|
-
{ id: END_OF_SURVEY, label:
|
|
16249
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
15949
16250
|
];
|
|
15950
16251
|
const positions = {};
|
|
15951
16252
|
items.forEach((item, i) => {
|
|
@@ -15957,14 +16258,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15957
16258
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
15958
16259
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
15959
16260
|
return { items, positions, width, height };
|
|
15960
|
-
}, [questions]);
|
|
16261
|
+
}, [questions, endOfSurveyLabel]);
|
|
15961
16262
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15962
16263
|
"svg",
|
|
15963
16264
|
{
|
|
15964
16265
|
width: layout.width,
|
|
15965
16266
|
height: layout.height,
|
|
15966
16267
|
role: "img",
|
|
15967
|
-
"aria-label": "
|
|
16268
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
15968
16269
|
style: { display: "block" },
|
|
15969
16270
|
children: [
|
|
15970
16271
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16072,6 +16373,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16072
16373
|
readOnly = false,
|
|
16073
16374
|
className
|
|
16074
16375
|
}) => {
|
|
16376
|
+
const { t } = useTranslate();
|
|
16075
16377
|
const eventBus = useEventBus();
|
|
16076
16378
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
16077
16379
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -16124,16 +16426,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16124
16426
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
16125
16427
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center gap-2", children: [
|
|
16126
16428
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
16127
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "subheading", weight: "semibold", children: "
|
|
16429
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
16128
16430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16129
16431
|
exports.Badge,
|
|
16130
16432
|
{
|
|
16131
16433
|
variant: "neutral",
|
|
16132
16434
|
size: "sm",
|
|
16133
|
-
label:
|
|
16435
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
16134
16436
|
}
|
|
16135
16437
|
),
|
|
16136
|
-
brokenCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16438
|
+
brokenCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16439
|
+
exports.Badge,
|
|
16440
|
+
{
|
|
16441
|
+
variant: "error",
|
|
16442
|
+
size: "sm",
|
|
16443
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
16444
|
+
}
|
|
16445
|
+
)
|
|
16137
16446
|
] }),
|
|
16138
16447
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
16139
16448
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16144,7 +16453,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16144
16453
|
leftIcon: LucideIcons2.Pencil,
|
|
16145
16454
|
action: "VIEW_EDIT",
|
|
16146
16455
|
onClick: () => setView("edit"),
|
|
16147
|
-
children: "
|
|
16456
|
+
children: t("branchingLogic.rules")
|
|
16148
16457
|
}
|
|
16149
16458
|
),
|
|
16150
16459
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16155,13 +16464,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16155
16464
|
leftIcon: LucideIcons2.Eye,
|
|
16156
16465
|
action: "VIEW_GRAPH",
|
|
16157
16466
|
onClick: () => setView("graph"),
|
|
16158
|
-
children: "
|
|
16467
|
+
children: t("branchingLogic.logicGraph")
|
|
16159
16468
|
}
|
|
16160
16469
|
)
|
|
16161
16470
|
] })
|
|
16162
16471
|
] }),
|
|
16163
16472
|
view === "edit" ? /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-col gap-2", children: [
|
|
16164
|
-
rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
16473
|
+
rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16165
16474
|
RuleRow,
|
|
16166
16475
|
{
|
|
16167
16476
|
rule,
|
|
@@ -16182,7 +16491,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16182
16491
|
action: "ADD_RULE",
|
|
16183
16492
|
onClick: handleAddRule,
|
|
16184
16493
|
disabled: noQuestions,
|
|
16185
|
-
children: "
|
|
16494
|
+
children: t("branchingLogic.addRule")
|
|
16186
16495
|
}
|
|
16187
16496
|
) })
|
|
16188
16497
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(LogicGraph, { questions, rules })
|
|
@@ -16809,7 +17118,7 @@ function CalendarGrid({
|
|
|
16809
17118
|
onClick: stepPrev,
|
|
16810
17119
|
"aria-disabled": !canPrev || void 0,
|
|
16811
17120
|
"aria-label": t("aria.previousDays"),
|
|
16812
|
-
children: "
|
|
17121
|
+
children: t("nav.previous")
|
|
16813
17122
|
}
|
|
16814
17123
|
),
|
|
16815
17124
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -16822,7 +17131,7 @@ function CalendarGrid({
|
|
|
16822
17131
|
onClick: stepNext,
|
|
16823
17132
|
"aria-disabled": !canNext || void 0,
|
|
16824
17133
|
"aria-label": t("aria.nextDays"),
|
|
16825
|
-
children: "
|
|
17134
|
+
children: t("nav.next")
|
|
16826
17135
|
}
|
|
16827
17136
|
)
|
|
16828
17137
|
] }),
|
|
@@ -18372,7 +18681,7 @@ var init_Pagination = __esm({
|
|
|
18372
18681
|
type: "number",
|
|
18373
18682
|
value: jumpToPage,
|
|
18374
18683
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
18375
|
-
placeholder: "
|
|
18684
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
18376
18685
|
className: "w-20",
|
|
18377
18686
|
onKeyDown: (e) => {
|
|
18378
18687
|
if (e.key === "Enter") {
|
|
@@ -18510,13 +18819,10 @@ var init_CardGrid = __esm({
|
|
|
18510
18819
|
return children;
|
|
18511
18820
|
}
|
|
18512
18821
|
if (isLoading) {
|
|
18513
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: "
|
|
18822
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
18514
18823
|
}
|
|
18515
18824
|
if (error) {
|
|
18516
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsxRuntime.
|
|
18517
|
-
"Error loading items: ",
|
|
18518
|
-
error.message
|
|
18519
|
-
] }) });
|
|
18825
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
18520
18826
|
}
|
|
18521
18827
|
if (normalizedData.length === 0) {
|
|
18522
18828
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -22613,7 +22919,7 @@ function DataGrid({
|
|
|
22613
22919
|
onChange: () => toggleSelection(id),
|
|
22614
22920
|
onClick: (e) => e.stopPropagation(),
|
|
22615
22921
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
22616
|
-
"aria-label":
|
|
22922
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
22617
22923
|
}
|
|
22618
22924
|
),
|
|
22619
22925
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -22811,7 +23117,7 @@ function formatDate3(value) {
|
|
|
22811
23117
|
if (isNaN(d.getTime())) return String(value);
|
|
22812
23118
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
22813
23119
|
}
|
|
22814
|
-
function formatValue2(value, format) {
|
|
23120
|
+
function formatValue2(value, format, boolLabels) {
|
|
22815
23121
|
if (value === void 0 || value === null) return "";
|
|
22816
23122
|
switch (format) {
|
|
22817
23123
|
case "date":
|
|
@@ -22823,7 +23129,7 @@ function formatValue2(value, format) {
|
|
|
22823
23129
|
case "percent":
|
|
22824
23130
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
22825
23131
|
case "boolean":
|
|
22826
|
-
return value ? "Yes" : "No";
|
|
23132
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
22827
23133
|
default:
|
|
22828
23134
|
return String(value);
|
|
22829
23135
|
}
|
|
@@ -23119,7 +23425,7 @@ function DataList({
|
|
|
23119
23425
|
field.label ?? fieldLabel3(field.name),
|
|
23120
23426
|
":"
|
|
23121
23427
|
] }),
|
|
23122
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
23428
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
23123
23429
|
] }, field.name);
|
|
23124
23430
|
}) }),
|
|
23125
23431
|
progressFields.map((field) => {
|
|
@@ -23249,6 +23555,7 @@ var init_FileTree = __esm({
|
|
|
23249
23555
|
init_Box();
|
|
23250
23556
|
init_Typography();
|
|
23251
23557
|
init_Icon();
|
|
23558
|
+
init_useTranslate();
|
|
23252
23559
|
TreeNodeItem = ({
|
|
23253
23560
|
node,
|
|
23254
23561
|
depth,
|
|
@@ -23334,8 +23641,9 @@ var init_FileTree = __esm({
|
|
|
23334
23641
|
className,
|
|
23335
23642
|
indent = 16
|
|
23336
23643
|
}) => {
|
|
23644
|
+
const { t } = useTranslate();
|
|
23337
23645
|
if (tree.length === 0) {
|
|
23338
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", children: "
|
|
23646
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23339
23647
|
}
|
|
23340
23648
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23341
23649
|
TreeNodeItem,
|
|
@@ -23462,6 +23770,7 @@ var init_FilterGroup = __esm({
|
|
|
23462
23770
|
init_Icon();
|
|
23463
23771
|
init_useEventBus();
|
|
23464
23772
|
init_useQuerySingleton();
|
|
23773
|
+
init_useTranslate();
|
|
23465
23774
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
23466
23775
|
lookStyles6 = {
|
|
23467
23776
|
toolbar: "",
|
|
@@ -23482,6 +23791,7 @@ var init_FilterGroup = __esm({
|
|
|
23482
23791
|
isLoading,
|
|
23483
23792
|
look = "toolbar"
|
|
23484
23793
|
}) => {
|
|
23794
|
+
const { t } = useTranslate();
|
|
23485
23795
|
const eventBus = useEventBus();
|
|
23486
23796
|
const queryState = useQuerySingleton(query);
|
|
23487
23797
|
const [selectedValues, setSelectedValues] = React79.useState(
|
|
@@ -23563,7 +23873,7 @@ var init_FilterGroup = __esm({
|
|
|
23563
23873
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
23564
23874
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
23565
23875
|
),
|
|
23566
|
-
children: "
|
|
23876
|
+
children: t("filterGroup.all")
|
|
23567
23877
|
}
|
|
23568
23878
|
),
|
|
23569
23879
|
filter.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23591,7 +23901,7 @@ var init_FilterGroup = __esm({
|
|
|
23591
23901
|
size: "sm",
|
|
23592
23902
|
onClick: handleClearAll,
|
|
23593
23903
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23594
|
-
children: "
|
|
23904
|
+
children: t("filterGroup.clear")
|
|
23595
23905
|
}
|
|
23596
23906
|
)
|
|
23597
23907
|
]
|
|
@@ -23602,7 +23912,7 @@ var init_FilterGroup = __esm({
|
|
|
23602
23912
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
23603
23913
|
showIcon && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23604
23914
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23605
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
23915
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23606
23916
|
] }),
|
|
23607
23917
|
filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
23608
23918
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -23625,7 +23935,7 @@ var init_FilterGroup = __esm({
|
|
|
23625
23935
|
`${filter.field}_from`,
|
|
23626
23936
|
e.target.value || null
|
|
23627
23937
|
),
|
|
23628
|
-
placeholder: "
|
|
23938
|
+
placeholder: t("filterGroup.from"),
|
|
23629
23939
|
clearable: true,
|
|
23630
23940
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
23631
23941
|
}
|
|
@@ -23639,7 +23949,7 @@ var init_FilterGroup = __esm({
|
|
|
23639
23949
|
`${filter.field}_to`,
|
|
23640
23950
|
e.target.value || null
|
|
23641
23951
|
),
|
|
23642
|
-
placeholder: "
|
|
23952
|
+
placeholder: t("filterGroup.to"),
|
|
23643
23953
|
clearable: true,
|
|
23644
23954
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
23645
23955
|
}
|
|
@@ -23659,7 +23969,7 @@ var init_FilterGroup = __esm({
|
|
|
23659
23969
|
value: selectedValues[filter.field] || "all",
|
|
23660
23970
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23661
23971
|
options: [
|
|
23662
|
-
{ value: "all", label: "
|
|
23972
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23663
23973
|
...filter.options?.map((opt) => ({
|
|
23664
23974
|
value: opt,
|
|
23665
23975
|
label: opt
|
|
@@ -23676,7 +23986,7 @@ var init_FilterGroup = __esm({
|
|
|
23676
23986
|
onClick: handleClearAll,
|
|
23677
23987
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23678
23988
|
className: "self-start",
|
|
23679
|
-
children: "
|
|
23989
|
+
children: t("filterGroup.clearAll")
|
|
23680
23990
|
}
|
|
23681
23991
|
)
|
|
23682
23992
|
] });
|
|
@@ -23742,7 +24052,7 @@ var init_FilterGroup = __esm({
|
|
|
23742
24052
|
value: selectedValues[filter.field] || "all",
|
|
23743
24053
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23744
24054
|
options: [
|
|
23745
|
-
{ value: "all", label:
|
|
24055
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23746
24056
|
...filter.options?.map((opt) => ({
|
|
23747
24057
|
value: opt,
|
|
23748
24058
|
label: opt
|
|
@@ -23771,7 +24081,7 @@ var init_FilterGroup = __esm({
|
|
|
23771
24081
|
field
|
|
23772
24082
|
);
|
|
23773
24083
|
}),
|
|
23774
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
24084
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
23775
24085
|
] })
|
|
23776
24086
|
]
|
|
23777
24087
|
}
|
|
@@ -23796,7 +24106,7 @@ var init_FilterGroup = __esm({
|
|
|
23796
24106
|
className: "text-muted-foreground",
|
|
23797
24107
|
children: [
|
|
23798
24108
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23799
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24109
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23800
24110
|
]
|
|
23801
24111
|
}
|
|
23802
24112
|
),
|
|
@@ -23822,7 +24132,7 @@ var init_FilterGroup = __esm({
|
|
|
23822
24132
|
`${filter.field}_from`,
|
|
23823
24133
|
e.target.value || null
|
|
23824
24134
|
),
|
|
23825
|
-
placeholder: "
|
|
24135
|
+
placeholder: t("filterGroup.from"),
|
|
23826
24136
|
clearable: true,
|
|
23827
24137
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
23828
24138
|
className: "min-w-[130px]"
|
|
@@ -23838,7 +24148,7 @@ var init_FilterGroup = __esm({
|
|
|
23838
24148
|
`${filter.field}_to`,
|
|
23839
24149
|
e.target.value || null
|
|
23840
24150
|
),
|
|
23841
|
-
placeholder: "
|
|
24151
|
+
placeholder: t("filterGroup.to"),
|
|
23842
24152
|
clearable: true,
|
|
23843
24153
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
23844
24154
|
className: "min-w-[130px]"
|
|
@@ -23860,7 +24170,7 @@ var init_FilterGroup = __esm({
|
|
|
23860
24170
|
value: selectedValues[filter.field] || "all",
|
|
23861
24171
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23862
24172
|
options: [
|
|
23863
|
-
{ value: "all", label: "
|
|
24173
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23864
24174
|
...filter.options?.map((opt) => ({
|
|
23865
24175
|
value: opt,
|
|
23866
24176
|
label: opt
|
|
@@ -23871,10 +24181,7 @@ var init_FilterGroup = __esm({
|
|
|
23871
24181
|
)
|
|
23872
24182
|
] }, filter.field)),
|
|
23873
24183
|
activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
23874
|
-
/* @__PURE__ */ jsxRuntime.
|
|
23875
|
-
activeFilterCount,
|
|
23876
|
-
" active"
|
|
23877
|
-
] }),
|
|
24184
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
23878
24185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23879
24186
|
exports.Button,
|
|
23880
24187
|
{
|
|
@@ -23882,7 +24189,7 @@ var init_FilterGroup = __esm({
|
|
|
23882
24189
|
size: "sm",
|
|
23883
24190
|
onClick: handleClearAll,
|
|
23884
24191
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23885
|
-
children: "
|
|
24192
|
+
children: t("filterGroup.clearAll")
|
|
23886
24193
|
}
|
|
23887
24194
|
)
|
|
23888
24195
|
] })
|
|
@@ -25077,19 +25384,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25077
25384
|
exports.RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25078
25385
|
}
|
|
25079
25386
|
});
|
|
25080
|
-
var
|
|
25387
|
+
var actionTypeLabelKeys, actionTypeIcons; exports.ViolationAlert = void 0;
|
|
25081
25388
|
var init_ViolationAlert = __esm({
|
|
25082
25389
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25083
25390
|
init_cn();
|
|
25391
|
+
init_useTranslate();
|
|
25084
25392
|
init_Box();
|
|
25085
25393
|
init_Stack();
|
|
25086
25394
|
init_Typography();
|
|
25087
25395
|
init_Button();
|
|
25088
25396
|
init_Icon();
|
|
25089
|
-
|
|
25090
|
-
measure: "
|
|
25091
|
-
admin: "
|
|
25092
|
-
penalty: "
|
|
25397
|
+
actionTypeLabelKeys = {
|
|
25398
|
+
measure: "violationAlert.actionType.measure",
|
|
25399
|
+
admin: "violationAlert.actionType.admin",
|
|
25400
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25093
25401
|
};
|
|
25094
25402
|
actionTypeIcons = {
|
|
25095
25403
|
measure: "alert-triangle",
|
|
@@ -25106,10 +25414,11 @@ var init_ViolationAlert = __esm({
|
|
|
25106
25414
|
className,
|
|
25107
25415
|
...flatProps
|
|
25108
25416
|
}) => {
|
|
25417
|
+
const { t } = useTranslate();
|
|
25109
25418
|
const resolvedViolation = violation ?? {
|
|
25110
25419
|
law: "",
|
|
25111
25420
|
article: "",
|
|
25112
|
-
message: flatProps.message ?? "
|
|
25421
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25113
25422
|
actionType: "measure"
|
|
25114
25423
|
};
|
|
25115
25424
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25194,7 +25503,7 @@ var init_ViolationAlert = __esm({
|
|
|
25194
25503
|
{
|
|
25195
25504
|
variant: "caption",
|
|
25196
25505
|
className: cn(textColor, "opacity-75"),
|
|
25197
|
-
children:
|
|
25506
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25198
25507
|
}
|
|
25199
25508
|
)
|
|
25200
25509
|
] })
|
|
@@ -25225,7 +25534,7 @@ var init_ViolationAlert = __esm({
|
|
|
25225
25534
|
{
|
|
25226
25535
|
variant: "caption",
|
|
25227
25536
|
className: cn(textColor, "opacity-75"),
|
|
25228
|
-
children: "
|
|
25537
|
+
children: t("violationAlert.adminLabel")
|
|
25229
25538
|
}
|
|
25230
25539
|
),
|
|
25231
25540
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25244,7 +25553,7 @@ var init_ViolationAlert = __esm({
|
|
|
25244
25553
|
{
|
|
25245
25554
|
variant: "caption",
|
|
25246
25555
|
className: cn(textColor, "opacity-75"),
|
|
25247
|
-
children: "
|
|
25556
|
+
children: t("violationAlert.penaltyLabel")
|
|
25248
25557
|
}
|
|
25249
25558
|
),
|
|
25250
25559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25269,7 +25578,7 @@ var init_ViolationAlert = __esm({
|
|
|
25269
25578
|
className: cn(textColor, "self-start"),
|
|
25270
25579
|
children: [
|
|
25271
25580
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25272
|
-
"
|
|
25581
|
+
t("violationAlert.goToField")
|
|
25273
25582
|
]
|
|
25274
25583
|
}
|
|
25275
25584
|
)
|
|
@@ -25585,6 +25894,7 @@ var init_LineChart = __esm({
|
|
|
25585
25894
|
"use client";
|
|
25586
25895
|
init_cn();
|
|
25587
25896
|
init_atoms2();
|
|
25897
|
+
init_useTranslate();
|
|
25588
25898
|
exports.LineChart = ({
|
|
25589
25899
|
data,
|
|
25590
25900
|
width = 400,
|
|
@@ -25596,6 +25906,7 @@ var init_LineChart = __esm({
|
|
|
25596
25906
|
areaColor = "var(--color-primary)",
|
|
25597
25907
|
className
|
|
25598
25908
|
}) => {
|
|
25909
|
+
const { t } = useTranslate();
|
|
25599
25910
|
const gradientId = React79.useId();
|
|
25600
25911
|
const safeData = data ?? [];
|
|
25601
25912
|
const sortedData = React79.useMemo(() => {
|
|
@@ -25632,7 +25943,7 @@ var init_LineChart = __esm({
|
|
|
25632
25943
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
25633
25944
|
}, [linePath, points, height, showArea]);
|
|
25634
25945
|
if (safeData.length === 0) {
|
|
25635
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
25946
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
25636
25947
|
}
|
|
25637
25948
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25638
25949
|
"svg",
|
|
@@ -27823,6 +28134,7 @@ var init_GraphView = __esm({
|
|
|
27823
28134
|
"use client";
|
|
27824
28135
|
init_cn();
|
|
27825
28136
|
init_atoms2();
|
|
28137
|
+
init_useTranslate();
|
|
27826
28138
|
GROUP_COLORS = [
|
|
27827
28139
|
"#3b82f6",
|
|
27828
28140
|
// blue-500
|
|
@@ -27855,6 +28167,7 @@ var init_GraphView = __esm({
|
|
|
27855
28167
|
showLabels = true,
|
|
27856
28168
|
zoomToFit = true
|
|
27857
28169
|
}) => {
|
|
28170
|
+
const { t } = useTranslate();
|
|
27858
28171
|
const containerRef = React79.useRef(null);
|
|
27859
28172
|
const animRef = React79.useRef(0);
|
|
27860
28173
|
const [simNodes, setSimNodes] = React79.useState([]);
|
|
@@ -28032,7 +28345,7 @@ var init_GraphView = __esm({
|
|
|
28032
28345
|
[onNodeClick]
|
|
28033
28346
|
);
|
|
28034
28347
|
if (nodes.length === 0) {
|
|
28035
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-muted-foreground text-sm", children: "
|
|
28348
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
28036
28349
|
}
|
|
28037
28350
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28038
28351
|
exports.Box,
|
|
@@ -28488,11 +28801,12 @@ var init_UploadDropZone = __esm({
|
|
|
28488
28801
|
init_Icon();
|
|
28489
28802
|
init_Typography();
|
|
28490
28803
|
init_useEventBus();
|
|
28804
|
+
init_useTranslate();
|
|
28491
28805
|
exports.UploadDropZone = ({
|
|
28492
28806
|
accept,
|
|
28493
28807
|
maxSize,
|
|
28494
28808
|
maxFiles = 1,
|
|
28495
|
-
label
|
|
28809
|
+
label,
|
|
28496
28810
|
description,
|
|
28497
28811
|
disabled = false,
|
|
28498
28812
|
action,
|
|
@@ -28500,22 +28814,24 @@ var init_UploadDropZone = __esm({
|
|
|
28500
28814
|
onFiles,
|
|
28501
28815
|
className
|
|
28502
28816
|
}) => {
|
|
28817
|
+
const { t } = useTranslate();
|
|
28818
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28503
28819
|
const [isDragOver, setIsDragOver] = React79.useState(false);
|
|
28504
28820
|
const [error, setError] = React79.useState(null);
|
|
28505
28821
|
const inputRef = React79.useRef(null);
|
|
28506
28822
|
const eventBus = useSafeEventBus7();
|
|
28507
28823
|
const defaultDescription = [
|
|
28508
|
-
accept ?
|
|
28509
|
-
maxSize ?
|
|
28510
|
-
maxFiles > 1 ?
|
|
28824
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
28825
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
28826
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28511
28827
|
].filter(Boolean).join(". ");
|
|
28512
28828
|
const validateFiles = React79.useCallback(
|
|
28513
28829
|
(files) => {
|
|
28514
28830
|
if (files.length > maxFiles) {
|
|
28515
|
-
return { valid: [], error:
|
|
28831
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28516
28832
|
}
|
|
28517
28833
|
if (accept) {
|
|
28518
|
-
const acceptedTypes = accept.split(",").map((
|
|
28834
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28519
28835
|
const invalid = files.filter((file) => {
|
|
28520
28836
|
return !acceptedTypes.some((type) => {
|
|
28521
28837
|
if (type.endsWith("/*")) {
|
|
@@ -28525,7 +28841,7 @@ var init_UploadDropZone = __esm({
|
|
|
28525
28841
|
});
|
|
28526
28842
|
});
|
|
28527
28843
|
if (invalid.length > 0) {
|
|
28528
|
-
return { valid: [], error:
|
|
28844
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28529
28845
|
}
|
|
28530
28846
|
}
|
|
28531
28847
|
if (maxSize) {
|
|
@@ -28533,13 +28849,13 @@ var init_UploadDropZone = __esm({
|
|
|
28533
28849
|
if (tooLarge.length > 0) {
|
|
28534
28850
|
return {
|
|
28535
28851
|
valid: [],
|
|
28536
|
-
error:
|
|
28852
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28537
28853
|
};
|
|
28538
28854
|
}
|
|
28539
28855
|
}
|
|
28540
28856
|
return { valid: files, error: null };
|
|
28541
28857
|
},
|
|
28542
|
-
[accept, maxSize, maxFiles]
|
|
28858
|
+
[accept, maxSize, maxFiles, t]
|
|
28543
28859
|
);
|
|
28544
28860
|
const handleFiles = React79.useCallback(
|
|
28545
28861
|
(files) => {
|
|
@@ -28610,7 +28926,7 @@ var init_UploadDropZone = __esm({
|
|
|
28610
28926
|
handleClick();
|
|
28611
28927
|
}
|
|
28612
28928
|
},
|
|
28613
|
-
"aria-label":
|
|
28929
|
+
"aria-label": resolvedLabel,
|
|
28614
28930
|
children: [
|
|
28615
28931
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28616
28932
|
"input",
|
|
@@ -28626,7 +28942,7 @@ var init_UploadDropZone = __esm({
|
|
|
28626
28942
|
}
|
|
28627
28943
|
),
|
|
28628
28944
|
error ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
28629
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
28945
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
28630
28946
|
error ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
28631
28947
|
]
|
|
28632
28948
|
}
|
|
@@ -29048,7 +29364,7 @@ function TableView({
|
|
|
29048
29364
|
{
|
|
29049
29365
|
checked: selected.has(id),
|
|
29050
29366
|
onChange: () => toggleRow(id),
|
|
29051
|
-
"aria-label":
|
|
29367
|
+
"aria-label": t("table.selectRow", { id })
|
|
29052
29368
|
}
|
|
29053
29369
|
) }),
|
|
29054
29370
|
hasRenderProp ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -31895,7 +32211,7 @@ var init_QrScanner = __esm({
|
|
|
31895
32211
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
31896
32212
|
children: [
|
|
31897
32213
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
31898
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-white", children: "
|
|
32214
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
31899
32215
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
31900
32216
|
]
|
|
31901
32217
|
}
|
|
@@ -31906,7 +32222,7 @@ var init_QrScanner = __esm({
|
|
|
31906
32222
|
position: "absolute",
|
|
31907
32223
|
display: "flex",
|
|
31908
32224
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
31909
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-white", children: "
|
|
32225
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
31910
32226
|
}
|
|
31911
32227
|
),
|
|
31912
32228
|
showCameraControls && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -31925,7 +32241,7 @@ var init_QrScanner = __esm({
|
|
|
31925
32241
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31926
32242
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31927
32243
|
),
|
|
31928
|
-
"aria-label": isPaused ? "
|
|
32244
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
31929
32245
|
children: isPaused ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "pause", className: "h-4 w-4" })
|
|
31930
32246
|
}
|
|
31931
32247
|
),
|
|
@@ -31938,7 +32254,7 @@ var init_QrScanner = __esm({
|
|
|
31938
32254
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31939
32255
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31940
32256
|
),
|
|
31941
|
-
"aria-label":
|
|
32257
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
31942
32258
|
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31943
32259
|
}
|
|
31944
32260
|
),
|
|
@@ -31952,7 +32268,7 @@ var init_QrScanner = __esm({
|
|
|
31952
32268
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31953
32269
|
),
|
|
31954
32270
|
"aria-label": t("aria.mockScanDev"),
|
|
31955
|
-
children: "
|
|
32271
|
+
children: t("qrScanner.mockScan")
|
|
31956
32272
|
}
|
|
31957
32273
|
)
|
|
31958
32274
|
]
|
|
@@ -31970,6 +32286,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31970
32286
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
31971
32287
|
init_cn();
|
|
31972
32288
|
init_useEventBus();
|
|
32289
|
+
init_useTranslate();
|
|
31973
32290
|
init_Typography();
|
|
31974
32291
|
init_Box();
|
|
31975
32292
|
init_Label();
|
|
@@ -31979,36 +32296,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31979
32296
|
const sign = delta >= 0 ? "+" : "-";
|
|
31980
32297
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
31981
32298
|
};
|
|
31982
|
-
constraintHint = (constraint) => {
|
|
32299
|
+
constraintHint = (constraint, t) => {
|
|
31983
32300
|
if (constraint.type === "single") {
|
|
31984
|
-
return constraint.required ? "
|
|
32301
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
31985
32302
|
}
|
|
31986
32303
|
const { min, max } = constraint;
|
|
31987
32304
|
if (min && max) {
|
|
31988
|
-
return min === max ?
|
|
32305
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
31989
32306
|
}
|
|
31990
|
-
if (min) return
|
|
31991
|
-
if (max) return
|
|
31992
|
-
return "
|
|
32307
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32308
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32309
|
+
return t("optionConstraint.optional");
|
|
31993
32310
|
};
|
|
31994
|
-
validateSelection = (selected, constraint) => {
|
|
32311
|
+
validateSelection = (selected, constraint, t) => {
|
|
31995
32312
|
if (constraint.type === "single") {
|
|
31996
32313
|
if (constraint.required && selected.length === 0) {
|
|
31997
|
-
return "
|
|
32314
|
+
return t("optionConstraint.error.pickOne");
|
|
31998
32315
|
}
|
|
31999
32316
|
if (selected.length > 1) {
|
|
32000
|
-
return "
|
|
32317
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32001
32318
|
}
|
|
32002
32319
|
return void 0;
|
|
32003
32320
|
}
|
|
32004
32321
|
const { min, max } = constraint;
|
|
32005
32322
|
if (min !== void 0 && selected.length < min) {
|
|
32006
32323
|
const remaining = min - selected.length;
|
|
32007
|
-
return
|
|
32324
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32008
32325
|
}
|
|
32009
32326
|
if (max !== void 0 && selected.length > max) {
|
|
32010
32327
|
const excess = selected.length - max;
|
|
32011
|
-
return
|
|
32328
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32012
32329
|
}
|
|
32013
32330
|
return void 0;
|
|
32014
32331
|
};
|
|
@@ -32025,8 +32342,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32025
32342
|
className
|
|
32026
32343
|
}) => {
|
|
32027
32344
|
const eventBus = useEventBus();
|
|
32028
|
-
const
|
|
32029
|
-
const
|
|
32345
|
+
const { t } = useTranslate();
|
|
32346
|
+
const hint = constraintHint(constraint, t);
|
|
32347
|
+
const error = validateSelection(selected, constraint, t);
|
|
32030
32348
|
const inputName = `option-${groupId}`;
|
|
32031
32349
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32032
32350
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32126,7 +32444,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32126
32444
|
variant: "caption",
|
|
32127
32445
|
color: "warning",
|
|
32128
32446
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32129
|
-
children: "
|
|
32447
|
+
children: t("optionConstraint.outOfStock")
|
|
32130
32448
|
}
|
|
32131
32449
|
)
|
|
32132
32450
|
]
|
|
@@ -32448,6 +32766,7 @@ function changeBlockType(block, type) {
|
|
|
32448
32766
|
return { id: block.id, type, content: seed };
|
|
32449
32767
|
}
|
|
32450
32768
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32769
|
+
const { t } = useTranslate();
|
|
32451
32770
|
const [open, setOpen] = React79.useState(false);
|
|
32452
32771
|
const ref = React79.useRef(null);
|
|
32453
32772
|
React79.useEffect(() => {
|
|
@@ -32467,7 +32786,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32467
32786
|
{
|
|
32468
32787
|
type: "button",
|
|
32469
32788
|
variant: "ghost",
|
|
32470
|
-
"aria-label": "
|
|
32789
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32471
32790
|
className: cn(
|
|
32472
32791
|
"inline-flex items-center justify-center",
|
|
32473
32792
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32489,7 +32808,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32489
32808
|
"py-1 text-sm"
|
|
32490
32809
|
),
|
|
32491
32810
|
children: [
|
|
32492
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
32811
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32493
32812
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32494
32813
|
exports.Button,
|
|
32495
32814
|
{
|
|
@@ -32503,7 +32822,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32503
32822
|
},
|
|
32504
32823
|
children: [
|
|
32505
32824
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32506
|
-
"
|
|
32825
|
+
" ",
|
|
32826
|
+
t("richBlockEditor.duplicate")
|
|
32507
32827
|
]
|
|
32508
32828
|
}
|
|
32509
32829
|
),
|
|
@@ -32520,14 +32840,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32520
32840
|
},
|
|
32521
32841
|
children: [
|
|
32522
32842
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32523
|
-
"
|
|
32843
|
+
" ",
|
|
32844
|
+
t("common.delete")
|
|
32524
32845
|
]
|
|
32525
32846
|
}
|
|
32526
32847
|
),
|
|
32527
32848
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32528
32849
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "my-1 border-t border-border" }),
|
|
32529
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32530
|
-
CHANGEABLE_TYPES.filter((
|
|
32850
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
32851
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32531
32852
|
exports.Button,
|
|
32532
32853
|
{
|
|
32533
32854
|
type: "button",
|
|
@@ -32535,12 +32856,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32535
32856
|
role: "menuitem",
|
|
32536
32857
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32537
32858
|
onClick: () => {
|
|
32538
|
-
onChangeType(
|
|
32859
|
+
onChangeType(bt);
|
|
32539
32860
|
setOpen(false);
|
|
32540
32861
|
},
|
|
32541
|
-
children:
|
|
32862
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32542
32863
|
},
|
|
32543
|
-
|
|
32864
|
+
bt
|
|
32544
32865
|
))
|
|
32545
32866
|
] })
|
|
32546
32867
|
]
|
|
@@ -32602,6 +32923,7 @@ function BlockRow({
|
|
|
32602
32923
|
onInsertAfter,
|
|
32603
32924
|
onChangeType
|
|
32604
32925
|
}) {
|
|
32926
|
+
const { t } = useTranslate();
|
|
32605
32927
|
const setContent = React79.useCallback(
|
|
32606
32928
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32607
32929
|
[onUpdate]
|
|
@@ -32651,8 +32973,8 @@ function BlockRow({
|
|
|
32651
32973
|
tag: "h1",
|
|
32652
32974
|
value: block.content ?? "",
|
|
32653
32975
|
readOnly,
|
|
32654
|
-
placeholder: placeholder ?? "
|
|
32655
|
-
ariaLabel: "
|
|
32976
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
32977
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32656
32978
|
className: "text-3xl font-bold leading-tight",
|
|
32657
32979
|
onValueChange: setContent
|
|
32658
32980
|
}
|
|
@@ -32664,8 +32986,8 @@ function BlockRow({
|
|
|
32664
32986
|
tag: "h2",
|
|
32665
32987
|
value: block.content ?? "",
|
|
32666
32988
|
readOnly,
|
|
32667
|
-
placeholder: placeholder ?? "
|
|
32668
|
-
ariaLabel: "
|
|
32989
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
32990
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32669
32991
|
className: "text-2xl font-semibold leading-tight",
|
|
32670
32992
|
onValueChange: setContent
|
|
32671
32993
|
}
|
|
@@ -32677,8 +32999,8 @@ function BlockRow({
|
|
|
32677
32999
|
tag: "h3",
|
|
32678
33000
|
value: block.content ?? "",
|
|
32679
33001
|
readOnly,
|
|
32680
|
-
placeholder: placeholder ?? "
|
|
32681
|
-
ariaLabel: "
|
|
33002
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33003
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32682
33004
|
className: "text-xl font-semibold leading-tight",
|
|
32683
33005
|
onValueChange: setContent
|
|
32684
33006
|
}
|
|
@@ -32690,8 +33012,8 @@ function BlockRow({
|
|
|
32690
33012
|
tag: "blockquote",
|
|
32691
33013
|
value: block.content ?? "",
|
|
32692
33014
|
readOnly,
|
|
32693
|
-
placeholder: placeholder ?? "
|
|
32694
|
-
ariaLabel: "
|
|
33015
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33016
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32695
33017
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32696
33018
|
onValueChange: setContent
|
|
32697
33019
|
}
|
|
@@ -32699,13 +33021,13 @@ function BlockRow({
|
|
|
32699
33021
|
case "code":
|
|
32700
33022
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32701
33023
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32702
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
33024
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32703
33025
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32704
33026
|
exports.Input,
|
|
32705
33027
|
{
|
|
32706
33028
|
inputType: "text",
|
|
32707
33029
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32708
|
-
"aria-label": "
|
|
33030
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32709
33031
|
className: cn(
|
|
32710
33032
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32711
33033
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32721,8 +33043,8 @@ function BlockRow({
|
|
|
32721
33043
|
tag: "pre",
|
|
32722
33044
|
value: block.content ?? "",
|
|
32723
33045
|
readOnly,
|
|
32724
|
-
placeholder: placeholder ?? "
|
|
32725
|
-
ariaLabel: "
|
|
33046
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33047
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32726
33048
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32727
33049
|
onValueChange: setContent
|
|
32728
33050
|
}
|
|
@@ -32735,7 +33057,7 @@ function BlockRow({
|
|
|
32735
33057
|
const caption = String(block.metadata?.caption ?? "");
|
|
32736
33058
|
const imgProps = {
|
|
32737
33059
|
src: url,
|
|
32738
|
-
alt: caption || "
|
|
33060
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32739
33061
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32740
33062
|
};
|
|
32741
33063
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "space-y-2", children: [
|
|
@@ -32749,7 +33071,8 @@ function BlockRow({
|
|
|
32749
33071
|
),
|
|
32750
33072
|
children: [
|
|
32751
33073
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32752
|
-
"
|
|
33074
|
+
" ",
|
|
33075
|
+
t("richBlockEditor.noImageUrl")
|
|
32753
33076
|
]
|
|
32754
33077
|
}
|
|
32755
33078
|
),
|
|
@@ -32760,7 +33083,7 @@ function BlockRow({
|
|
|
32760
33083
|
inputType: "url",
|
|
32761
33084
|
value: url,
|
|
32762
33085
|
placeholder: "https://example.com/image.png",
|
|
32763
|
-
"aria-label": "
|
|
33086
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32764
33087
|
className: cn(
|
|
32765
33088
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32766
33089
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32773,8 +33096,8 @@ function BlockRow({
|
|
|
32773
33096
|
{
|
|
32774
33097
|
inputType: "text",
|
|
32775
33098
|
value: caption,
|
|
32776
|
-
placeholder: "
|
|
32777
|
-
"aria-label": "
|
|
33099
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33100
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32778
33101
|
className: cn(
|
|
32779
33102
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32780
33103
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32805,8 +33128,8 @@ function BlockRow({
|
|
|
32805
33128
|
tag: "span",
|
|
32806
33129
|
value: child.content ?? "",
|
|
32807
33130
|
readOnly,
|
|
32808
|
-
placeholder: "
|
|
32809
|
-
ariaLabel: "
|
|
33131
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33132
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
32810
33133
|
className: "inline-block min-w-[1ch] flex-1",
|
|
32811
33134
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
32812
33135
|
}
|
|
@@ -32816,7 +33139,7 @@ function BlockRow({
|
|
|
32816
33139
|
{
|
|
32817
33140
|
type: "button",
|
|
32818
33141
|
variant: "ghost",
|
|
32819
|
-
"aria-label": "
|
|
33142
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
32820
33143
|
className: cn(
|
|
32821
33144
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
32822
33145
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -32838,7 +33161,8 @@ function BlockRow({
|
|
|
32838
33161
|
onClick: addListItem,
|
|
32839
33162
|
children: [
|
|
32840
33163
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "plus", className: "w-3 h-3" }),
|
|
32841
|
-
"
|
|
33164
|
+
" ",
|
|
33165
|
+
t("richBlockEditor.addItem")
|
|
32842
33166
|
]
|
|
32843
33167
|
}
|
|
32844
33168
|
) })
|
|
@@ -32854,8 +33178,8 @@ function BlockRow({
|
|
|
32854
33178
|
tag: "p",
|
|
32855
33179
|
value: block.content ?? "",
|
|
32856
33180
|
readOnly,
|
|
32857
|
-
placeholder: placeholder ?? "
|
|
32858
|
-
ariaLabel: "
|
|
33181
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33182
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
32859
33183
|
className: "leading-7",
|
|
32860
33184
|
onValueChange: setContent
|
|
32861
33185
|
}
|
|
@@ -32878,7 +33202,7 @@ function BlockRow({
|
|
|
32878
33202
|
{
|
|
32879
33203
|
type: "button",
|
|
32880
33204
|
variant: "ghost",
|
|
32881
|
-
"aria-label": "
|
|
33205
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
32882
33206
|
className: cn(
|
|
32883
33207
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
32884
33208
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -32905,7 +33229,7 @@ function BlockRow({
|
|
|
32905
33229
|
}
|
|
32906
33230
|
);
|
|
32907
33231
|
}
|
|
32908
|
-
var TOOLBAR_ENTRIES,
|
|
33232
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES; exports.RichBlockEditor = void 0;
|
|
32909
33233
|
var init_RichBlockEditor = __esm({
|
|
32910
33234
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
32911
33235
|
"use client";
|
|
@@ -32918,29 +33242,30 @@ var init_RichBlockEditor = __esm({
|
|
|
32918
33242
|
init_Input();
|
|
32919
33243
|
init_Icon();
|
|
32920
33244
|
init_useEventBus();
|
|
33245
|
+
init_useTranslate();
|
|
32921
33246
|
TOOLBAR_ENTRIES = [
|
|
32922
|
-
{ type: "paragraph",
|
|
32923
|
-
{ type: "heading-1",
|
|
32924
|
-
{ type: "heading-2",
|
|
32925
|
-
{ type: "heading-3",
|
|
32926
|
-
{ type: "bullet-list",
|
|
32927
|
-
{ type: "numbered-list",
|
|
32928
|
-
{ type: "quote",
|
|
32929
|
-
{ type: "code",
|
|
32930
|
-
{ type: "divider",
|
|
32931
|
-
{ type: "image",
|
|
33247
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33248
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
33249
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: LucideIcons2.Heading2 },
|
|
33250
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: LucideIcons2.Heading3 },
|
|
33251
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: LucideIcons2.List },
|
|
33252
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: LucideIcons2.ListOrdered },
|
|
33253
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: LucideIcons2.Quote },
|
|
33254
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: LucideIcons2.Code },
|
|
33255
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: LucideIcons2.Minus },
|
|
33256
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: LucideIcons2.Image }
|
|
32932
33257
|
];
|
|
32933
|
-
|
|
32934
|
-
paragraph: "
|
|
32935
|
-
"heading-1": "
|
|
32936
|
-
"heading-2": "
|
|
32937
|
-
"heading-3": "
|
|
32938
|
-
"bullet-list": "
|
|
32939
|
-
"numbered-list": "
|
|
32940
|
-
quote: "
|
|
32941
|
-
code: "
|
|
32942
|
-
divider: "
|
|
32943
|
-
image: "
|
|
33258
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33259
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33260
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33261
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33262
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33263
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33264
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33265
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33266
|
+
code: "richBlockEditor.blockType.code",
|
|
33267
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33268
|
+
image: "richBlockEditor.blockType.image"
|
|
32944
33269
|
};
|
|
32945
33270
|
CHANGEABLE_TYPES = [
|
|
32946
33271
|
"paragraph",
|
|
@@ -32974,6 +33299,7 @@ var init_RichBlockEditor = __esm({
|
|
|
32974
33299
|
showToolbar = true,
|
|
32975
33300
|
className
|
|
32976
33301
|
}) => {
|
|
33302
|
+
const { t } = useTranslate();
|
|
32977
33303
|
const [blocks, setBlocks] = React79.useState(
|
|
32978
33304
|
() => normalizeBlocks(initialBlocks)
|
|
32979
33305
|
);
|
|
@@ -33045,25 +33371,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33045
33371
|
exports.Box,
|
|
33046
33372
|
{
|
|
33047
33373
|
role: "toolbar",
|
|
33048
|
-
"aria-label": "
|
|
33374
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33049
33375
|
className: cn(
|
|
33050
33376
|
"flex flex-wrap items-center gap-1",
|
|
33051
33377
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33052
33378
|
),
|
|
33053
33379
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33054
33380
|
const Icon3 = entry.icon;
|
|
33381
|
+
const entryLabel = t(entry.labelKey);
|
|
33055
33382
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33056
33383
|
exports.Button,
|
|
33057
33384
|
{
|
|
33058
33385
|
type: "button",
|
|
33059
33386
|
variant: "ghost",
|
|
33060
33387
|
size: "sm",
|
|
33061
|
-
"aria-label":
|
|
33062
|
-
title:
|
|
33388
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33389
|
+
title: entryLabel,
|
|
33063
33390
|
onClick: () => handleAppend(entry.type),
|
|
33064
33391
|
children: [
|
|
33065
33392
|
/* @__PURE__ */ jsxRuntime.jsx(Icon3, { size: 14 }),
|
|
33066
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33393
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33067
33394
|
]
|
|
33068
33395
|
},
|
|
33069
33396
|
entry.type
|
|
@@ -33106,6 +33433,7 @@ var init_ReplyTree = __esm({
|
|
|
33106
33433
|
"use client";
|
|
33107
33434
|
init_cn();
|
|
33108
33435
|
init_useEventBus();
|
|
33436
|
+
init_useTranslate();
|
|
33109
33437
|
init_atoms2();
|
|
33110
33438
|
init_VoteStack();
|
|
33111
33439
|
ReplyTreeNode = ({
|
|
@@ -33125,6 +33453,7 @@ var init_ReplyTree = __esm({
|
|
|
33125
33453
|
showActions
|
|
33126
33454
|
}) => {
|
|
33127
33455
|
const eventBus = useEventBus();
|
|
33456
|
+
const { t } = useTranslate();
|
|
33128
33457
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33129
33458
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33130
33459
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33171,7 +33500,7 @@ var init_ReplyTree = __esm({
|
|
|
33171
33500
|
variant: "ghost",
|
|
33172
33501
|
size: "sm",
|
|
33173
33502
|
onClick: handleToggle,
|
|
33174
|
-
"aria-label": isCollapsed ? "
|
|
33503
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33175
33504
|
"aria-expanded": !isCollapsed,
|
|
33176
33505
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33177
33506
|
className: cn(
|
|
@@ -33212,7 +33541,7 @@ var init_ReplyTree = __esm({
|
|
|
33212
33541
|
onVote: handleVote,
|
|
33213
33542
|
size: "sm",
|
|
33214
33543
|
variant: "horizontal",
|
|
33215
|
-
label:
|
|
33544
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33216
33545
|
}
|
|
33217
33546
|
),
|
|
33218
33547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33222,8 +33551,8 @@ var init_ReplyTree = __esm({
|
|
|
33222
33551
|
size: "sm",
|
|
33223
33552
|
leftIcon: "message-square",
|
|
33224
33553
|
onClick: handleReply,
|
|
33225
|
-
"aria-label":
|
|
33226
|
-
children: "
|
|
33554
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33555
|
+
children: t("replyTree.reply")
|
|
33227
33556
|
}
|
|
33228
33557
|
),
|
|
33229
33558
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33233,8 +33562,8 @@ var init_ReplyTree = __esm({
|
|
|
33233
33562
|
size: "sm",
|
|
33234
33563
|
leftIcon: "flag",
|
|
33235
33564
|
onClick: handleFlag,
|
|
33236
|
-
"aria-label":
|
|
33237
|
-
children: "
|
|
33565
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33566
|
+
children: t("replyTree.flag")
|
|
33238
33567
|
}
|
|
33239
33568
|
)
|
|
33240
33569
|
] }),
|
|
@@ -33245,9 +33574,9 @@ var init_ReplyTree = __esm({
|
|
|
33245
33574
|
inputType: "textarea",
|
|
33246
33575
|
rows: 2,
|
|
33247
33576
|
value: draft,
|
|
33248
|
-
placeholder:
|
|
33577
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33249
33578
|
onChange: (e) => setDraft(e.target.value),
|
|
33250
|
-
"aria-label":
|
|
33579
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33251
33580
|
}
|
|
33252
33581
|
),
|
|
33253
33582
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33259,10 +33588,10 @@ var init_ReplyTree = __esm({
|
|
|
33259
33588
|
leftIcon: "send",
|
|
33260
33589
|
onClick: handleSubmitReply,
|
|
33261
33590
|
disabled: !draft.trim(),
|
|
33262
|
-
children: "
|
|
33591
|
+
children: t("replyTree.send")
|
|
33263
33592
|
}
|
|
33264
33593
|
),
|
|
33265
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33594
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33266
33595
|
] })
|
|
33267
33596
|
] }),
|
|
33268
33597
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33276,7 +33605,7 @@ var init_ReplyTree = __esm({
|
|
|
33276
33605
|
"self-start gap-1 px-0 h-auto",
|
|
33277
33606
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33278
33607
|
),
|
|
33279
|
-
children: "
|
|
33608
|
+
children: t("replyTree.continueThread")
|
|
33280
33609
|
}
|
|
33281
33610
|
) : /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33282
33611
|
ReplyTreeNode,
|
|
@@ -33315,6 +33644,7 @@ var init_ReplyTree = __esm({
|
|
|
33315
33644
|
showActions = true,
|
|
33316
33645
|
className
|
|
33317
33646
|
}) => {
|
|
33647
|
+
const { t } = useTranslate();
|
|
33318
33648
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33319
33649
|
const [collapsedSet, setCollapsedSet] = React79.useState(() => {
|
|
33320
33650
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33333,7 +33663,7 @@ var init_ReplyTree = __esm({
|
|
|
33333
33663
|
});
|
|
33334
33664
|
}, []);
|
|
33335
33665
|
if (nodeList.length === 0) {
|
|
33336
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33666
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33337
33667
|
}
|
|
33338
33668
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33339
33669
|
ReplyTreeNode,
|
|
@@ -33411,6 +33741,7 @@ var init_VersionDiff = __esm({
|
|
|
33411
33741
|
"use client";
|
|
33412
33742
|
init_cn();
|
|
33413
33743
|
init_useEventBus();
|
|
33744
|
+
init_useTranslate();
|
|
33414
33745
|
init_atoms2();
|
|
33415
33746
|
init_Stack();
|
|
33416
33747
|
INLINE_STYLES = {
|
|
@@ -33433,6 +33764,7 @@ var init_VersionDiff = __esm({
|
|
|
33433
33764
|
language,
|
|
33434
33765
|
className
|
|
33435
33766
|
}) => {
|
|
33767
|
+
const { t } = useTranslate();
|
|
33436
33768
|
const eventBus = useEventBus();
|
|
33437
33769
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33438
33770
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33514,24 +33846,24 @@ var init_VersionDiff = __esm({
|
|
|
33514
33846
|
children: [
|
|
33515
33847
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33516
33848
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33517
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
33849
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33518
33850
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33519
33851
|
exports.Select,
|
|
33520
33852
|
{
|
|
33521
33853
|
options,
|
|
33522
33854
|
value: activeBeforeId,
|
|
33523
33855
|
onChange: handleBeforeChange,
|
|
33524
|
-
"aria-label": "
|
|
33856
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33525
33857
|
}
|
|
33526
33858
|
) }),
|
|
33527
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
33859
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33528
33860
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33529
33861
|
exports.Select,
|
|
33530
33862
|
{
|
|
33531
33863
|
options,
|
|
33532
33864
|
value: activeAfterId,
|
|
33533
33865
|
onChange: handleAfterChange,
|
|
33534
|
-
"aria-label": "
|
|
33866
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33535
33867
|
}
|
|
33536
33868
|
) }),
|
|
33537
33869
|
language && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", children: language }),
|
|
@@ -33552,7 +33884,7 @@ var init_VersionDiff = __esm({
|
|
|
33552
33884
|
size: "sm",
|
|
33553
33885
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33554
33886
|
onClick: handleViewToggle,
|
|
33555
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
33887
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33556
33888
|
}
|
|
33557
33889
|
),
|
|
33558
33890
|
(onRevert || revertEvent) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33562,7 +33894,7 @@ var init_VersionDiff = __esm({
|
|
|
33562
33894
|
size: "sm",
|
|
33563
33895
|
icon: "rotate-ccw",
|
|
33564
33896
|
onClick: handleRevert,
|
|
33565
|
-
children: "
|
|
33897
|
+
children: t("versionDiff.revert")
|
|
33566
33898
|
}
|
|
33567
33899
|
)
|
|
33568
33900
|
] })
|
|
@@ -33579,12 +33911,12 @@ var init_VersionDiff = __esm({
|
|
|
33579
33911
|
children: [
|
|
33580
33912
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33581
33913
|
beforeRev?.label,
|
|
33582
|
-
beforeRev?.author ?
|
|
33914
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33583
33915
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33584
33916
|
] }),
|
|
33585
33917
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33586
33918
|
afterRev?.label,
|
|
33587
|
-
afterRev?.author ?
|
|
33919
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33588
33920
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33589
33921
|
] })
|
|
33590
33922
|
]
|
|
@@ -33977,10 +34309,12 @@ var init_DocPagination = __esm({
|
|
|
33977
34309
|
}
|
|
33978
34310
|
});
|
|
33979
34311
|
function DocSearch({
|
|
33980
|
-
placeholder
|
|
34312
|
+
placeholder,
|
|
33981
34313
|
onSearch,
|
|
33982
34314
|
className
|
|
33983
34315
|
}) {
|
|
34316
|
+
const { t } = useTranslate();
|
|
34317
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
33984
34318
|
const [query, setQuery] = React79.useState("");
|
|
33985
34319
|
const [results, setResults] = React79.useState([]);
|
|
33986
34320
|
const [isOpen, setIsOpen] = React79.useState(false);
|
|
@@ -34087,7 +34421,7 @@ function DocSearch({
|
|
|
34087
34421
|
exports.Input,
|
|
34088
34422
|
{
|
|
34089
34423
|
inputType: "search",
|
|
34090
|
-
placeholder,
|
|
34424
|
+
placeholder: resolvedPlaceholder,
|
|
34091
34425
|
value: query,
|
|
34092
34426
|
onChange: handleChange,
|
|
34093
34427
|
onFocus: handleFocus,
|
|
@@ -34152,6 +34486,7 @@ var init_DocSearch = __esm({
|
|
|
34152
34486
|
init_Typography();
|
|
34153
34487
|
init_Icon();
|
|
34154
34488
|
init_Input();
|
|
34489
|
+
init_useTranslate();
|
|
34155
34490
|
}
|
|
34156
34491
|
});
|
|
34157
34492
|
var DocSidebarCategory; exports.DocSidebar = void 0;
|
|
@@ -36284,8 +36619,8 @@ var init_SignaturePad = __esm({
|
|
|
36284
36619
|
init_useEventBus();
|
|
36285
36620
|
init_useTranslate();
|
|
36286
36621
|
exports.SignaturePad = ({
|
|
36287
|
-
label
|
|
36288
|
-
helperText
|
|
36622
|
+
label,
|
|
36623
|
+
helperText,
|
|
36289
36624
|
strokeColor,
|
|
36290
36625
|
strokeWidth = 2,
|
|
36291
36626
|
height = 200,
|
|
@@ -36301,6 +36636,8 @@ var init_SignaturePad = __esm({
|
|
|
36301
36636
|
}) => {
|
|
36302
36637
|
const eventBus = useEventBus();
|
|
36303
36638
|
const { t } = useTranslate();
|
|
36639
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36640
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36304
36641
|
const canvasRef = React79.useRef(null);
|
|
36305
36642
|
const [isDrawing, setIsDrawing] = React79.useState(false);
|
|
36306
36643
|
const [hasSignature, setHasSignature] = React79.useState(!!value);
|
|
@@ -36403,7 +36740,7 @@ var init_SignaturePad = __esm({
|
|
|
36403
36740
|
);
|
|
36404
36741
|
}
|
|
36405
36742
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "sm", children: [
|
|
36406
|
-
|
|
36743
|
+
resolvedLabel && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36407
36744
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36408
36745
|
exports.Box,
|
|
36409
36746
|
{
|
|
@@ -36432,7 +36769,7 @@ var init_SignaturePad = __esm({
|
|
|
36432
36769
|
)
|
|
36433
36770
|
}
|
|
36434
36771
|
),
|
|
36435
|
-
|
|
36772
|
+
resolvedHelperText && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36436
36773
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", justify: "end", children: [
|
|
36437
36774
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36438
36775
|
exports.Button,
|
|
@@ -36442,7 +36779,7 @@ var init_SignaturePad = __esm({
|
|
|
36442
36779
|
icon: LucideIcons2.Eraser,
|
|
36443
36780
|
onClick: clearSignature,
|
|
36444
36781
|
disabled: !hasSignature,
|
|
36445
|
-
children: "
|
|
36782
|
+
children: t("signaturePad.clear")
|
|
36446
36783
|
}
|
|
36447
36784
|
),
|
|
36448
36785
|
signEvent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -36453,7 +36790,7 @@ var init_SignaturePad = __esm({
|
|
|
36453
36790
|
icon: LucideIcons2.Check,
|
|
36454
36791
|
onClick: confirmSignature,
|
|
36455
36792
|
disabled: !hasSignature,
|
|
36456
|
-
children: "
|
|
36793
|
+
children: t("signaturePad.confirm")
|
|
36457
36794
|
}
|
|
36458
36795
|
)
|
|
36459
36796
|
] })
|
|
@@ -41120,6 +41457,7 @@ function MasterDetail({
|
|
|
41120
41457
|
className,
|
|
41121
41458
|
...rest
|
|
41122
41459
|
}) {
|
|
41460
|
+
const { t } = useTranslate();
|
|
41123
41461
|
const loading = externalLoading ?? false;
|
|
41124
41462
|
const isLoading = externalIsLoading ?? false;
|
|
41125
41463
|
const error = externalError ?? null;
|
|
@@ -41132,8 +41470,8 @@ function MasterDetail({
|
|
|
41132
41470
|
isLoading: loading || isLoading,
|
|
41133
41471
|
error,
|
|
41134
41472
|
className,
|
|
41135
|
-
emptyTitle: "
|
|
41136
|
-
emptyDescription: "
|
|
41473
|
+
emptyTitle: t("table.empty.title"),
|
|
41474
|
+
emptyDescription: t("empty.createFirst"),
|
|
41137
41475
|
...rest
|
|
41138
41476
|
}
|
|
41139
41477
|
);
|
|
@@ -41142,6 +41480,7 @@ var init_MasterDetail = __esm({
|
|
|
41142
41480
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41143
41481
|
"use client";
|
|
41144
41482
|
init_DataTable();
|
|
41483
|
+
init_useTranslate();
|
|
41145
41484
|
MasterDetail.displayName = "MasterDetail";
|
|
41146
41485
|
}
|
|
41147
41486
|
});
|
|
@@ -41150,14 +41489,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41150
41489
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41151
41490
|
init_cn();
|
|
41152
41491
|
init_Typography();
|
|
41153
|
-
|
|
41154
|
-
|
|
41155
|
-
{
|
|
41156
|
-
|
|
41157
|
-
|
|
41158
|
-
|
|
41159
|
-
|
|
41160
|
-
|
|
41492
|
+
init_useTranslate();
|
|
41493
|
+
DefaultEmptyDetail = () => {
|
|
41494
|
+
const { t } = useTranslate();
|
|
41495
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41496
|
+
exports.Typography,
|
|
41497
|
+
{
|
|
41498
|
+
variant: "body2",
|
|
41499
|
+
className: "text-muted-foreground",
|
|
41500
|
+
children: t("masterDetail.selectItem")
|
|
41501
|
+
}
|
|
41502
|
+
) });
|
|
41503
|
+
};
|
|
41161
41504
|
exports.MasterDetailLayout = ({
|
|
41162
41505
|
master,
|
|
41163
41506
|
detail,
|
|
@@ -41284,7 +41627,7 @@ var init_MediaGallery = __esm({
|
|
|
41284
41627
|
{
|
|
41285
41628
|
icon: LucideIcons2.Image,
|
|
41286
41629
|
title: t("display.noMedia"),
|
|
41287
|
-
description: "
|
|
41630
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41288
41631
|
className
|
|
41289
41632
|
}
|
|
41290
41633
|
);
|
|
@@ -41301,7 +41644,7 @@ var init_MediaGallery = __esm({
|
|
|
41301
41644
|
size: "sm",
|
|
41302
41645
|
icon: LucideIcons2.Upload,
|
|
41303
41646
|
action: "MEDIA_UPLOAD",
|
|
41304
|
-
children: "
|
|
41647
|
+
children: t("mediaGallery.upload")
|
|
41305
41648
|
}
|
|
41306
41649
|
),
|
|
41307
41650
|
actions?.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -41315,10 +41658,7 @@ var init_MediaGallery = __esm({
|
|
|
41315
41658
|
))
|
|
41316
41659
|
] })
|
|
41317
41660
|
] }),
|
|
41318
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsxRuntime.
|
|
41319
|
-
selectedItems.length,
|
|
41320
|
-
" selected"
|
|
41321
|
-
] }) }),
|
|
41661
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
41322
41662
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41323
41663
|
exports.Box,
|
|
41324
41664
|
{
|
|
@@ -42311,7 +42651,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42311
42651
|
exports.EmptyState,
|
|
42312
42652
|
{
|
|
42313
42653
|
title: t("debug.noActiveTraits"),
|
|
42314
|
-
description: "
|
|
42654
|
+
description: t("debug.traitsMountHint"),
|
|
42315
42655
|
className: "py-8"
|
|
42316
42656
|
}
|
|
42317
42657
|
);
|
|
@@ -42321,14 +42661,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42321
42661
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42322
42662
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42323
42663
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42324
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42325
|
-
trait.transitionCount,
|
|
42326
|
-
" transitions"
|
|
42327
|
-
] })
|
|
42664
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42328
42665
|
] }),
|
|
42329
42666
|
content: /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "sm", children: [
|
|
42330
42667
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42331
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42668
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42332
42669
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
42333
42670
|
exports.Badge,
|
|
42334
42671
|
{
|
|
@@ -42340,7 +42677,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42340
42677
|
)) })
|
|
42341
42678
|
] }),
|
|
42342
42679
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42343
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42680
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42344
42681
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "small", className: "font-mono", children: [
|
|
42345
42682
|
t2.from,
|
|
42346
42683
|
" \u2192 ",
|
|
@@ -42359,7 +42696,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42359
42696
|
] }, i)) })
|
|
42360
42697
|
] }),
|
|
42361
42698
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42362
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42699
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42363
42700
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42364
42701
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: g.name }),
|
|
42365
42702
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42465,7 +42802,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42465
42802
|
exports.EmptyState,
|
|
42466
42803
|
{
|
|
42467
42804
|
title: t("debug.noEntityData"),
|
|
42468
|
-
description: "
|
|
42805
|
+
description: t("debug.debugModeHint"),
|
|
42469
42806
|
className: "py-8"
|
|
42470
42807
|
}
|
|
42471
42808
|
);
|
|
@@ -42478,7 +42815,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42478
42815
|
exports.EmptyState,
|
|
42479
42816
|
{
|
|
42480
42817
|
title: t("debug.noEntities"),
|
|
42481
|
-
description: "
|
|
42818
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42482
42819
|
className: "py-8"
|
|
42483
42820
|
}
|
|
42484
42821
|
);
|
|
@@ -42486,7 +42823,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42486
42823
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42487
42824
|
id: `singleton-${name}`,
|
|
42488
42825
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42489
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "sm", children: "
|
|
42826
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42490
42827
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42491
42828
|
] }),
|
|
42492
42829
|
content: /* @__PURE__ */ jsxRuntime.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) })
|
|
@@ -42504,31 +42841,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42504
42841
|
}));
|
|
42505
42842
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42506
42843
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42507
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42508
|
-
"Singletons (",
|
|
42509
|
-
singletonItems.length,
|
|
42510
|
-
")"
|
|
42511
|
-
] }),
|
|
42844
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42512
42845
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: singletonItems, multiple: true })
|
|
42513
42846
|
] }),
|
|
42514
42847
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42515
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42516
|
-
"Runtime (",
|
|
42517
|
-
runtimeEntities.length,
|
|
42518
|
-
")"
|
|
42519
|
-
] }),
|
|
42848
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42520
42849
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: runtimeItems, multiple: true }),
|
|
42521
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.
|
|
42522
|
-
"+",
|
|
42523
|
-
runtimeEntities.length - 20,
|
|
42524
|
-
" more entities"
|
|
42525
|
-
] })
|
|
42850
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42526
42851
|
] }),
|
|
42527
42852
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42528
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42853
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42529
42854
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42530
42855
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: type }),
|
|
42531
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42856
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42532
42857
|
] }, type)) })
|
|
42533
42858
|
] })
|
|
42534
42859
|
] });
|
|
@@ -42572,7 +42897,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42572
42897
|
exports.EmptyState,
|
|
42573
42898
|
{
|
|
42574
42899
|
title: t("debug.noEventsYet"),
|
|
42575
|
-
description: "
|
|
42900
|
+
description: t("debug.eventsExecuteHint"),
|
|
42576
42901
|
className: "py-8"
|
|
42577
42902
|
}
|
|
42578
42903
|
);
|
|
@@ -42583,17 +42908,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42583
42908
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42584
42909
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42585
42910
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.ButtonGroup, { children: [
|
|
42586
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42911
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42587
42912
|
exports.Button,
|
|
42588
42913
|
{
|
|
42589
42914
|
size: "sm",
|
|
42590
42915
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42591
42916
|
onClick: () => setFilter("all"),
|
|
42592
|
-
children:
|
|
42593
|
-
"All (",
|
|
42594
|
-
events2.length,
|
|
42595
|
-
")"
|
|
42596
|
-
]
|
|
42917
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42597
42918
|
}
|
|
42598
42919
|
),
|
|
42599
42920
|
eventTypes.map((type) => {
|
|
@@ -42623,7 +42944,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42623
42944
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42624
42945
|
}
|
|
42625
42946
|
),
|
|
42626
|
-
"
|
|
42947
|
+
t("debug.autoScroll")
|
|
42627
42948
|
] })
|
|
42628
42949
|
] }),
|
|
42629
42950
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42681,7 +43002,7 @@ function GuardsPanel({ guards }) {
|
|
|
42681
43002
|
exports.EmptyState,
|
|
42682
43003
|
{
|
|
42683
43004
|
title: t("debug.noGuardEvaluations"),
|
|
42684
|
-
description: "
|
|
43005
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42685
43006
|
className: "py-8"
|
|
42686
43007
|
}
|
|
42687
43008
|
);
|
|
@@ -42712,15 +43033,15 @@ function GuardsPanel({ guards }) {
|
|
|
42712
43033
|
] }),
|
|
42713
43034
|
content: /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "sm", children: [
|
|
42714
43035
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42715
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43036
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42716
43037
|
/* @__PURE__ */ jsxRuntime.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 })
|
|
42717
43038
|
] }),
|
|
42718
43039
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42719
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43040
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42720
43041
|
/* @__PURE__ */ jsxRuntime.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) })
|
|
42721
43042
|
] }),
|
|
42722
43043
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42723
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43044
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42724
43045
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: guard.context.traitName })
|
|
42725
43046
|
] })
|
|
42726
43047
|
] })
|
|
@@ -42738,9 +43059,9 @@ function GuardsPanel({ guards }) {
|
|
|
42738
43059
|
] })
|
|
42739
43060
|
] }),
|
|
42740
43061
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.ButtonGroup, { children: [
|
|
42741
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42742
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42743
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
43062
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
43063
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
43064
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42744
43065
|
] })
|
|
42745
43066
|
] }),
|
|
42746
43067
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: accordionItems }) })
|
|
@@ -42866,7 +43187,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42866
43187
|
exports.EmptyState,
|
|
42867
43188
|
{
|
|
42868
43189
|
title: t("debug.noTransitionsRecorded"),
|
|
42869
|
-
description: "
|
|
43190
|
+
description: t("debug.transitionsProcessHint"),
|
|
42870
43191
|
className: "py-8"
|
|
42871
43192
|
}
|
|
42872
43193
|
);
|
|
@@ -42883,10 +43204,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42883
43204
|
const sorted = [...transitions].reverse();
|
|
42884
43205
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42885
43206
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42886
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42887
|
-
transitions.length,
|
|
42888
|
-
" transitions recorded"
|
|
42889
|
-
] }),
|
|
43207
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42890
43208
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42891
43209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42892
43210
|
exports.Checkbox,
|
|
@@ -42895,7 +43213,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42895
43213
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42896
43214
|
}
|
|
42897
43215
|
),
|
|
42898
|
-
"
|
|
43216
|
+
t("debug.autoScroll")
|
|
42899
43217
|
] })
|
|
42900
43218
|
] }),
|
|
42901
43219
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42938,15 +43256,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42938
43256
|
variant: trace.guardResult ? "success" : "danger",
|
|
42939
43257
|
size: "sm",
|
|
42940
43258
|
children: [
|
|
42941
|
-
"
|
|
43259
|
+
t("debug.guardLabel"),
|
|
43260
|
+
" ",
|
|
42942
43261
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42943
43262
|
]
|
|
42944
43263
|
}
|
|
42945
43264
|
),
|
|
42946
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42947
|
-
trace.effects.length,
|
|
42948
|
-
" effects"
|
|
42949
|
-
] })
|
|
43265
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42950
43266
|
] }),
|
|
42951
43267
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42952
43268
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
@@ -42995,13 +43311,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42995
43311
|
exports.EmptyState,
|
|
42996
43312
|
{
|
|
42997
43313
|
title: t("debug.noBridgeData"),
|
|
42998
|
-
description: "
|
|
43314
|
+
description: t("debug.bridgeInitHint"),
|
|
42999
43315
|
className: "py-8"
|
|
43000
43316
|
}
|
|
43001
43317
|
);
|
|
43002
43318
|
}
|
|
43003
43319
|
const formatTime4 = (ts) => {
|
|
43004
|
-
if (ts === 0) return "
|
|
43320
|
+
if (ts === 0) return t("debug.never");
|
|
43005
43321
|
const d = new Date(ts);
|
|
43006
43322
|
return d.toLocaleTimeString("en-US", {
|
|
43007
43323
|
hour12: false,
|
|
@@ -43014,14 +43330,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43014
43330
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Card, { className: "p-3", children: [
|
|
43015
43331
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
43016
43332
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
43017
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h6", children: bridge.connected ? "
|
|
43333
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
43018
43334
|
] }),
|
|
43019
43335
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "xs", children: [
|
|
43020
43336
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43021
43337
|
StatRow,
|
|
43022
43338
|
{
|
|
43023
43339
|
label: t("debug.status"),
|
|
43024
|
-
value: bridge.connected ? "
|
|
43340
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
43025
43341
|
variant: bridge.connected ? "success" : "danger"
|
|
43026
43342
|
}
|
|
43027
43343
|
),
|
|
@@ -43049,13 +43365,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43049
43365
|
] })
|
|
43050
43366
|
] }),
|
|
43051
43367
|
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(exports.Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
43052
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43368
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
43053
43369
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
43054
43370
|
] }),
|
|
43055
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.
|
|
43056
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
43057
|
-
" total events processed"
|
|
43058
|
-
] }) })
|
|
43371
|
+
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
43059
43372
|
] }) });
|
|
43060
43373
|
}
|
|
43061
43374
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43165,7 +43478,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43165
43478
|
exports.EmptyState,
|
|
43166
43479
|
{
|
|
43167
43480
|
title: t("debug.noActiveTraits"),
|
|
43168
|
-
description: "
|
|
43481
|
+
description: t("debug.traitsInitHint"),
|
|
43169
43482
|
className: "py-8"
|
|
43170
43483
|
}
|
|
43171
43484
|
);
|
|
@@ -43182,7 +43495,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43182
43495
|
};
|
|
43183
43496
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43184
43497
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43185
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43498
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
43186
43499
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Badge, { variant: "success", size: "sm", children: [
|
|
43187
43500
|
trait.name,
|
|
43188
43501
|
": ",
|
|
@@ -43190,8 +43503,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43190
43503
|
] }, trait.id)) })
|
|
43191
43504
|
] }),
|
|
43192
43505
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43193
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43194
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43506
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43507
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43195
43508
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43196
43509
|
exports.Button,
|
|
43197
43510
|
{
|
|
@@ -43203,15 +43516,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43203
43516
|
}
|
|
43204
43517
|
),
|
|
43205
43518
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43206
|
-
transitions.some((
|
|
43519
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43207
43520
|
] }, event)) })
|
|
43208
43521
|
] }),
|
|
43209
43522
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43210
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43523
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43211
43524
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
43212
43525
|
] }),
|
|
43213
43526
|
log18.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
43214
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43527
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43215
43528
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: log18.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43216
43529
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43217
43530
|
" ",
|
|
@@ -43242,21 +43555,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43242
43555
|
}
|
|
43243
43556
|
});
|
|
43244
43557
|
function ServerResponseRow({ sr }) {
|
|
43558
|
+
const { t } = useTranslate();
|
|
43245
43559
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43246
43560
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43247
43561
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43248
43562
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43249
43563
|
sr.success ? "\u2713" : "\u2717",
|
|
43250
|
-
"
|
|
43564
|
+
" ",
|
|
43565
|
+
t("debug.server")
|
|
43251
43566
|
] }),
|
|
43252
43567
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43253
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43254
|
-
sr.clientEffects,
|
|
43255
|
-
" clientEffect",
|
|
43256
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43257
|
-
] }),
|
|
43568
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
43258
43569
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43259
|
-
"
|
|
43570
|
+
t("debug.emitLabel"),
|
|
43571
|
+
" ",
|
|
43260
43572
|
sr.emittedEvents.join(", ")
|
|
43261
43573
|
] }),
|
|
43262
43574
|
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -43264,13 +43576,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43264
43576
|
entityEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
43265
43577
|
name,
|
|
43266
43578
|
": ",
|
|
43267
|
-
count
|
|
43268
|
-
" row",
|
|
43269
|
-
count !== 1 ? "s" : ""
|
|
43579
|
+
t("debug.rowsCount", { count })
|
|
43270
43580
|
] }, name)) })
|
|
43271
43581
|
] });
|
|
43272
43582
|
}
|
|
43273
43583
|
function TransitionRow({ trace }) {
|
|
43584
|
+
const { t } = useTranslate();
|
|
43274
43585
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43275
43586
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43276
43587
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43278,7 +43589,7 @@ function TransitionRow({ trace }) {
|
|
|
43278
43589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43279
43590
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43280
43591
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43281
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43592
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43282
43593
|
] }),
|
|
43283
43594
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43284
43595
|
] });
|
|
@@ -43319,6 +43630,7 @@ function VerifyModePanel({
|
|
|
43319
43630
|
serverCount,
|
|
43320
43631
|
localCount
|
|
43321
43632
|
}) {
|
|
43633
|
+
const { t } = useTranslate();
|
|
43322
43634
|
const [expanded, setExpanded] = React79__namespace.useState(true);
|
|
43323
43635
|
const scrollRef = React79__namespace.useRef(null);
|
|
43324
43636
|
const prevCountRef = React79__namespace.useRef(0);
|
|
@@ -43349,30 +43661,20 @@ function VerifyModePanel({
|
|
|
43349
43661
|
onClick: () => setExpanded((v) => !v),
|
|
43350
43662
|
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",
|
|
43351
43663
|
"aria-expanded": expanded,
|
|
43352
|
-
"aria-label": expanded ? "
|
|
43664
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43353
43665
|
"data-testid": "debugger-verify-toggle",
|
|
43354
43666
|
children: [
|
|
43355
43667
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43356
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43357
|
-
/* @__PURE__ */ jsxRuntime.
|
|
43358
|
-
|
|
43359
|
-
" local"
|
|
43360
|
-
] }),
|
|
43361
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43362
|
-
serverCount,
|
|
43363
|
-
" server"
|
|
43364
|
-
] }),
|
|
43668
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43669
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43670
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43365
43671
|
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43366
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43367
|
-
transitions.length,
|
|
43368
|
-
" transition",
|
|
43369
|
-
transitions.length !== 1 ? "s" : ""
|
|
43370
|
-
] })
|
|
43672
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43371
43673
|
]
|
|
43372
43674
|
}
|
|
43373
43675
|
),
|
|
43374
43676
|
expanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43375
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
43677
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsxRuntime.jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
43376
43678
|
/* @__PURE__ */ jsxRuntime.jsx(WalkMinimap, {})
|
|
43377
43679
|
] })
|
|
43378
43680
|
]
|
|
@@ -43388,6 +43690,7 @@ function RuntimeDebugger({
|
|
|
43388
43690
|
defaultTab,
|
|
43389
43691
|
schema
|
|
43390
43692
|
}) {
|
|
43693
|
+
const { t } = useTranslate();
|
|
43391
43694
|
const [isCollapsed, setIsCollapsed] = React79__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43392
43695
|
const [isVisible, setIsVisible] = React79__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43393
43696
|
const debugData = useDebugData();
|
|
@@ -43426,55 +43729,55 @@ function RuntimeDebugger({
|
|
|
43426
43729
|
const tabItems = [
|
|
43427
43730
|
{
|
|
43428
43731
|
id: "dispatch",
|
|
43429
|
-
label: "
|
|
43732
|
+
label: t("debug.tabDispatch"),
|
|
43430
43733
|
badge: debugData.traits.length || void 0,
|
|
43431
43734
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43432
43735
|
},
|
|
43433
43736
|
{
|
|
43434
43737
|
id: "verify",
|
|
43435
|
-
label: failedChecks > 0 ? "
|
|
43738
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43436
43739
|
badge: verification.summary.totalChecks || void 0,
|
|
43437
43740
|
content: /* @__PURE__ */ jsxRuntime.jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43438
43741
|
},
|
|
43439
43742
|
{
|
|
43440
43743
|
id: "timeline",
|
|
43441
|
-
label: "
|
|
43744
|
+
label: t("debug.tabTimeline"),
|
|
43442
43745
|
badge: verification.transitions.length || void 0,
|
|
43443
43746
|
content: /* @__PURE__ */ jsxRuntime.jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43444
43747
|
},
|
|
43445
43748
|
{
|
|
43446
43749
|
id: "bridge",
|
|
43447
|
-
label: "
|
|
43750
|
+
label: t("debug.tabBridge"),
|
|
43448
43751
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43449
43752
|
content: /* @__PURE__ */ jsxRuntime.jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43450
43753
|
},
|
|
43451
43754
|
{
|
|
43452
43755
|
id: "traits",
|
|
43453
|
-
label: "
|
|
43756
|
+
label: t("debug.tabTraits"),
|
|
43454
43757
|
badge: debugData.traits.length || void 0,
|
|
43455
43758
|
content: /* @__PURE__ */ jsxRuntime.jsx(TraitsTab, { traits: debugData.traits })
|
|
43456
43759
|
},
|
|
43457
43760
|
{
|
|
43458
43761
|
id: "ticks",
|
|
43459
|
-
label: "
|
|
43460
|
-
badge: debugData.ticks.filter((
|
|
43762
|
+
label: t("debug.tabTicks"),
|
|
43763
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43461
43764
|
content: /* @__PURE__ */ jsxRuntime.jsx(TicksTab, { ticks: debugData.ticks })
|
|
43462
43765
|
},
|
|
43463
43766
|
{
|
|
43464
43767
|
id: "entities",
|
|
43465
|
-
label: "
|
|
43768
|
+
label: t("debug.tabEntities"),
|
|
43466
43769
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43467
43770
|
content: /* @__PURE__ */ jsxRuntime.jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43468
43771
|
},
|
|
43469
43772
|
{
|
|
43470
43773
|
id: "events",
|
|
43471
|
-
label: "
|
|
43774
|
+
label: t("debug.tabEvents"),
|
|
43472
43775
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43473
43776
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventFlowTab, { events: debugData.events })
|
|
43474
43777
|
},
|
|
43475
43778
|
{
|
|
43476
43779
|
id: "guards",
|
|
43477
|
-
label: "
|
|
43780
|
+
label: t("debug.tabGuards"),
|
|
43478
43781
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43479
43782
|
content: /* @__PURE__ */ jsxRuntime.jsx(GuardsPanel, { guards: debugData.guards })
|
|
43480
43783
|
}
|
|
@@ -43502,15 +43805,10 @@ function RuntimeDebugger({
|
|
|
43502
43805
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43503
43806
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43504
43807
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43505
|
-
"
|
|
43808
|
+
" ",
|
|
43809
|
+
t("debug.debugger")
|
|
43506
43810
|
] }),
|
|
43507
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43508
|
-
failedChecks,
|
|
43509
|
-
" failed"
|
|
43510
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(exports.Badge, { variant: "success", size: "sm", children: [
|
|
43511
|
-
debugData.traits.length,
|
|
43512
|
-
" traits"
|
|
43513
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43811
|
+
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
43514
43812
|
] })
|
|
43515
43813
|
}
|
|
43516
43814
|
),
|
|
@@ -43528,9 +43826,9 @@ function RuntimeDebugger({
|
|
|
43528
43826
|
);
|
|
43529
43827
|
}
|
|
43530
43828
|
if (mode === "verify") {
|
|
43531
|
-
const traitStates = debugData.traits.map((
|
|
43532
|
-
const serverEntries = verification.transitions.filter((
|
|
43533
|
-
const localEntries = verification.transitions.filter((
|
|
43829
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43830
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43831
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43534
43832
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43535
43833
|
VerifyModePanel,
|
|
43536
43834
|
{
|
|
@@ -43562,7 +43860,7 @@ function RuntimeDebugger({
|
|
|
43562
43860
|
variant: "secondary",
|
|
43563
43861
|
size: "sm",
|
|
43564
43862
|
className: "runtime-debugger__toggle",
|
|
43565
|
-
title: "
|
|
43863
|
+
title: t("debug.openDebugger"),
|
|
43566
43864
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
43567
43865
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
43568
43866
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43572,11 +43870,8 @@ function RuntimeDebugger({
|
|
|
43572
43870
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43573
43871
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43574
43872
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg", children: "V" }),
|
|
43575
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h6", children: "
|
|
43576
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43577
|
-
failedChecks,
|
|
43578
|
-
" failed"
|
|
43579
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43873
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43874
|
+
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
43580
43875
|
] }),
|
|
43581
43876
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43582
43877
|
exports.Button,
|
|
@@ -43584,7 +43879,7 @@ function RuntimeDebugger({
|
|
|
43584
43879
|
onClick: () => setIsCollapsed(true),
|
|
43585
43880
|
variant: "ghost",
|
|
43586
43881
|
size: "sm",
|
|
43587
|
-
title: "
|
|
43882
|
+
title: t("debug.close"),
|
|
43588
43883
|
children: "x"
|
|
43589
43884
|
}
|
|
43590
43885
|
)
|
|
@@ -43598,7 +43893,7 @@ function RuntimeDebugger({
|
|
|
43598
43893
|
className: "runtime-debugger__tabs"
|
|
43599
43894
|
}
|
|
43600
43895
|
) }),
|
|
43601
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43896
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43602
43897
|
] })
|
|
43603
43898
|
}
|
|
43604
43899
|
);
|
|
@@ -43624,6 +43919,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43624
43919
|
init_TransitionTimeline();
|
|
43625
43920
|
init_ServerBridgeTab();
|
|
43626
43921
|
init_EventDispatcherTab();
|
|
43922
|
+
init_useTranslate();
|
|
43627
43923
|
init_RuntimeDebugger();
|
|
43628
43924
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43629
43925
|
}
|
|
@@ -45023,7 +45319,7 @@ var init_StatCard = __esm({
|
|
|
45023
45319
|
}
|
|
45024
45320
|
);
|
|
45025
45321
|
}
|
|
45026
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45322
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
45027
45323
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
45028
45324
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
45029
45325
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45066,7 +45362,7 @@ var init_StatCard = __esm({
|
|
|
45066
45362
|
]
|
|
45067
45363
|
}
|
|
45068
45364
|
),
|
|
45069
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45365
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
45070
45366
|
] }),
|
|
45071
45367
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45072
45368
|
] }),
|