@almadar/ui 5.21.7 → 5.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +970 -650
- package/dist/avl/index.js +970 -650
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +675 -370
- package/dist/components/index.js +675 -370
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +675 -370
- package/dist/providers/index.js +675 -370
- package/dist/runtime/index.cjs +675 -370
- package/dist/runtime/index.js +675 -370
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
|
@@ -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
|
)
|
|
@@ -12956,9 +13250,18 @@ var init_MarkdownContent = __esm({
|
|
|
12956
13250
|
);
|
|
12957
13251
|
}
|
|
12958
13252
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12959
|
-
"
|
|
13253
|
+
"code",
|
|
12960
13254
|
{
|
|
13255
|
+
...props,
|
|
13256
|
+
className: codeClassName,
|
|
12961
13257
|
style: {
|
|
13258
|
+
backgroundColor: "var(--color-muted)",
|
|
13259
|
+
color: "var(--color-foreground)",
|
|
13260
|
+
border: "1px solid var(--color-border)",
|
|
13261
|
+
padding: "0.125rem 0.375rem",
|
|
13262
|
+
borderRadius: "0.25rem",
|
|
13263
|
+
fontSize: "0.875em",
|
|
13264
|
+
fontFamily: "ui-monospace, monospace",
|
|
12962
13265
|
whiteSpace: "pre-wrap",
|
|
12963
13266
|
wordBreak: "break-word"
|
|
12964
13267
|
},
|
|
@@ -13381,7 +13684,7 @@ var init_StateMachineView = __esm({
|
|
|
13381
13684
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13382
13685
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13383
13686
|
const isSingle2 = bundle.labels.length === 1;
|
|
13384
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
13687
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13385
13688
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
13386
13689
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
13387
13690
|
const cx = fromState.x;
|
|
@@ -13507,7 +13810,7 @@ var init_StateMachineView = __esm({
|
|
|
13507
13810
|
const controlX = midX + perpX;
|
|
13508
13811
|
const controlY = midY + perpY;
|
|
13509
13812
|
const isSingle = bundle.labels.length === 1;
|
|
13510
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
13813
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13511
13814
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
13512
13815
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
13513
13816
|
const curveMidpoint = {
|
|
@@ -13662,7 +13965,7 @@ var init_StateMachineView = __esm({
|
|
|
13662
13965
|
{
|
|
13663
13966
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
13664
13967
|
style: { backgroundColor: "var(--color-success)" },
|
|
13665
|
-
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") })
|
|
13666
13969
|
}
|
|
13667
13970
|
),
|
|
13668
13971
|
!isSingle && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13684,10 +13987,7 @@ var init_StateMachineView = __esm({
|
|
|
13684
13987
|
{
|
|
13685
13988
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
13686
13989
|
style: { backgroundColor: "var(--color-accent)" },
|
|
13687
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
13688
|
-
bundle.labels.length,
|
|
13689
|
-
" events"
|
|
13690
|
-
] })
|
|
13990
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
13691
13991
|
}
|
|
13692
13992
|
)
|
|
13693
13993
|
]
|
|
@@ -13832,7 +14132,7 @@ var init_StateMachineView = __esm({
|
|
|
13832
14132
|
align: "center",
|
|
13833
14133
|
className: "mb-2",
|
|
13834
14134
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
13835
|
-
children: "
|
|
14135
|
+
children: t("stateMachine.externalEffects")
|
|
13836
14136
|
}
|
|
13837
14137
|
),
|
|
13838
14138
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13852,10 +14152,10 @@ var init_StateMachineView = __esm({
|
|
|
13852
14152
|
Legend = ({ config, y }) => {
|
|
13853
14153
|
const { t } = useTranslate();
|
|
13854
14154
|
const items = [
|
|
13855
|
-
{ label: "
|
|
13856
|
-
{ label: "
|
|
13857
|
-
{ label: "
|
|
13858
|
-
{ 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 }
|
|
13859
14159
|
];
|
|
13860
14160
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13861
14161
|
exports.HStack,
|
|
@@ -13870,8 +14170,8 @@ var init_StateMachineView = __esm({
|
|
|
13870
14170
|
{
|
|
13871
14171
|
className: "w-3 h-3 rounded-full",
|
|
13872
14172
|
style: {
|
|
13873
|
-
backgroundColor: item.
|
|
13874
|
-
border: item.
|
|
14173
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
14174
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
13875
14175
|
}
|
|
13876
14176
|
}
|
|
13877
14177
|
),
|
|
@@ -13883,7 +14183,7 @@ var init_StateMachineView = __esm({
|
|
|
13883
14183
|
children: item.label
|
|
13884
14184
|
}
|
|
13885
14185
|
)
|
|
13886
|
-
] }, item.
|
|
14186
|
+
] }, item.key))
|
|
13887
14187
|
}
|
|
13888
14188
|
);
|
|
13889
14189
|
};
|
|
@@ -14677,13 +14977,13 @@ var init_JazariStateMachine = __esm({
|
|
|
14677
14977
|
);
|
|
14678
14978
|
}, [resolvedTrait, entityFields]);
|
|
14679
14979
|
if (isLoading) {
|
|
14680
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.LoadingState, { message: "
|
|
14980
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.LoadingState, { message: t("stateMachine.loading") });
|
|
14681
14981
|
}
|
|
14682
14982
|
if (error) {
|
|
14683
14983
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
14684
14984
|
}
|
|
14685
14985
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
14686
|
-
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") }) });
|
|
14687
14987
|
}
|
|
14688
14988
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14689
14989
|
exports.StateMachineView,
|
|
@@ -15727,13 +16027,13 @@ var init_LayoutPatterns = __esm({
|
|
|
15727
16027
|
function generateRuleId() {
|
|
15728
16028
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
15729
16029
|
}
|
|
15730
|
-
function questionsToOptions(questions,
|
|
16030
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
15731
16031
|
const opts = questions.map((q) => ({
|
|
15732
16032
|
value: q.id,
|
|
15733
16033
|
label: q.label
|
|
15734
16034
|
}));
|
|
15735
|
-
if (
|
|
15736
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
16035
|
+
if (endOfSurveyLabel !== null) {
|
|
16036
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
15737
16037
|
}
|
|
15738
16038
|
return opts;
|
|
15739
16039
|
}
|
|
@@ -15742,7 +16042,7 @@ function isRuleBroken(rule, questions) {
|
|
|
15742
16042
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
15743
16043
|
return !sourceExists || !targetExists;
|
|
15744
16044
|
}
|
|
15745
|
-
var END_OF_SURVEY,
|
|
16045
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph; exports.BranchingLogicBuilder = void 0;
|
|
15746
16046
|
var init_BranchingLogicBuilder = __esm({
|
|
15747
16047
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
15748
16048
|
"use client";
|
|
@@ -15755,14 +16055,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15755
16055
|
init_FilterPill();
|
|
15756
16056
|
init_Box();
|
|
15757
16057
|
init_useEventBus();
|
|
16058
|
+
init_useTranslate();
|
|
15758
16059
|
init_cn();
|
|
15759
16060
|
END_OF_SURVEY = "end-of-survey";
|
|
15760
|
-
OPERATOR_OPTIONS = [
|
|
15761
|
-
{ value: "equals", label: "equals" },
|
|
15762
|
-
{ value: "not-equals", label: "does not equal" },
|
|
15763
|
-
{ value: "contains", label: "contains" },
|
|
15764
|
-
{ value: "in", label: "is one of" }
|
|
15765
|
-
];
|
|
15766
16061
|
RuleRow = ({
|
|
15767
16062
|
rule,
|
|
15768
16063
|
questions,
|
|
@@ -15771,8 +16066,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15771
16066
|
onChange,
|
|
15772
16067
|
onDelete
|
|
15773
16068
|
}) => {
|
|
15774
|
-
const
|
|
15775
|
-
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
|
+
);
|
|
15776
16084
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
15777
16085
|
const valueOptions = React79.useMemo(() => {
|
|
15778
16086
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -15817,22 +16125,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15817
16125
|
),
|
|
15818
16126
|
children: [
|
|
15819
16127
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
15820
|
-
/* @__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") }),
|
|
15821
16129
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15822
16130
|
exports.Select,
|
|
15823
16131
|
{
|
|
15824
16132
|
options: sourceOptions,
|
|
15825
16133
|
value: rule.sourceQuestionId,
|
|
15826
|
-
placeholder: "
|
|
16134
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
15827
16135
|
onChange: handleSource,
|
|
15828
16136
|
disabled: readOnly,
|
|
15829
|
-
error: broken ? "
|
|
16137
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
15830
16138
|
}
|
|
15831
16139
|
) }),
|
|
15832
16140
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15833
16141
|
exports.Select,
|
|
15834
16142
|
{
|
|
15835
|
-
options:
|
|
16143
|
+
options: operatorOptions,
|
|
15836
16144
|
value: rule.operator,
|
|
15837
16145
|
onChange: handleOperator,
|
|
15838
16146
|
disabled: readOnly
|
|
@@ -15855,7 +16163,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15855
16163
|
{
|
|
15856
16164
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
15857
16165
|
value: "",
|
|
15858
|
-
placeholder: "
|
|
16166
|
+
placeholder: t("branchingLogic.addValue"),
|
|
15859
16167
|
onChange: handleAddChip,
|
|
15860
16168
|
disabled: readOnly
|
|
15861
16169
|
}
|
|
@@ -15863,7 +16171,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15863
16171
|
exports.Input,
|
|
15864
16172
|
{
|
|
15865
16173
|
inputType: "text",
|
|
15866
|
-
placeholder: "
|
|
16174
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
15867
16175
|
value: "",
|
|
15868
16176
|
onKeyDown: (e) => {
|
|
15869
16177
|
if (e.key !== "Enter") return;
|
|
@@ -15881,7 +16189,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15881
16189
|
{
|
|
15882
16190
|
options: valueOptions,
|
|
15883
16191
|
value: scalarValue,
|
|
15884
|
-
placeholder: "
|
|
16192
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
15885
16193
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
15886
16194
|
disabled: readOnly
|
|
15887
16195
|
}
|
|
@@ -15889,7 +16197,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15889
16197
|
exports.Input,
|
|
15890
16198
|
{
|
|
15891
16199
|
inputType: "text",
|
|
15892
|
-
placeholder: "
|
|
16200
|
+
placeholder: t("branchingLogic.value"),
|
|
15893
16201
|
value: scalarValue,
|
|
15894
16202
|
onChange: handleScalarValue,
|
|
15895
16203
|
disabled: readOnly
|
|
@@ -15897,17 +16205,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15897
16205
|
) }),
|
|
15898
16206
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
15899
16207
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ArrowRight, { className: "h-4 w-4" }),
|
|
15900
|
-
"
|
|
16208
|
+
t("branchingLogic.goTo")
|
|
15901
16209
|
] }),
|
|
15902
16210
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15903
16211
|
exports.Select,
|
|
15904
16212
|
{
|
|
15905
16213
|
options: targetOptions,
|
|
15906
16214
|
value: rule.targetQuestionId,
|
|
15907
|
-
placeholder: "
|
|
16215
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
15908
16216
|
onChange: handleTarget,
|
|
15909
16217
|
disabled: readOnly,
|
|
15910
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
16218
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
15911
16219
|
}
|
|
15912
16220
|
) }),
|
|
15913
16221
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15919,11 +16227,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15919
16227
|
action: "DELETE_RULE",
|
|
15920
16228
|
actionPayload: { ruleId: rule.id },
|
|
15921
16229
|
onClick: onDelete,
|
|
15922
|
-
"aria-label": "
|
|
16230
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
15923
16231
|
}
|
|
15924
16232
|
)
|
|
15925
16233
|
] }),
|
|
15926
|
-
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") })
|
|
15927
16235
|
]
|
|
15928
16236
|
}
|
|
15929
16237
|
);
|
|
@@ -15933,10 +16241,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15933
16241
|
NODE_GAP_Y = 80;
|
|
15934
16242
|
PADDING = 32;
|
|
15935
16243
|
LogicGraph = ({ questions, rules }) => {
|
|
16244
|
+
const { t } = useTranslate();
|
|
16245
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
15936
16246
|
const layout = React79.useMemo(() => {
|
|
15937
16247
|
const items = [
|
|
15938
16248
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
15939
|
-
{ id: END_OF_SURVEY, label:
|
|
16249
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
15940
16250
|
];
|
|
15941
16251
|
const positions = {};
|
|
15942
16252
|
items.forEach((item, i) => {
|
|
@@ -15948,14 +16258,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15948
16258
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
15949
16259
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
15950
16260
|
return { items, positions, width, height };
|
|
15951
|
-
}, [questions]);
|
|
16261
|
+
}, [questions, endOfSurveyLabel]);
|
|
15952
16262
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15953
16263
|
"svg",
|
|
15954
16264
|
{
|
|
15955
16265
|
width: layout.width,
|
|
15956
16266
|
height: layout.height,
|
|
15957
16267
|
role: "img",
|
|
15958
|
-
"aria-label": "
|
|
16268
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
15959
16269
|
style: { display: "block" },
|
|
15960
16270
|
children: [
|
|
15961
16271
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16063,6 +16373,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16063
16373
|
readOnly = false,
|
|
16064
16374
|
className
|
|
16065
16375
|
}) => {
|
|
16376
|
+
const { t } = useTranslate();
|
|
16066
16377
|
const eventBus = useEventBus();
|
|
16067
16378
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
16068
16379
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -16115,16 +16426,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16115
16426
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
16116
16427
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center gap-2", children: [
|
|
16117
16428
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
16118
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "subheading", weight: "semibold", children: "
|
|
16429
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
16119
16430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16120
16431
|
exports.Badge,
|
|
16121
16432
|
{
|
|
16122
16433
|
variant: "neutral",
|
|
16123
16434
|
size: "sm",
|
|
16124
|
-
label:
|
|
16435
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
16125
16436
|
}
|
|
16126
16437
|
),
|
|
16127
|
-
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
|
+
)
|
|
16128
16446
|
] }),
|
|
16129
16447
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
16130
16448
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16135,7 +16453,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16135
16453
|
leftIcon: LucideIcons2.Pencil,
|
|
16136
16454
|
action: "VIEW_EDIT",
|
|
16137
16455
|
onClick: () => setView("edit"),
|
|
16138
|
-
children: "
|
|
16456
|
+
children: t("branchingLogic.rules")
|
|
16139
16457
|
}
|
|
16140
16458
|
),
|
|
16141
16459
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16146,13 +16464,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16146
16464
|
leftIcon: LucideIcons2.Eye,
|
|
16147
16465
|
action: "VIEW_GRAPH",
|
|
16148
16466
|
onClick: () => setView("graph"),
|
|
16149
|
-
children: "
|
|
16467
|
+
children: t("branchingLogic.logicGraph")
|
|
16150
16468
|
}
|
|
16151
16469
|
)
|
|
16152
16470
|
] })
|
|
16153
16471
|
] }),
|
|
16154
16472
|
view === "edit" ? /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-col gap-2", children: [
|
|
16155
|
-
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(
|
|
16156
16474
|
RuleRow,
|
|
16157
16475
|
{
|
|
16158
16476
|
rule,
|
|
@@ -16173,7 +16491,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16173
16491
|
action: "ADD_RULE",
|
|
16174
16492
|
onClick: handleAddRule,
|
|
16175
16493
|
disabled: noQuestions,
|
|
16176
|
-
children: "
|
|
16494
|
+
children: t("branchingLogic.addRule")
|
|
16177
16495
|
}
|
|
16178
16496
|
) })
|
|
16179
16497
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(LogicGraph, { questions, rules })
|
|
@@ -16800,7 +17118,7 @@ function CalendarGrid({
|
|
|
16800
17118
|
onClick: stepPrev,
|
|
16801
17119
|
"aria-disabled": !canPrev || void 0,
|
|
16802
17120
|
"aria-label": t("aria.previousDays"),
|
|
16803
|
-
children: "
|
|
17121
|
+
children: t("nav.previous")
|
|
16804
17122
|
}
|
|
16805
17123
|
),
|
|
16806
17124
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -16813,7 +17131,7 @@ function CalendarGrid({
|
|
|
16813
17131
|
onClick: stepNext,
|
|
16814
17132
|
"aria-disabled": !canNext || void 0,
|
|
16815
17133
|
"aria-label": t("aria.nextDays"),
|
|
16816
|
-
children: "
|
|
17134
|
+
children: t("nav.next")
|
|
16817
17135
|
}
|
|
16818
17136
|
)
|
|
16819
17137
|
] }),
|
|
@@ -18363,7 +18681,7 @@ var init_Pagination = __esm({
|
|
|
18363
18681
|
type: "number",
|
|
18364
18682
|
value: jumpToPage,
|
|
18365
18683
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
18366
|
-
placeholder: "
|
|
18684
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
18367
18685
|
className: "w-20",
|
|
18368
18686
|
onKeyDown: (e) => {
|
|
18369
18687
|
if (e.key === "Enter") {
|
|
@@ -18501,13 +18819,10 @@ var init_CardGrid = __esm({
|
|
|
18501
18819
|
return children;
|
|
18502
18820
|
}
|
|
18503
18821
|
if (isLoading) {
|
|
18504
|
-
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") }) });
|
|
18505
18823
|
}
|
|
18506
18824
|
if (error) {
|
|
18507
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsxRuntime.
|
|
18508
|
-
"Error loading items: ",
|
|
18509
|
-
error.message
|
|
18510
|
-
] }) });
|
|
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 }) }) });
|
|
18511
18826
|
}
|
|
18512
18827
|
if (normalizedData.length === 0) {
|
|
18513
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" }) });
|
|
@@ -22604,7 +22919,7 @@ function DataGrid({
|
|
|
22604
22919
|
onChange: () => toggleSelection(id),
|
|
22605
22920
|
onClick: (e) => e.stopPropagation(),
|
|
22606
22921
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
22607
|
-
"aria-label":
|
|
22922
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
22608
22923
|
}
|
|
22609
22924
|
),
|
|
22610
22925
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -22802,7 +23117,7 @@ function formatDate3(value) {
|
|
|
22802
23117
|
if (isNaN(d.getTime())) return String(value);
|
|
22803
23118
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
22804
23119
|
}
|
|
22805
|
-
function formatValue2(value, format) {
|
|
23120
|
+
function formatValue2(value, format, boolLabels) {
|
|
22806
23121
|
if (value === void 0 || value === null) return "";
|
|
22807
23122
|
switch (format) {
|
|
22808
23123
|
case "date":
|
|
@@ -22814,7 +23129,7 @@ function formatValue2(value, format) {
|
|
|
22814
23129
|
case "percent":
|
|
22815
23130
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
22816
23131
|
case "boolean":
|
|
22817
|
-
return value ? "Yes" : "No";
|
|
23132
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
22818
23133
|
default:
|
|
22819
23134
|
return String(value);
|
|
22820
23135
|
}
|
|
@@ -23110,7 +23425,7 @@ function DataList({
|
|
|
23110
23425
|
field.label ?? fieldLabel3(field.name),
|
|
23111
23426
|
":"
|
|
23112
23427
|
] }),
|
|
23113
|
-
/* @__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") }) })
|
|
23114
23429
|
] }, field.name);
|
|
23115
23430
|
}) }),
|
|
23116
23431
|
progressFields.map((field) => {
|
|
@@ -23240,6 +23555,7 @@ var init_FileTree = __esm({
|
|
|
23240
23555
|
init_Box();
|
|
23241
23556
|
init_Typography();
|
|
23242
23557
|
init_Icon();
|
|
23558
|
+
init_useTranslate();
|
|
23243
23559
|
TreeNodeItem = ({
|
|
23244
23560
|
node,
|
|
23245
23561
|
depth,
|
|
@@ -23325,8 +23641,9 @@ var init_FileTree = __esm({
|
|
|
23325
23641
|
className,
|
|
23326
23642
|
indent = 16
|
|
23327
23643
|
}) => {
|
|
23644
|
+
const { t } = useTranslate();
|
|
23328
23645
|
if (tree.length === 0) {
|
|
23329
|
-
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") }) });
|
|
23330
23647
|
}
|
|
23331
23648
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23332
23649
|
TreeNodeItem,
|
|
@@ -23453,6 +23770,7 @@ var init_FilterGroup = __esm({
|
|
|
23453
23770
|
init_Icon();
|
|
23454
23771
|
init_useEventBus();
|
|
23455
23772
|
init_useQuerySingleton();
|
|
23773
|
+
init_useTranslate();
|
|
23456
23774
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
23457
23775
|
lookStyles6 = {
|
|
23458
23776
|
toolbar: "",
|
|
@@ -23473,6 +23791,7 @@ var init_FilterGroup = __esm({
|
|
|
23473
23791
|
isLoading,
|
|
23474
23792
|
look = "toolbar"
|
|
23475
23793
|
}) => {
|
|
23794
|
+
const { t } = useTranslate();
|
|
23476
23795
|
const eventBus = useEventBus();
|
|
23477
23796
|
const queryState = useQuerySingleton(query);
|
|
23478
23797
|
const [selectedValues, setSelectedValues] = React79.useState(
|
|
@@ -23554,7 +23873,7 @@ var init_FilterGroup = __esm({
|
|
|
23554
23873
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
23555
23874
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
23556
23875
|
),
|
|
23557
|
-
children: "
|
|
23876
|
+
children: t("filterGroup.all")
|
|
23558
23877
|
}
|
|
23559
23878
|
),
|
|
23560
23879
|
filter.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23582,7 +23901,7 @@ var init_FilterGroup = __esm({
|
|
|
23582
23901
|
size: "sm",
|
|
23583
23902
|
onClick: handleClearAll,
|
|
23584
23903
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23585
|
-
children: "
|
|
23904
|
+
children: t("filterGroup.clear")
|
|
23586
23905
|
}
|
|
23587
23906
|
)
|
|
23588
23907
|
]
|
|
@@ -23593,7 +23912,7 @@ var init_FilterGroup = __esm({
|
|
|
23593
23912
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
23594
23913
|
showIcon && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23595
23914
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23596
|
-
/* @__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") })
|
|
23597
23916
|
] }),
|
|
23598
23917
|
filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
23599
23918
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -23616,7 +23935,7 @@ var init_FilterGroup = __esm({
|
|
|
23616
23935
|
`${filter.field}_from`,
|
|
23617
23936
|
e.target.value || null
|
|
23618
23937
|
),
|
|
23619
|
-
placeholder: "
|
|
23938
|
+
placeholder: t("filterGroup.from"),
|
|
23620
23939
|
clearable: true,
|
|
23621
23940
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
23622
23941
|
}
|
|
@@ -23630,7 +23949,7 @@ var init_FilterGroup = __esm({
|
|
|
23630
23949
|
`${filter.field}_to`,
|
|
23631
23950
|
e.target.value || null
|
|
23632
23951
|
),
|
|
23633
|
-
placeholder: "
|
|
23952
|
+
placeholder: t("filterGroup.to"),
|
|
23634
23953
|
clearable: true,
|
|
23635
23954
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
23636
23955
|
}
|
|
@@ -23650,7 +23969,7 @@ var init_FilterGroup = __esm({
|
|
|
23650
23969
|
value: selectedValues[filter.field] || "all",
|
|
23651
23970
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23652
23971
|
options: [
|
|
23653
|
-
{ value: "all", label: "
|
|
23972
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23654
23973
|
...filter.options?.map((opt) => ({
|
|
23655
23974
|
value: opt,
|
|
23656
23975
|
label: opt
|
|
@@ -23667,7 +23986,7 @@ var init_FilterGroup = __esm({
|
|
|
23667
23986
|
onClick: handleClearAll,
|
|
23668
23987
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23669
23988
|
className: "self-start",
|
|
23670
|
-
children: "
|
|
23989
|
+
children: t("filterGroup.clearAll")
|
|
23671
23990
|
}
|
|
23672
23991
|
)
|
|
23673
23992
|
] });
|
|
@@ -23733,7 +24052,7 @@ var init_FilterGroup = __esm({
|
|
|
23733
24052
|
value: selectedValues[filter.field] || "all",
|
|
23734
24053
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23735
24054
|
options: [
|
|
23736
|
-
{ value: "all", label:
|
|
24055
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23737
24056
|
...filter.options?.map((opt) => ({
|
|
23738
24057
|
value: opt,
|
|
23739
24058
|
label: opt
|
|
@@ -23762,7 +24081,7 @@ var init_FilterGroup = __esm({
|
|
|
23762
24081
|
field
|
|
23763
24082
|
);
|
|
23764
24083
|
}),
|
|
23765
|
-
/* @__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") })
|
|
23766
24085
|
] })
|
|
23767
24086
|
]
|
|
23768
24087
|
}
|
|
@@ -23787,7 +24106,7 @@ var init_FilterGroup = __esm({
|
|
|
23787
24106
|
className: "text-muted-foreground",
|
|
23788
24107
|
children: [
|
|
23789
24108
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23790
|
-
/* @__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") })
|
|
23791
24110
|
]
|
|
23792
24111
|
}
|
|
23793
24112
|
),
|
|
@@ -23813,7 +24132,7 @@ var init_FilterGroup = __esm({
|
|
|
23813
24132
|
`${filter.field}_from`,
|
|
23814
24133
|
e.target.value || null
|
|
23815
24134
|
),
|
|
23816
|
-
placeholder: "
|
|
24135
|
+
placeholder: t("filterGroup.from"),
|
|
23817
24136
|
clearable: true,
|
|
23818
24137
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
23819
24138
|
className: "min-w-[130px]"
|
|
@@ -23829,7 +24148,7 @@ var init_FilterGroup = __esm({
|
|
|
23829
24148
|
`${filter.field}_to`,
|
|
23830
24149
|
e.target.value || null
|
|
23831
24150
|
),
|
|
23832
|
-
placeholder: "
|
|
24151
|
+
placeholder: t("filterGroup.to"),
|
|
23833
24152
|
clearable: true,
|
|
23834
24153
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
23835
24154
|
className: "min-w-[130px]"
|
|
@@ -23851,7 +24170,7 @@ var init_FilterGroup = __esm({
|
|
|
23851
24170
|
value: selectedValues[filter.field] || "all",
|
|
23852
24171
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23853
24172
|
options: [
|
|
23854
|
-
{ value: "all", label: "
|
|
24173
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23855
24174
|
...filter.options?.map((opt) => ({
|
|
23856
24175
|
value: opt,
|
|
23857
24176
|
label: opt
|
|
@@ -23862,10 +24181,7 @@ var init_FilterGroup = __esm({
|
|
|
23862
24181
|
)
|
|
23863
24182
|
] }, filter.field)),
|
|
23864
24183
|
activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
23865
|
-
/* @__PURE__ */ jsxRuntime.
|
|
23866
|
-
activeFilterCount,
|
|
23867
|
-
" active"
|
|
23868
|
-
] }),
|
|
24184
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
23869
24185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23870
24186
|
exports.Button,
|
|
23871
24187
|
{
|
|
@@ -23873,7 +24189,7 @@ var init_FilterGroup = __esm({
|
|
|
23873
24189
|
size: "sm",
|
|
23874
24190
|
onClick: handleClearAll,
|
|
23875
24191
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23876
|
-
children: "
|
|
24192
|
+
children: t("filterGroup.clearAll")
|
|
23877
24193
|
}
|
|
23878
24194
|
)
|
|
23879
24195
|
] })
|
|
@@ -25068,19 +25384,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25068
25384
|
exports.RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25069
25385
|
}
|
|
25070
25386
|
});
|
|
25071
|
-
var
|
|
25387
|
+
var actionTypeLabelKeys, actionTypeIcons; exports.ViolationAlert = void 0;
|
|
25072
25388
|
var init_ViolationAlert = __esm({
|
|
25073
25389
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25074
25390
|
init_cn();
|
|
25391
|
+
init_useTranslate();
|
|
25075
25392
|
init_Box();
|
|
25076
25393
|
init_Stack();
|
|
25077
25394
|
init_Typography();
|
|
25078
25395
|
init_Button();
|
|
25079
25396
|
init_Icon();
|
|
25080
|
-
|
|
25081
|
-
measure: "
|
|
25082
|
-
admin: "
|
|
25083
|
-
penalty: "
|
|
25397
|
+
actionTypeLabelKeys = {
|
|
25398
|
+
measure: "violationAlert.actionType.measure",
|
|
25399
|
+
admin: "violationAlert.actionType.admin",
|
|
25400
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25084
25401
|
};
|
|
25085
25402
|
actionTypeIcons = {
|
|
25086
25403
|
measure: "alert-triangle",
|
|
@@ -25097,10 +25414,11 @@ var init_ViolationAlert = __esm({
|
|
|
25097
25414
|
className,
|
|
25098
25415
|
...flatProps
|
|
25099
25416
|
}) => {
|
|
25417
|
+
const { t } = useTranslate();
|
|
25100
25418
|
const resolvedViolation = violation ?? {
|
|
25101
25419
|
law: "",
|
|
25102
25420
|
article: "",
|
|
25103
|
-
message: flatProps.message ?? "
|
|
25421
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25104
25422
|
actionType: "measure"
|
|
25105
25423
|
};
|
|
25106
25424
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25185,7 +25503,7 @@ var init_ViolationAlert = __esm({
|
|
|
25185
25503
|
{
|
|
25186
25504
|
variant: "caption",
|
|
25187
25505
|
className: cn(textColor, "opacity-75"),
|
|
25188
|
-
children:
|
|
25506
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25189
25507
|
}
|
|
25190
25508
|
)
|
|
25191
25509
|
] })
|
|
@@ -25216,7 +25534,7 @@ var init_ViolationAlert = __esm({
|
|
|
25216
25534
|
{
|
|
25217
25535
|
variant: "caption",
|
|
25218
25536
|
className: cn(textColor, "opacity-75"),
|
|
25219
|
-
children: "
|
|
25537
|
+
children: t("violationAlert.adminLabel")
|
|
25220
25538
|
}
|
|
25221
25539
|
),
|
|
25222
25540
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25235,7 +25553,7 @@ var init_ViolationAlert = __esm({
|
|
|
25235
25553
|
{
|
|
25236
25554
|
variant: "caption",
|
|
25237
25555
|
className: cn(textColor, "opacity-75"),
|
|
25238
|
-
children: "
|
|
25556
|
+
children: t("violationAlert.penaltyLabel")
|
|
25239
25557
|
}
|
|
25240
25558
|
),
|
|
25241
25559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25260,7 +25578,7 @@ var init_ViolationAlert = __esm({
|
|
|
25260
25578
|
className: cn(textColor, "self-start"),
|
|
25261
25579
|
children: [
|
|
25262
25580
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25263
|
-
"
|
|
25581
|
+
t("violationAlert.goToField")
|
|
25264
25582
|
]
|
|
25265
25583
|
}
|
|
25266
25584
|
)
|
|
@@ -25576,6 +25894,7 @@ var init_LineChart = __esm({
|
|
|
25576
25894
|
"use client";
|
|
25577
25895
|
init_cn();
|
|
25578
25896
|
init_atoms2();
|
|
25897
|
+
init_useTranslate();
|
|
25579
25898
|
exports.LineChart = ({
|
|
25580
25899
|
data,
|
|
25581
25900
|
width = 400,
|
|
@@ -25587,6 +25906,7 @@ var init_LineChart = __esm({
|
|
|
25587
25906
|
areaColor = "var(--color-primary)",
|
|
25588
25907
|
className
|
|
25589
25908
|
}) => {
|
|
25909
|
+
const { t } = useTranslate();
|
|
25590
25910
|
const gradientId = React79.useId();
|
|
25591
25911
|
const safeData = data ?? [];
|
|
25592
25912
|
const sortedData = React79.useMemo(() => {
|
|
@@ -25623,7 +25943,7 @@ var init_LineChart = __esm({
|
|
|
25623
25943
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
25624
25944
|
}, [linePath, points, height, showArea]);
|
|
25625
25945
|
if (safeData.length === 0) {
|
|
25626
|
-
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") });
|
|
25627
25947
|
}
|
|
25628
25948
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25629
25949
|
"svg",
|
|
@@ -27814,6 +28134,7 @@ var init_GraphView = __esm({
|
|
|
27814
28134
|
"use client";
|
|
27815
28135
|
init_cn();
|
|
27816
28136
|
init_atoms2();
|
|
28137
|
+
init_useTranslate();
|
|
27817
28138
|
GROUP_COLORS = [
|
|
27818
28139
|
"#3b82f6",
|
|
27819
28140
|
// blue-500
|
|
@@ -27846,6 +28167,7 @@ var init_GraphView = __esm({
|
|
|
27846
28167
|
showLabels = true,
|
|
27847
28168
|
zoomToFit = true
|
|
27848
28169
|
}) => {
|
|
28170
|
+
const { t } = useTranslate();
|
|
27849
28171
|
const containerRef = React79.useRef(null);
|
|
27850
28172
|
const animRef = React79.useRef(0);
|
|
27851
28173
|
const [simNodes, setSimNodes] = React79.useState([]);
|
|
@@ -28023,7 +28345,7 @@ var init_GraphView = __esm({
|
|
|
28023
28345
|
[onNodeClick]
|
|
28024
28346
|
);
|
|
28025
28347
|
if (nodes.length === 0) {
|
|
28026
|
-
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") }) });
|
|
28027
28349
|
}
|
|
28028
28350
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28029
28351
|
exports.Box,
|
|
@@ -28479,11 +28801,12 @@ var init_UploadDropZone = __esm({
|
|
|
28479
28801
|
init_Icon();
|
|
28480
28802
|
init_Typography();
|
|
28481
28803
|
init_useEventBus();
|
|
28804
|
+
init_useTranslate();
|
|
28482
28805
|
exports.UploadDropZone = ({
|
|
28483
28806
|
accept,
|
|
28484
28807
|
maxSize,
|
|
28485
28808
|
maxFiles = 1,
|
|
28486
|
-
label
|
|
28809
|
+
label,
|
|
28487
28810
|
description,
|
|
28488
28811
|
disabled = false,
|
|
28489
28812
|
action,
|
|
@@ -28491,22 +28814,24 @@ var init_UploadDropZone = __esm({
|
|
|
28491
28814
|
onFiles,
|
|
28492
28815
|
className
|
|
28493
28816
|
}) => {
|
|
28817
|
+
const { t } = useTranslate();
|
|
28818
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28494
28819
|
const [isDragOver, setIsDragOver] = React79.useState(false);
|
|
28495
28820
|
const [error, setError] = React79.useState(null);
|
|
28496
28821
|
const inputRef = React79.useRef(null);
|
|
28497
28822
|
const eventBus = useSafeEventBus7();
|
|
28498
28823
|
const defaultDescription = [
|
|
28499
|
-
accept ?
|
|
28500
|
-
maxSize ?
|
|
28501
|
-
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
|
|
28502
28827
|
].filter(Boolean).join(". ");
|
|
28503
28828
|
const validateFiles = React79.useCallback(
|
|
28504
28829
|
(files) => {
|
|
28505
28830
|
if (files.length > maxFiles) {
|
|
28506
|
-
return { valid: [], error:
|
|
28831
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28507
28832
|
}
|
|
28508
28833
|
if (accept) {
|
|
28509
|
-
const acceptedTypes = accept.split(",").map((
|
|
28834
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28510
28835
|
const invalid = files.filter((file) => {
|
|
28511
28836
|
return !acceptedTypes.some((type) => {
|
|
28512
28837
|
if (type.endsWith("/*")) {
|
|
@@ -28516,7 +28841,7 @@ var init_UploadDropZone = __esm({
|
|
|
28516
28841
|
});
|
|
28517
28842
|
});
|
|
28518
28843
|
if (invalid.length > 0) {
|
|
28519
|
-
return { valid: [], error:
|
|
28844
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28520
28845
|
}
|
|
28521
28846
|
}
|
|
28522
28847
|
if (maxSize) {
|
|
@@ -28524,13 +28849,13 @@ var init_UploadDropZone = __esm({
|
|
|
28524
28849
|
if (tooLarge.length > 0) {
|
|
28525
28850
|
return {
|
|
28526
28851
|
valid: [],
|
|
28527
|
-
error:
|
|
28852
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28528
28853
|
};
|
|
28529
28854
|
}
|
|
28530
28855
|
}
|
|
28531
28856
|
return { valid: files, error: null };
|
|
28532
28857
|
},
|
|
28533
|
-
[accept, maxSize, maxFiles]
|
|
28858
|
+
[accept, maxSize, maxFiles, t]
|
|
28534
28859
|
);
|
|
28535
28860
|
const handleFiles = React79.useCallback(
|
|
28536
28861
|
(files) => {
|
|
@@ -28601,7 +28926,7 @@ var init_UploadDropZone = __esm({
|
|
|
28601
28926
|
handleClick();
|
|
28602
28927
|
}
|
|
28603
28928
|
},
|
|
28604
|
-
"aria-label":
|
|
28929
|
+
"aria-label": resolvedLabel,
|
|
28605
28930
|
children: [
|
|
28606
28931
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28607
28932
|
"input",
|
|
@@ -28617,7 +28942,7 @@ var init_UploadDropZone = __esm({
|
|
|
28617
28942
|
}
|
|
28618
28943
|
),
|
|
28619
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" }),
|
|
28620
|
-
/* @__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 }),
|
|
28621
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 })
|
|
28622
28947
|
]
|
|
28623
28948
|
}
|
|
@@ -29039,7 +29364,7 @@ function TableView({
|
|
|
29039
29364
|
{
|
|
29040
29365
|
checked: selected.has(id),
|
|
29041
29366
|
onChange: () => toggleRow(id),
|
|
29042
|
-
"aria-label":
|
|
29367
|
+
"aria-label": t("table.selectRow", { id })
|
|
29043
29368
|
}
|
|
29044
29369
|
) }),
|
|
29045
29370
|
hasRenderProp ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -31886,7 +32211,7 @@ var init_QrScanner = __esm({
|
|
|
31886
32211
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
31887
32212
|
children: [
|
|
31888
32213
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
31889
|
-
/* @__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") }),
|
|
31890
32215
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
31891
32216
|
]
|
|
31892
32217
|
}
|
|
@@ -31897,7 +32222,7 @@ var init_QrScanner = __esm({
|
|
|
31897
32222
|
position: "absolute",
|
|
31898
32223
|
display: "flex",
|
|
31899
32224
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
31900
|
-
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") })
|
|
31901
32226
|
}
|
|
31902
32227
|
),
|
|
31903
32228
|
showCameraControls && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -31916,7 +32241,7 @@ var init_QrScanner = __esm({
|
|
|
31916
32241
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31917
32242
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31918
32243
|
),
|
|
31919
|
-
"aria-label": isPaused ? "
|
|
32244
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
31920
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" })
|
|
31921
32246
|
}
|
|
31922
32247
|
),
|
|
@@ -31929,7 +32254,7 @@ var init_QrScanner = __esm({
|
|
|
31929
32254
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31930
32255
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31931
32256
|
),
|
|
31932
|
-
"aria-label":
|
|
32257
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
31933
32258
|
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31934
32259
|
}
|
|
31935
32260
|
),
|
|
@@ -31943,7 +32268,7 @@ var init_QrScanner = __esm({
|
|
|
31943
32268
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31944
32269
|
),
|
|
31945
32270
|
"aria-label": t("aria.mockScanDev"),
|
|
31946
|
-
children: "
|
|
32271
|
+
children: t("qrScanner.mockScan")
|
|
31947
32272
|
}
|
|
31948
32273
|
)
|
|
31949
32274
|
]
|
|
@@ -31961,6 +32286,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31961
32286
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
31962
32287
|
init_cn();
|
|
31963
32288
|
init_useEventBus();
|
|
32289
|
+
init_useTranslate();
|
|
31964
32290
|
init_Typography();
|
|
31965
32291
|
init_Box();
|
|
31966
32292
|
init_Label();
|
|
@@ -31970,36 +32296,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31970
32296
|
const sign = delta >= 0 ? "+" : "-";
|
|
31971
32297
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
31972
32298
|
};
|
|
31973
|
-
constraintHint = (constraint) => {
|
|
32299
|
+
constraintHint = (constraint, t) => {
|
|
31974
32300
|
if (constraint.type === "single") {
|
|
31975
|
-
return constraint.required ? "
|
|
32301
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
31976
32302
|
}
|
|
31977
32303
|
const { min, max } = constraint;
|
|
31978
32304
|
if (min && max) {
|
|
31979
|
-
return min === max ?
|
|
32305
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
31980
32306
|
}
|
|
31981
|
-
if (min) return
|
|
31982
|
-
if (max) return
|
|
31983
|
-
return "
|
|
32307
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32308
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32309
|
+
return t("optionConstraint.optional");
|
|
31984
32310
|
};
|
|
31985
|
-
validateSelection = (selected, constraint) => {
|
|
32311
|
+
validateSelection = (selected, constraint, t) => {
|
|
31986
32312
|
if (constraint.type === "single") {
|
|
31987
32313
|
if (constraint.required && selected.length === 0) {
|
|
31988
|
-
return "
|
|
32314
|
+
return t("optionConstraint.error.pickOne");
|
|
31989
32315
|
}
|
|
31990
32316
|
if (selected.length > 1) {
|
|
31991
|
-
return "
|
|
32317
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
31992
32318
|
}
|
|
31993
32319
|
return void 0;
|
|
31994
32320
|
}
|
|
31995
32321
|
const { min, max } = constraint;
|
|
31996
32322
|
if (min !== void 0 && selected.length < min) {
|
|
31997
32323
|
const remaining = min - selected.length;
|
|
31998
|
-
return
|
|
32324
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
31999
32325
|
}
|
|
32000
32326
|
if (max !== void 0 && selected.length > max) {
|
|
32001
32327
|
const excess = selected.length - max;
|
|
32002
|
-
return
|
|
32328
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32003
32329
|
}
|
|
32004
32330
|
return void 0;
|
|
32005
32331
|
};
|
|
@@ -32016,8 +32342,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32016
32342
|
className
|
|
32017
32343
|
}) => {
|
|
32018
32344
|
const eventBus = useEventBus();
|
|
32019
|
-
const
|
|
32020
|
-
const
|
|
32345
|
+
const { t } = useTranslate();
|
|
32346
|
+
const hint = constraintHint(constraint, t);
|
|
32347
|
+
const error = validateSelection(selected, constraint, t);
|
|
32021
32348
|
const inputName = `option-${groupId}`;
|
|
32022
32349
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32023
32350
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32117,7 +32444,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32117
32444
|
variant: "caption",
|
|
32118
32445
|
color: "warning",
|
|
32119
32446
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32120
|
-
children: "
|
|
32447
|
+
children: t("optionConstraint.outOfStock")
|
|
32121
32448
|
}
|
|
32122
32449
|
)
|
|
32123
32450
|
]
|
|
@@ -32439,6 +32766,7 @@ function changeBlockType(block, type) {
|
|
|
32439
32766
|
return { id: block.id, type, content: seed };
|
|
32440
32767
|
}
|
|
32441
32768
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32769
|
+
const { t } = useTranslate();
|
|
32442
32770
|
const [open, setOpen] = React79.useState(false);
|
|
32443
32771
|
const ref = React79.useRef(null);
|
|
32444
32772
|
React79.useEffect(() => {
|
|
@@ -32458,7 +32786,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32458
32786
|
{
|
|
32459
32787
|
type: "button",
|
|
32460
32788
|
variant: "ghost",
|
|
32461
|
-
"aria-label": "
|
|
32789
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32462
32790
|
className: cn(
|
|
32463
32791
|
"inline-flex items-center justify-center",
|
|
32464
32792
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32480,7 +32808,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32480
32808
|
"py-1 text-sm"
|
|
32481
32809
|
),
|
|
32482
32810
|
children: [
|
|
32483
|
-
/* @__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]) }),
|
|
32484
32812
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32485
32813
|
exports.Button,
|
|
32486
32814
|
{
|
|
@@ -32494,7 +32822,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32494
32822
|
},
|
|
32495
32823
|
children: [
|
|
32496
32824
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32497
|
-
"
|
|
32825
|
+
" ",
|
|
32826
|
+
t("richBlockEditor.duplicate")
|
|
32498
32827
|
]
|
|
32499
32828
|
}
|
|
32500
32829
|
),
|
|
@@ -32511,14 +32840,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32511
32840
|
},
|
|
32512
32841
|
children: [
|
|
32513
32842
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32514
|
-
"
|
|
32843
|
+
" ",
|
|
32844
|
+
t("common.delete")
|
|
32515
32845
|
]
|
|
32516
32846
|
}
|
|
32517
32847
|
),
|
|
32518
32848
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32519
32849
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "my-1 border-t border-border" }),
|
|
32520
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32521
|
-
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(
|
|
32522
32852
|
exports.Button,
|
|
32523
32853
|
{
|
|
32524
32854
|
type: "button",
|
|
@@ -32526,12 +32856,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32526
32856
|
role: "menuitem",
|
|
32527
32857
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32528
32858
|
onClick: () => {
|
|
32529
|
-
onChangeType(
|
|
32859
|
+
onChangeType(bt);
|
|
32530
32860
|
setOpen(false);
|
|
32531
32861
|
},
|
|
32532
|
-
children:
|
|
32862
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32533
32863
|
},
|
|
32534
|
-
|
|
32864
|
+
bt
|
|
32535
32865
|
))
|
|
32536
32866
|
] })
|
|
32537
32867
|
]
|
|
@@ -32593,6 +32923,7 @@ function BlockRow({
|
|
|
32593
32923
|
onInsertAfter,
|
|
32594
32924
|
onChangeType
|
|
32595
32925
|
}) {
|
|
32926
|
+
const { t } = useTranslate();
|
|
32596
32927
|
const setContent = React79.useCallback(
|
|
32597
32928
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32598
32929
|
[onUpdate]
|
|
@@ -32642,8 +32973,8 @@ function BlockRow({
|
|
|
32642
32973
|
tag: "h1",
|
|
32643
32974
|
value: block.content ?? "",
|
|
32644
32975
|
readOnly,
|
|
32645
|
-
placeholder: placeholder ?? "
|
|
32646
|
-
ariaLabel: "
|
|
32976
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
32977
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32647
32978
|
className: "text-3xl font-bold leading-tight",
|
|
32648
32979
|
onValueChange: setContent
|
|
32649
32980
|
}
|
|
@@ -32655,8 +32986,8 @@ function BlockRow({
|
|
|
32655
32986
|
tag: "h2",
|
|
32656
32987
|
value: block.content ?? "",
|
|
32657
32988
|
readOnly,
|
|
32658
|
-
placeholder: placeholder ?? "
|
|
32659
|
-
ariaLabel: "
|
|
32989
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
32990
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32660
32991
|
className: "text-2xl font-semibold leading-tight",
|
|
32661
32992
|
onValueChange: setContent
|
|
32662
32993
|
}
|
|
@@ -32668,8 +32999,8 @@ function BlockRow({
|
|
|
32668
32999
|
tag: "h3",
|
|
32669
33000
|
value: block.content ?? "",
|
|
32670
33001
|
readOnly,
|
|
32671
|
-
placeholder: placeholder ?? "
|
|
32672
|
-
ariaLabel: "
|
|
33002
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33003
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32673
33004
|
className: "text-xl font-semibold leading-tight",
|
|
32674
33005
|
onValueChange: setContent
|
|
32675
33006
|
}
|
|
@@ -32681,8 +33012,8 @@ function BlockRow({
|
|
|
32681
33012
|
tag: "blockquote",
|
|
32682
33013
|
value: block.content ?? "",
|
|
32683
33014
|
readOnly,
|
|
32684
|
-
placeholder: placeholder ?? "
|
|
32685
|
-
ariaLabel: "
|
|
33015
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33016
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32686
33017
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32687
33018
|
onValueChange: setContent
|
|
32688
33019
|
}
|
|
@@ -32690,13 +33021,13 @@ function BlockRow({
|
|
|
32690
33021
|
case "code":
|
|
32691
33022
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32692
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: [
|
|
32693
|
-
/* @__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") }),
|
|
32694
33025
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32695
33026
|
exports.Input,
|
|
32696
33027
|
{
|
|
32697
33028
|
inputType: "text",
|
|
32698
33029
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32699
|
-
"aria-label": "
|
|
33030
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32700
33031
|
className: cn(
|
|
32701
33032
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32702
33033
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32712,8 +33043,8 @@ function BlockRow({
|
|
|
32712
33043
|
tag: "pre",
|
|
32713
33044
|
value: block.content ?? "",
|
|
32714
33045
|
readOnly,
|
|
32715
|
-
placeholder: placeholder ?? "
|
|
32716
|
-
ariaLabel: "
|
|
33046
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33047
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32717
33048
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32718
33049
|
onValueChange: setContent
|
|
32719
33050
|
}
|
|
@@ -32726,7 +33057,7 @@ function BlockRow({
|
|
|
32726
33057
|
const caption = String(block.metadata?.caption ?? "");
|
|
32727
33058
|
const imgProps = {
|
|
32728
33059
|
src: url,
|
|
32729
|
-
alt: caption || "
|
|
33060
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32730
33061
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32731
33062
|
};
|
|
32732
33063
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "space-y-2", children: [
|
|
@@ -32740,7 +33071,8 @@ function BlockRow({
|
|
|
32740
33071
|
),
|
|
32741
33072
|
children: [
|
|
32742
33073
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32743
|
-
"
|
|
33074
|
+
" ",
|
|
33075
|
+
t("richBlockEditor.noImageUrl")
|
|
32744
33076
|
]
|
|
32745
33077
|
}
|
|
32746
33078
|
),
|
|
@@ -32751,7 +33083,7 @@ function BlockRow({
|
|
|
32751
33083
|
inputType: "url",
|
|
32752
33084
|
value: url,
|
|
32753
33085
|
placeholder: "https://example.com/image.png",
|
|
32754
|
-
"aria-label": "
|
|
33086
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32755
33087
|
className: cn(
|
|
32756
33088
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32757
33089
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32764,8 +33096,8 @@ function BlockRow({
|
|
|
32764
33096
|
{
|
|
32765
33097
|
inputType: "text",
|
|
32766
33098
|
value: caption,
|
|
32767
|
-
placeholder: "
|
|
32768
|
-
"aria-label": "
|
|
33099
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33100
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32769
33101
|
className: cn(
|
|
32770
33102
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32771
33103
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32796,8 +33128,8 @@ function BlockRow({
|
|
|
32796
33128
|
tag: "span",
|
|
32797
33129
|
value: child.content ?? "",
|
|
32798
33130
|
readOnly,
|
|
32799
|
-
placeholder: "
|
|
32800
|
-
ariaLabel: "
|
|
33131
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33132
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
32801
33133
|
className: "inline-block min-w-[1ch] flex-1",
|
|
32802
33134
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
32803
33135
|
}
|
|
@@ -32807,7 +33139,7 @@ function BlockRow({
|
|
|
32807
33139
|
{
|
|
32808
33140
|
type: "button",
|
|
32809
33141
|
variant: "ghost",
|
|
32810
|
-
"aria-label": "
|
|
33142
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
32811
33143
|
className: cn(
|
|
32812
33144
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
32813
33145
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -32829,7 +33161,8 @@ function BlockRow({
|
|
|
32829
33161
|
onClick: addListItem,
|
|
32830
33162
|
children: [
|
|
32831
33163
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "plus", className: "w-3 h-3" }),
|
|
32832
|
-
"
|
|
33164
|
+
" ",
|
|
33165
|
+
t("richBlockEditor.addItem")
|
|
32833
33166
|
]
|
|
32834
33167
|
}
|
|
32835
33168
|
) })
|
|
@@ -32845,8 +33178,8 @@ function BlockRow({
|
|
|
32845
33178
|
tag: "p",
|
|
32846
33179
|
value: block.content ?? "",
|
|
32847
33180
|
readOnly,
|
|
32848
|
-
placeholder: placeholder ?? "
|
|
32849
|
-
ariaLabel: "
|
|
33181
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33182
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
32850
33183
|
className: "leading-7",
|
|
32851
33184
|
onValueChange: setContent
|
|
32852
33185
|
}
|
|
@@ -32869,7 +33202,7 @@ function BlockRow({
|
|
|
32869
33202
|
{
|
|
32870
33203
|
type: "button",
|
|
32871
33204
|
variant: "ghost",
|
|
32872
|
-
"aria-label": "
|
|
33205
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
32873
33206
|
className: cn(
|
|
32874
33207
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
32875
33208
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -32896,7 +33229,7 @@ function BlockRow({
|
|
|
32896
33229
|
}
|
|
32897
33230
|
);
|
|
32898
33231
|
}
|
|
32899
|
-
var TOOLBAR_ENTRIES,
|
|
33232
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES; exports.RichBlockEditor = void 0;
|
|
32900
33233
|
var init_RichBlockEditor = __esm({
|
|
32901
33234
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
32902
33235
|
"use client";
|
|
@@ -32909,29 +33242,30 @@ var init_RichBlockEditor = __esm({
|
|
|
32909
33242
|
init_Input();
|
|
32910
33243
|
init_Icon();
|
|
32911
33244
|
init_useEventBus();
|
|
33245
|
+
init_useTranslate();
|
|
32912
33246
|
TOOLBAR_ENTRIES = [
|
|
32913
|
-
{ type: "paragraph",
|
|
32914
|
-
{ type: "heading-1",
|
|
32915
|
-
{ type: "heading-2",
|
|
32916
|
-
{ type: "heading-3",
|
|
32917
|
-
{ type: "bullet-list",
|
|
32918
|
-
{ type: "numbered-list",
|
|
32919
|
-
{ type: "quote",
|
|
32920
|
-
{ type: "code",
|
|
32921
|
-
{ type: "divider",
|
|
32922
|
-
{ 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 }
|
|
32923
33257
|
];
|
|
32924
|
-
|
|
32925
|
-
paragraph: "
|
|
32926
|
-
"heading-1": "
|
|
32927
|
-
"heading-2": "
|
|
32928
|
-
"heading-3": "
|
|
32929
|
-
"bullet-list": "
|
|
32930
|
-
"numbered-list": "
|
|
32931
|
-
quote: "
|
|
32932
|
-
code: "
|
|
32933
|
-
divider: "
|
|
32934
|
-
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"
|
|
32935
33269
|
};
|
|
32936
33270
|
CHANGEABLE_TYPES = [
|
|
32937
33271
|
"paragraph",
|
|
@@ -32965,6 +33299,7 @@ var init_RichBlockEditor = __esm({
|
|
|
32965
33299
|
showToolbar = true,
|
|
32966
33300
|
className
|
|
32967
33301
|
}) => {
|
|
33302
|
+
const { t } = useTranslate();
|
|
32968
33303
|
const [blocks, setBlocks] = React79.useState(
|
|
32969
33304
|
() => normalizeBlocks(initialBlocks)
|
|
32970
33305
|
);
|
|
@@ -33036,25 +33371,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33036
33371
|
exports.Box,
|
|
33037
33372
|
{
|
|
33038
33373
|
role: "toolbar",
|
|
33039
|
-
"aria-label": "
|
|
33374
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33040
33375
|
className: cn(
|
|
33041
33376
|
"flex flex-wrap items-center gap-1",
|
|
33042
33377
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33043
33378
|
),
|
|
33044
33379
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33045
33380
|
const Icon3 = entry.icon;
|
|
33381
|
+
const entryLabel = t(entry.labelKey);
|
|
33046
33382
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33047
33383
|
exports.Button,
|
|
33048
33384
|
{
|
|
33049
33385
|
type: "button",
|
|
33050
33386
|
variant: "ghost",
|
|
33051
33387
|
size: "sm",
|
|
33052
|
-
"aria-label":
|
|
33053
|
-
title:
|
|
33388
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33389
|
+
title: entryLabel,
|
|
33054
33390
|
onClick: () => handleAppend(entry.type),
|
|
33055
33391
|
children: [
|
|
33056
33392
|
/* @__PURE__ */ jsxRuntime.jsx(Icon3, { size: 14 }),
|
|
33057
|
-
/* @__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 })
|
|
33058
33394
|
]
|
|
33059
33395
|
},
|
|
33060
33396
|
entry.type
|
|
@@ -33097,6 +33433,7 @@ var init_ReplyTree = __esm({
|
|
|
33097
33433
|
"use client";
|
|
33098
33434
|
init_cn();
|
|
33099
33435
|
init_useEventBus();
|
|
33436
|
+
init_useTranslate();
|
|
33100
33437
|
init_atoms2();
|
|
33101
33438
|
init_VoteStack();
|
|
33102
33439
|
ReplyTreeNode = ({
|
|
@@ -33116,6 +33453,7 @@ var init_ReplyTree = __esm({
|
|
|
33116
33453
|
showActions
|
|
33117
33454
|
}) => {
|
|
33118
33455
|
const eventBus = useEventBus();
|
|
33456
|
+
const { t } = useTranslate();
|
|
33119
33457
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33120
33458
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33121
33459
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33162,7 +33500,7 @@ var init_ReplyTree = __esm({
|
|
|
33162
33500
|
variant: "ghost",
|
|
33163
33501
|
size: "sm",
|
|
33164
33502
|
onClick: handleToggle,
|
|
33165
|
-
"aria-label": isCollapsed ? "
|
|
33503
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33166
33504
|
"aria-expanded": !isCollapsed,
|
|
33167
33505
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33168
33506
|
className: cn(
|
|
@@ -33203,7 +33541,7 @@ var init_ReplyTree = __esm({
|
|
|
33203
33541
|
onVote: handleVote,
|
|
33204
33542
|
size: "sm",
|
|
33205
33543
|
variant: "horizontal",
|
|
33206
|
-
label:
|
|
33544
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33207
33545
|
}
|
|
33208
33546
|
),
|
|
33209
33547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33213,8 +33551,8 @@ var init_ReplyTree = __esm({
|
|
|
33213
33551
|
size: "sm",
|
|
33214
33552
|
leftIcon: "message-square",
|
|
33215
33553
|
onClick: handleReply,
|
|
33216
|
-
"aria-label":
|
|
33217
|
-
children: "
|
|
33554
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33555
|
+
children: t("replyTree.reply")
|
|
33218
33556
|
}
|
|
33219
33557
|
),
|
|
33220
33558
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33224,8 +33562,8 @@ var init_ReplyTree = __esm({
|
|
|
33224
33562
|
size: "sm",
|
|
33225
33563
|
leftIcon: "flag",
|
|
33226
33564
|
onClick: handleFlag,
|
|
33227
|
-
"aria-label":
|
|
33228
|
-
children: "
|
|
33565
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33566
|
+
children: t("replyTree.flag")
|
|
33229
33567
|
}
|
|
33230
33568
|
)
|
|
33231
33569
|
] }),
|
|
@@ -33236,9 +33574,9 @@ var init_ReplyTree = __esm({
|
|
|
33236
33574
|
inputType: "textarea",
|
|
33237
33575
|
rows: 2,
|
|
33238
33576
|
value: draft,
|
|
33239
|
-
placeholder:
|
|
33577
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33240
33578
|
onChange: (e) => setDraft(e.target.value),
|
|
33241
|
-
"aria-label":
|
|
33579
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33242
33580
|
}
|
|
33243
33581
|
),
|
|
33244
33582
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33250,10 +33588,10 @@ var init_ReplyTree = __esm({
|
|
|
33250
33588
|
leftIcon: "send",
|
|
33251
33589
|
onClick: handleSubmitReply,
|
|
33252
33590
|
disabled: !draft.trim(),
|
|
33253
|
-
children: "
|
|
33591
|
+
children: t("replyTree.send")
|
|
33254
33592
|
}
|
|
33255
33593
|
),
|
|
33256
|
-
/* @__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") })
|
|
33257
33595
|
] })
|
|
33258
33596
|
] }),
|
|
33259
33597
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33267,7 +33605,7 @@ var init_ReplyTree = __esm({
|
|
|
33267
33605
|
"self-start gap-1 px-0 h-auto",
|
|
33268
33606
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33269
33607
|
),
|
|
33270
|
-
children: "
|
|
33608
|
+
children: t("replyTree.continueThread")
|
|
33271
33609
|
}
|
|
33272
33610
|
) : /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33273
33611
|
ReplyTreeNode,
|
|
@@ -33306,6 +33644,7 @@ var init_ReplyTree = __esm({
|
|
|
33306
33644
|
showActions = true,
|
|
33307
33645
|
className
|
|
33308
33646
|
}) => {
|
|
33647
|
+
const { t } = useTranslate();
|
|
33309
33648
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33310
33649
|
const [collapsedSet, setCollapsedSet] = React79.useState(() => {
|
|
33311
33650
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33324,7 +33663,7 @@ var init_ReplyTree = __esm({
|
|
|
33324
33663
|
});
|
|
33325
33664
|
}, []);
|
|
33326
33665
|
if (nodeList.length === 0) {
|
|
33327
|
-
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") });
|
|
33328
33667
|
}
|
|
33329
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(
|
|
33330
33669
|
ReplyTreeNode,
|
|
@@ -33402,6 +33741,7 @@ var init_VersionDiff = __esm({
|
|
|
33402
33741
|
"use client";
|
|
33403
33742
|
init_cn();
|
|
33404
33743
|
init_useEventBus();
|
|
33744
|
+
init_useTranslate();
|
|
33405
33745
|
init_atoms2();
|
|
33406
33746
|
init_Stack();
|
|
33407
33747
|
INLINE_STYLES = {
|
|
@@ -33424,6 +33764,7 @@ var init_VersionDiff = __esm({
|
|
|
33424
33764
|
language,
|
|
33425
33765
|
className
|
|
33426
33766
|
}) => {
|
|
33767
|
+
const { t } = useTranslate();
|
|
33427
33768
|
const eventBus = useEventBus();
|
|
33428
33769
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33429
33770
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33505,24 +33846,24 @@ var init_VersionDiff = __esm({
|
|
|
33505
33846
|
children: [
|
|
33506
33847
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33507
33848
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33508
|
-
/* @__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") }),
|
|
33509
33850
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33510
33851
|
exports.Select,
|
|
33511
33852
|
{
|
|
33512
33853
|
options,
|
|
33513
33854
|
value: activeBeforeId,
|
|
33514
33855
|
onChange: handleBeforeChange,
|
|
33515
|
-
"aria-label": "
|
|
33856
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33516
33857
|
}
|
|
33517
33858
|
) }),
|
|
33518
|
-
/* @__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") }),
|
|
33519
33860
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33520
33861
|
exports.Select,
|
|
33521
33862
|
{
|
|
33522
33863
|
options,
|
|
33523
33864
|
value: activeAfterId,
|
|
33524
33865
|
onChange: handleAfterChange,
|
|
33525
|
-
"aria-label": "
|
|
33866
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33526
33867
|
}
|
|
33527
33868
|
) }),
|
|
33528
33869
|
language && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", children: language }),
|
|
@@ -33543,7 +33884,7 @@ var init_VersionDiff = __esm({
|
|
|
33543
33884
|
size: "sm",
|
|
33544
33885
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33545
33886
|
onClick: handleViewToggle,
|
|
33546
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
33887
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33547
33888
|
}
|
|
33548
33889
|
),
|
|
33549
33890
|
(onRevert || revertEvent) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33553,7 +33894,7 @@ var init_VersionDiff = __esm({
|
|
|
33553
33894
|
size: "sm",
|
|
33554
33895
|
icon: "rotate-ccw",
|
|
33555
33896
|
onClick: handleRevert,
|
|
33556
|
-
children: "
|
|
33897
|
+
children: t("versionDiff.revert")
|
|
33557
33898
|
}
|
|
33558
33899
|
)
|
|
33559
33900
|
] })
|
|
@@ -33570,12 +33911,12 @@ var init_VersionDiff = __esm({
|
|
|
33570
33911
|
children: [
|
|
33571
33912
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33572
33913
|
beforeRev?.label,
|
|
33573
|
-
beforeRev?.author ?
|
|
33914
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33574
33915
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33575
33916
|
] }),
|
|
33576
33917
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33577
33918
|
afterRev?.label,
|
|
33578
|
-
afterRev?.author ?
|
|
33919
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33579
33920
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33580
33921
|
] })
|
|
33581
33922
|
]
|
|
@@ -33968,10 +34309,12 @@ var init_DocPagination = __esm({
|
|
|
33968
34309
|
}
|
|
33969
34310
|
});
|
|
33970
34311
|
function DocSearch({
|
|
33971
|
-
placeholder
|
|
34312
|
+
placeholder,
|
|
33972
34313
|
onSearch,
|
|
33973
34314
|
className
|
|
33974
34315
|
}) {
|
|
34316
|
+
const { t } = useTranslate();
|
|
34317
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
33975
34318
|
const [query, setQuery] = React79.useState("");
|
|
33976
34319
|
const [results, setResults] = React79.useState([]);
|
|
33977
34320
|
const [isOpen, setIsOpen] = React79.useState(false);
|
|
@@ -34078,7 +34421,7 @@ function DocSearch({
|
|
|
34078
34421
|
exports.Input,
|
|
34079
34422
|
{
|
|
34080
34423
|
inputType: "search",
|
|
34081
|
-
placeholder,
|
|
34424
|
+
placeholder: resolvedPlaceholder,
|
|
34082
34425
|
value: query,
|
|
34083
34426
|
onChange: handleChange,
|
|
34084
34427
|
onFocus: handleFocus,
|
|
@@ -34143,6 +34486,7 @@ var init_DocSearch = __esm({
|
|
|
34143
34486
|
init_Typography();
|
|
34144
34487
|
init_Icon();
|
|
34145
34488
|
init_Input();
|
|
34489
|
+
init_useTranslate();
|
|
34146
34490
|
}
|
|
34147
34491
|
});
|
|
34148
34492
|
var DocSidebarCategory; exports.DocSidebar = void 0;
|
|
@@ -36275,8 +36619,8 @@ var init_SignaturePad = __esm({
|
|
|
36275
36619
|
init_useEventBus();
|
|
36276
36620
|
init_useTranslate();
|
|
36277
36621
|
exports.SignaturePad = ({
|
|
36278
|
-
label
|
|
36279
|
-
helperText
|
|
36622
|
+
label,
|
|
36623
|
+
helperText,
|
|
36280
36624
|
strokeColor,
|
|
36281
36625
|
strokeWidth = 2,
|
|
36282
36626
|
height = 200,
|
|
@@ -36292,6 +36636,8 @@ var init_SignaturePad = __esm({
|
|
|
36292
36636
|
}) => {
|
|
36293
36637
|
const eventBus = useEventBus();
|
|
36294
36638
|
const { t } = useTranslate();
|
|
36639
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36640
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36295
36641
|
const canvasRef = React79.useRef(null);
|
|
36296
36642
|
const [isDrawing, setIsDrawing] = React79.useState(false);
|
|
36297
36643
|
const [hasSignature, setHasSignature] = React79.useState(!!value);
|
|
@@ -36394,7 +36740,7 @@ var init_SignaturePad = __esm({
|
|
|
36394
36740
|
);
|
|
36395
36741
|
}
|
|
36396
36742
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "sm", children: [
|
|
36397
|
-
|
|
36743
|
+
resolvedLabel && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36398
36744
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36399
36745
|
exports.Box,
|
|
36400
36746
|
{
|
|
@@ -36423,7 +36769,7 @@ var init_SignaturePad = __esm({
|
|
|
36423
36769
|
)
|
|
36424
36770
|
}
|
|
36425
36771
|
),
|
|
36426
|
-
|
|
36772
|
+
resolvedHelperText && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36427
36773
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", justify: "end", children: [
|
|
36428
36774
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36429
36775
|
exports.Button,
|
|
@@ -36433,7 +36779,7 @@ var init_SignaturePad = __esm({
|
|
|
36433
36779
|
icon: LucideIcons2.Eraser,
|
|
36434
36780
|
onClick: clearSignature,
|
|
36435
36781
|
disabled: !hasSignature,
|
|
36436
|
-
children: "
|
|
36782
|
+
children: t("signaturePad.clear")
|
|
36437
36783
|
}
|
|
36438
36784
|
),
|
|
36439
36785
|
signEvent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -36444,7 +36790,7 @@ var init_SignaturePad = __esm({
|
|
|
36444
36790
|
icon: LucideIcons2.Check,
|
|
36445
36791
|
onClick: confirmSignature,
|
|
36446
36792
|
disabled: !hasSignature,
|
|
36447
|
-
children: "
|
|
36793
|
+
children: t("signaturePad.confirm")
|
|
36448
36794
|
}
|
|
36449
36795
|
)
|
|
36450
36796
|
] })
|
|
@@ -41111,6 +41457,7 @@ function MasterDetail({
|
|
|
41111
41457
|
className,
|
|
41112
41458
|
...rest
|
|
41113
41459
|
}) {
|
|
41460
|
+
const { t } = useTranslate();
|
|
41114
41461
|
const loading = externalLoading ?? false;
|
|
41115
41462
|
const isLoading = externalIsLoading ?? false;
|
|
41116
41463
|
const error = externalError ?? null;
|
|
@@ -41123,8 +41470,8 @@ function MasterDetail({
|
|
|
41123
41470
|
isLoading: loading || isLoading,
|
|
41124
41471
|
error,
|
|
41125
41472
|
className,
|
|
41126
|
-
emptyTitle: "
|
|
41127
|
-
emptyDescription: "
|
|
41473
|
+
emptyTitle: t("table.empty.title"),
|
|
41474
|
+
emptyDescription: t("empty.createFirst"),
|
|
41128
41475
|
...rest
|
|
41129
41476
|
}
|
|
41130
41477
|
);
|
|
@@ -41133,6 +41480,7 @@ var init_MasterDetail = __esm({
|
|
|
41133
41480
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41134
41481
|
"use client";
|
|
41135
41482
|
init_DataTable();
|
|
41483
|
+
init_useTranslate();
|
|
41136
41484
|
MasterDetail.displayName = "MasterDetail";
|
|
41137
41485
|
}
|
|
41138
41486
|
});
|
|
@@ -41141,14 +41489,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41141
41489
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41142
41490
|
init_cn();
|
|
41143
41491
|
init_Typography();
|
|
41144
|
-
|
|
41145
|
-
|
|
41146
|
-
{
|
|
41147
|
-
|
|
41148
|
-
|
|
41149
|
-
|
|
41150
|
-
|
|
41151
|
-
|
|
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
|
+
};
|
|
41152
41504
|
exports.MasterDetailLayout = ({
|
|
41153
41505
|
master,
|
|
41154
41506
|
detail,
|
|
@@ -41275,7 +41627,7 @@ var init_MediaGallery = __esm({
|
|
|
41275
41627
|
{
|
|
41276
41628
|
icon: LucideIcons2.Image,
|
|
41277
41629
|
title: t("display.noMedia"),
|
|
41278
|
-
description: "
|
|
41630
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41279
41631
|
className
|
|
41280
41632
|
}
|
|
41281
41633
|
);
|
|
@@ -41292,7 +41644,7 @@ var init_MediaGallery = __esm({
|
|
|
41292
41644
|
size: "sm",
|
|
41293
41645
|
icon: LucideIcons2.Upload,
|
|
41294
41646
|
action: "MEDIA_UPLOAD",
|
|
41295
|
-
children: "
|
|
41647
|
+
children: t("mediaGallery.upload")
|
|
41296
41648
|
}
|
|
41297
41649
|
),
|
|
41298
41650
|
actions?.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -41306,10 +41658,7 @@ var init_MediaGallery = __esm({
|
|
|
41306
41658
|
))
|
|
41307
41659
|
] })
|
|
41308
41660
|
] }),
|
|
41309
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsxRuntime.
|
|
41310
|
-
selectedItems.length,
|
|
41311
|
-
" selected"
|
|
41312
|
-
] }) }),
|
|
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 }) }) }),
|
|
41313
41662
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41314
41663
|
exports.Box,
|
|
41315
41664
|
{
|
|
@@ -42302,7 +42651,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42302
42651
|
exports.EmptyState,
|
|
42303
42652
|
{
|
|
42304
42653
|
title: t("debug.noActiveTraits"),
|
|
42305
|
-
description: "
|
|
42654
|
+
description: t("debug.traitsMountHint"),
|
|
42306
42655
|
className: "py-8"
|
|
42307
42656
|
}
|
|
42308
42657
|
);
|
|
@@ -42312,14 +42661,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42312
42661
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42313
42662
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42314
42663
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42315
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42316
|
-
trait.transitionCount,
|
|
42317
|
-
" transitions"
|
|
42318
|
-
] })
|
|
42664
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42319
42665
|
] }),
|
|
42320
42666
|
content: /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "sm", children: [
|
|
42321
42667
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42322
|
-
/* @__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") }),
|
|
42323
42669
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
42324
42670
|
exports.Badge,
|
|
42325
42671
|
{
|
|
@@ -42331,7 +42677,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42331
42677
|
)) })
|
|
42332
42678
|
] }),
|
|
42333
42679
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42334
|
-
/* @__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") }),
|
|
42335
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: [
|
|
42336
42682
|
t2.from,
|
|
42337
42683
|
" \u2192 ",
|
|
@@ -42350,7 +42696,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42350
42696
|
] }, i)) })
|
|
42351
42697
|
] }),
|
|
42352
42698
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42353
|
-
/* @__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") }),
|
|
42354
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: [
|
|
42355
42701
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: g.name }),
|
|
42356
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" })
|
|
@@ -42456,7 +42802,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42456
42802
|
exports.EmptyState,
|
|
42457
42803
|
{
|
|
42458
42804
|
title: t("debug.noEntityData"),
|
|
42459
|
-
description: "
|
|
42805
|
+
description: t("debug.debugModeHint"),
|
|
42460
42806
|
className: "py-8"
|
|
42461
42807
|
}
|
|
42462
42808
|
);
|
|
@@ -42469,7 +42815,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42469
42815
|
exports.EmptyState,
|
|
42470
42816
|
{
|
|
42471
42817
|
title: t("debug.noEntities"),
|
|
42472
|
-
description: "
|
|
42818
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42473
42819
|
className: "py-8"
|
|
42474
42820
|
}
|
|
42475
42821
|
);
|
|
@@ -42477,7 +42823,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42477
42823
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42478
42824
|
id: `singleton-${name}`,
|
|
42479
42825
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42480
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "sm", children: "
|
|
42826
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42481
42827
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42482
42828
|
] }),
|
|
42483
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) })
|
|
@@ -42495,31 +42841,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42495
42841
|
}));
|
|
42496
42842
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42497
42843
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42498
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42499
|
-
"Singletons (",
|
|
42500
|
-
singletonItems.length,
|
|
42501
|
-
")"
|
|
42502
|
-
] }),
|
|
42844
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42503
42845
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: singletonItems, multiple: true })
|
|
42504
42846
|
] }),
|
|
42505
42847
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42506
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42507
|
-
"Runtime (",
|
|
42508
|
-
runtimeEntities.length,
|
|
42509
|
-
")"
|
|
42510
|
-
] }),
|
|
42848
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42511
42849
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: runtimeItems, multiple: true }),
|
|
42512
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.
|
|
42513
|
-
"+",
|
|
42514
|
-
runtimeEntities.length - 20,
|
|
42515
|
-
" more entities"
|
|
42516
|
-
] })
|
|
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 }) })
|
|
42517
42851
|
] }),
|
|
42518
42852
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42519
|
-
/* @__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") }),
|
|
42520
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: [
|
|
42521
42855
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: type }),
|
|
42522
|
-
/* @__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") })
|
|
42523
42857
|
] }, type)) })
|
|
42524
42858
|
] })
|
|
42525
42859
|
] });
|
|
@@ -42563,7 +42897,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42563
42897
|
exports.EmptyState,
|
|
42564
42898
|
{
|
|
42565
42899
|
title: t("debug.noEventsYet"),
|
|
42566
|
-
description: "
|
|
42900
|
+
description: t("debug.eventsExecuteHint"),
|
|
42567
42901
|
className: "py-8"
|
|
42568
42902
|
}
|
|
42569
42903
|
);
|
|
@@ -42574,17 +42908,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42574
42908
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42575
42909
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42576
42910
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.ButtonGroup, { children: [
|
|
42577
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42911
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42578
42912
|
exports.Button,
|
|
42579
42913
|
{
|
|
42580
42914
|
size: "sm",
|
|
42581
42915
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42582
42916
|
onClick: () => setFilter("all"),
|
|
42583
|
-
children:
|
|
42584
|
-
"All (",
|
|
42585
|
-
events2.length,
|
|
42586
|
-
")"
|
|
42587
|
-
]
|
|
42917
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42588
42918
|
}
|
|
42589
42919
|
),
|
|
42590
42920
|
eventTypes.map((type) => {
|
|
@@ -42614,7 +42944,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42614
42944
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42615
42945
|
}
|
|
42616
42946
|
),
|
|
42617
|
-
"
|
|
42947
|
+
t("debug.autoScroll")
|
|
42618
42948
|
] })
|
|
42619
42949
|
] }),
|
|
42620
42950
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42672,7 +43002,7 @@ function GuardsPanel({ guards }) {
|
|
|
42672
43002
|
exports.EmptyState,
|
|
42673
43003
|
{
|
|
42674
43004
|
title: t("debug.noGuardEvaluations"),
|
|
42675
|
-
description: "
|
|
43005
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42676
43006
|
className: "py-8"
|
|
42677
43007
|
}
|
|
42678
43008
|
);
|
|
@@ -42703,15 +43033,15 @@ function GuardsPanel({ guards }) {
|
|
|
42703
43033
|
] }),
|
|
42704
43034
|
content: /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "sm", children: [
|
|
42705
43035
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42706
|
-
/* @__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") }),
|
|
42707
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 })
|
|
42708
43038
|
] }),
|
|
42709
43039
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42710
|
-
/* @__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") }),
|
|
42711
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) })
|
|
42712
43042
|
] }),
|
|
42713
43043
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42714
|
-
/* @__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") }),
|
|
42715
43045
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", children: guard.context.traitName })
|
|
42716
43046
|
] })
|
|
42717
43047
|
] })
|
|
@@ -42729,9 +43059,9 @@ function GuardsPanel({ guards }) {
|
|
|
42729
43059
|
] })
|
|
42730
43060
|
] }),
|
|
42731
43061
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.ButtonGroup, { children: [
|
|
42732
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42733
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42734
|
-
/* @__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") })
|
|
42735
43065
|
] })
|
|
42736
43066
|
] }),
|
|
42737
43067
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Accordion, { items: accordionItems }) })
|
|
@@ -42857,7 +43187,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42857
43187
|
exports.EmptyState,
|
|
42858
43188
|
{
|
|
42859
43189
|
title: t("debug.noTransitionsRecorded"),
|
|
42860
|
-
description: "
|
|
43190
|
+
description: t("debug.transitionsProcessHint"),
|
|
42861
43191
|
className: "py-8"
|
|
42862
43192
|
}
|
|
42863
43193
|
);
|
|
@@ -42874,10 +43204,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42874
43204
|
const sorted = [...transitions].reverse();
|
|
42875
43205
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42876
43206
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42877
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42878
|
-
transitions.length,
|
|
42879
|
-
" transitions recorded"
|
|
42880
|
-
] }),
|
|
43207
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42881
43208
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42882
43209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42883
43210
|
exports.Checkbox,
|
|
@@ -42886,7 +43213,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42886
43213
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42887
43214
|
}
|
|
42888
43215
|
),
|
|
42889
|
-
"
|
|
43216
|
+
t("debug.autoScroll")
|
|
42890
43217
|
] })
|
|
42891
43218
|
] }),
|
|
42892
43219
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42929,15 +43256,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42929
43256
|
variant: trace.guardResult ? "success" : "danger",
|
|
42930
43257
|
size: "sm",
|
|
42931
43258
|
children: [
|
|
42932
|
-
"
|
|
43259
|
+
t("debug.guardLabel"),
|
|
43260
|
+
" ",
|
|
42933
43261
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42934
43262
|
]
|
|
42935
43263
|
}
|
|
42936
43264
|
),
|
|
42937
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42938
|
-
trace.effects.length,
|
|
42939
|
-
" effects"
|
|
42940
|
-
] })
|
|
43265
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42941
43266
|
] }),
|
|
42942
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: [
|
|
42943
43268
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
@@ -42986,13 +43311,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42986
43311
|
exports.EmptyState,
|
|
42987
43312
|
{
|
|
42988
43313
|
title: t("debug.noBridgeData"),
|
|
42989
|
-
description: "
|
|
43314
|
+
description: t("debug.bridgeInitHint"),
|
|
42990
43315
|
className: "py-8"
|
|
42991
43316
|
}
|
|
42992
43317
|
);
|
|
42993
43318
|
}
|
|
42994
43319
|
const formatTime4 = (ts) => {
|
|
42995
|
-
if (ts === 0) return "
|
|
43320
|
+
if (ts === 0) return t("debug.never");
|
|
42996
43321
|
const d = new Date(ts);
|
|
42997
43322
|
return d.toLocaleTimeString("en-US", {
|
|
42998
43323
|
hour12: false,
|
|
@@ -43005,14 +43330,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43005
43330
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Card, { className: "p-3", children: [
|
|
43006
43331
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
43007
43332
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
43008
|
-
/* @__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") })
|
|
43009
43334
|
] }),
|
|
43010
43335
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Stack, { gap: "xs", children: [
|
|
43011
43336
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43012
43337
|
StatRow,
|
|
43013
43338
|
{
|
|
43014
43339
|
label: t("debug.status"),
|
|
43015
|
-
value: bridge.connected ? "
|
|
43340
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
43016
43341
|
variant: bridge.connected ? "success" : "danger"
|
|
43017
43342
|
}
|
|
43018
43343
|
),
|
|
@@ -43040,13 +43365,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43040
43365
|
] })
|
|
43041
43366
|
] }),
|
|
43042
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: [
|
|
43043
|
-
/* @__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") }),
|
|
43044
43369
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
43045
43370
|
] }),
|
|
43046
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.
|
|
43047
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
43048
|
-
" total events processed"
|
|
43049
|
-
] }) })
|
|
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 }) }) })
|
|
43050
43372
|
] }) });
|
|
43051
43373
|
}
|
|
43052
43374
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43156,7 +43478,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43156
43478
|
exports.EmptyState,
|
|
43157
43479
|
{
|
|
43158
43480
|
title: t("debug.noActiveTraits"),
|
|
43159
|
-
description: "
|
|
43481
|
+
description: t("debug.traitsInitHint"),
|
|
43160
43482
|
className: "py-8"
|
|
43161
43483
|
}
|
|
43162
43484
|
);
|
|
@@ -43173,7 +43495,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43173
43495
|
};
|
|
43174
43496
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43175
43497
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43176
|
-
/* @__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") }),
|
|
43177
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: [
|
|
43178
43500
|
trait.name,
|
|
43179
43501
|
": ",
|
|
@@ -43181,8 +43503,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43181
43503
|
] }, trait.id)) })
|
|
43182
43504
|
] }),
|
|
43183
43505
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43184
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43185
|
-
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: [
|
|
43186
43508
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43187
43509
|
exports.Button,
|
|
43188
43510
|
{
|
|
@@ -43194,15 +43516,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43194
43516
|
}
|
|
43195
43517
|
),
|
|
43196
43518
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43197
|
-
transitions.some((
|
|
43519
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43198
43520
|
] }, event)) })
|
|
43199
43521
|
] }),
|
|
43200
43522
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43201
|
-
/* @__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") }),
|
|
43202
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)) })
|
|
43203
43525
|
] }),
|
|
43204
43526
|
log18.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
43205
|
-
/* @__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") }),
|
|
43206
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: [
|
|
43207
43529
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43208
43530
|
" ",
|
|
@@ -43233,21 +43555,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43233
43555
|
}
|
|
43234
43556
|
});
|
|
43235
43557
|
function ServerResponseRow({ sr }) {
|
|
43558
|
+
const { t } = useTranslate();
|
|
43236
43559
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43237
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: [
|
|
43238
43561
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43239
43562
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43240
43563
|
sr.success ? "\u2713" : "\u2717",
|
|
43241
|
-
"
|
|
43564
|
+
" ",
|
|
43565
|
+
t("debug.server")
|
|
43242
43566
|
] }),
|
|
43243
43567
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43244
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43245
|
-
sr.clientEffects,
|
|
43246
|
-
" clientEffect",
|
|
43247
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43248
|
-
] }),
|
|
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 }) }),
|
|
43249
43569
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43250
|
-
"
|
|
43570
|
+
t("debug.emitLabel"),
|
|
43571
|
+
" ",
|
|
43251
43572
|
sr.emittedEvents.join(", ")
|
|
43252
43573
|
] }),
|
|
43253
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 })
|
|
@@ -43255,13 +43576,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43255
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: [
|
|
43256
43577
|
name,
|
|
43257
43578
|
": ",
|
|
43258
|
-
count
|
|
43259
|
-
" row",
|
|
43260
|
-
count !== 1 ? "s" : ""
|
|
43579
|
+
t("debug.rowsCount", { count })
|
|
43261
43580
|
] }, name)) })
|
|
43262
43581
|
] });
|
|
43263
43582
|
}
|
|
43264
43583
|
function TransitionRow({ trace }) {
|
|
43584
|
+
const { t } = useTranslate();
|
|
43265
43585
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43266
43586
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43267
43587
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43269,7 +43589,7 @@ function TransitionRow({ trace }) {
|
|
|
43269
43589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43270
43590
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43271
43591
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43272
|
-
/* @__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") })
|
|
43273
43593
|
] }),
|
|
43274
43594
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43275
43595
|
] });
|
|
@@ -43310,6 +43630,7 @@ function VerifyModePanel({
|
|
|
43310
43630
|
serverCount,
|
|
43311
43631
|
localCount
|
|
43312
43632
|
}) {
|
|
43633
|
+
const { t } = useTranslate();
|
|
43313
43634
|
const [expanded, setExpanded] = React79__namespace.useState(true);
|
|
43314
43635
|
const scrollRef = React79__namespace.useRef(null);
|
|
43315
43636
|
const prevCountRef = React79__namespace.useRef(0);
|
|
@@ -43340,30 +43661,20 @@ function VerifyModePanel({
|
|
|
43340
43661
|
onClick: () => setExpanded((v) => !v),
|
|
43341
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",
|
|
43342
43663
|
"aria-expanded": expanded,
|
|
43343
|
-
"aria-label": expanded ? "
|
|
43664
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43344
43665
|
"data-testid": "debugger-verify-toggle",
|
|
43345
43666
|
children: [
|
|
43346
43667
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43347
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43348
|
-
/* @__PURE__ */ jsxRuntime.
|
|
43349
|
-
|
|
43350
|
-
" local"
|
|
43351
|
-
] }),
|
|
43352
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43353
|
-
serverCount,
|
|
43354
|
-
" server"
|
|
43355
|
-
] }),
|
|
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 }) }),
|
|
43356
43671
|
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43357
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43358
|
-
transitions.length,
|
|
43359
|
-
" transition",
|
|
43360
|
-
transitions.length !== 1 ? "s" : ""
|
|
43361
|
-
] })
|
|
43672
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43362
43673
|
]
|
|
43363
43674
|
}
|
|
43364
43675
|
),
|
|
43365
43676
|
expanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43366
|
-
/* @__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)) }) }) }),
|
|
43367
43678
|
/* @__PURE__ */ jsxRuntime.jsx(WalkMinimap, {})
|
|
43368
43679
|
] })
|
|
43369
43680
|
]
|
|
@@ -43379,6 +43690,7 @@ function RuntimeDebugger({
|
|
|
43379
43690
|
defaultTab,
|
|
43380
43691
|
schema
|
|
43381
43692
|
}) {
|
|
43693
|
+
const { t } = useTranslate();
|
|
43382
43694
|
const [isCollapsed, setIsCollapsed] = React79__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43383
43695
|
const [isVisible, setIsVisible] = React79__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43384
43696
|
const debugData = useDebugData();
|
|
@@ -43417,55 +43729,55 @@ function RuntimeDebugger({
|
|
|
43417
43729
|
const tabItems = [
|
|
43418
43730
|
{
|
|
43419
43731
|
id: "dispatch",
|
|
43420
|
-
label: "
|
|
43732
|
+
label: t("debug.tabDispatch"),
|
|
43421
43733
|
badge: debugData.traits.length || void 0,
|
|
43422
43734
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43423
43735
|
},
|
|
43424
43736
|
{
|
|
43425
43737
|
id: "verify",
|
|
43426
|
-
label: failedChecks > 0 ? "
|
|
43738
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43427
43739
|
badge: verification.summary.totalChecks || void 0,
|
|
43428
43740
|
content: /* @__PURE__ */ jsxRuntime.jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43429
43741
|
},
|
|
43430
43742
|
{
|
|
43431
43743
|
id: "timeline",
|
|
43432
|
-
label: "
|
|
43744
|
+
label: t("debug.tabTimeline"),
|
|
43433
43745
|
badge: verification.transitions.length || void 0,
|
|
43434
43746
|
content: /* @__PURE__ */ jsxRuntime.jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43435
43747
|
},
|
|
43436
43748
|
{
|
|
43437
43749
|
id: "bridge",
|
|
43438
|
-
label: "
|
|
43750
|
+
label: t("debug.tabBridge"),
|
|
43439
43751
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43440
43752
|
content: /* @__PURE__ */ jsxRuntime.jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43441
43753
|
},
|
|
43442
43754
|
{
|
|
43443
43755
|
id: "traits",
|
|
43444
|
-
label: "
|
|
43756
|
+
label: t("debug.tabTraits"),
|
|
43445
43757
|
badge: debugData.traits.length || void 0,
|
|
43446
43758
|
content: /* @__PURE__ */ jsxRuntime.jsx(TraitsTab, { traits: debugData.traits })
|
|
43447
43759
|
},
|
|
43448
43760
|
{
|
|
43449
43761
|
id: "ticks",
|
|
43450
|
-
label: "
|
|
43451
|
-
badge: debugData.ticks.filter((
|
|
43762
|
+
label: t("debug.tabTicks"),
|
|
43763
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43452
43764
|
content: /* @__PURE__ */ jsxRuntime.jsx(TicksTab, { ticks: debugData.ticks })
|
|
43453
43765
|
},
|
|
43454
43766
|
{
|
|
43455
43767
|
id: "entities",
|
|
43456
|
-
label: "
|
|
43768
|
+
label: t("debug.tabEntities"),
|
|
43457
43769
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43458
43770
|
content: /* @__PURE__ */ jsxRuntime.jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43459
43771
|
},
|
|
43460
43772
|
{
|
|
43461
43773
|
id: "events",
|
|
43462
|
-
label: "
|
|
43774
|
+
label: t("debug.tabEvents"),
|
|
43463
43775
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43464
43776
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventFlowTab, { events: debugData.events })
|
|
43465
43777
|
},
|
|
43466
43778
|
{
|
|
43467
43779
|
id: "guards",
|
|
43468
|
-
label: "
|
|
43780
|
+
label: t("debug.tabGuards"),
|
|
43469
43781
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43470
43782
|
content: /* @__PURE__ */ jsxRuntime.jsx(GuardsPanel, { guards: debugData.guards })
|
|
43471
43783
|
}
|
|
@@ -43493,15 +43805,10 @@ function RuntimeDebugger({
|
|
|
43493
43805
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43494
43806
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43495
43807
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43496
|
-
"
|
|
43808
|
+
" ",
|
|
43809
|
+
t("debug.debugger")
|
|
43497
43810
|
] }),
|
|
43498
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43499
|
-
failedChecks,
|
|
43500
|
-
" failed"
|
|
43501
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(exports.Badge, { variant: "success", size: "sm", children: [
|
|
43502
|
-
debugData.traits.length,
|
|
43503
|
-
" traits"
|
|
43504
|
-
] }) : /* @__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") })
|
|
43505
43812
|
] })
|
|
43506
43813
|
}
|
|
43507
43814
|
),
|
|
@@ -43519,9 +43826,9 @@ function RuntimeDebugger({
|
|
|
43519
43826
|
);
|
|
43520
43827
|
}
|
|
43521
43828
|
if (mode === "verify") {
|
|
43522
|
-
const traitStates = debugData.traits.map((
|
|
43523
|
-
const serverEntries = verification.transitions.filter((
|
|
43524
|
-
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);
|
|
43525
43832
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43526
43833
|
VerifyModePanel,
|
|
43527
43834
|
{
|
|
@@ -43553,7 +43860,7 @@ function RuntimeDebugger({
|
|
|
43553
43860
|
variant: "secondary",
|
|
43554
43861
|
size: "sm",
|
|
43555
43862
|
className: "runtime-debugger__toggle",
|
|
43556
|
-
title: "
|
|
43863
|
+
title: t("debug.openDebugger"),
|
|
43557
43864
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
43558
43865
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
43559
43866
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43563,11 +43870,8 @@ function RuntimeDebugger({
|
|
|
43563
43870
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43564
43871
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43565
43872
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg", children: "V" }),
|
|
43566
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h6", children: "
|
|
43567
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43568
|
-
failedChecks,
|
|
43569
|
-
" failed"
|
|
43570
|
-
] }) : 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") })
|
|
43571
43875
|
] }),
|
|
43572
43876
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43573
43877
|
exports.Button,
|
|
@@ -43575,7 +43879,7 @@ function RuntimeDebugger({
|
|
|
43575
43879
|
onClick: () => setIsCollapsed(true),
|
|
43576
43880
|
variant: "ghost",
|
|
43577
43881
|
size: "sm",
|
|
43578
|
-
title: "
|
|
43882
|
+
title: t("debug.close"),
|
|
43579
43883
|
children: "x"
|
|
43580
43884
|
}
|
|
43581
43885
|
)
|
|
@@ -43589,7 +43893,7 @@ function RuntimeDebugger({
|
|
|
43589
43893
|
className: "runtime-debugger__tabs"
|
|
43590
43894
|
}
|
|
43591
43895
|
) }),
|
|
43592
|
-
/* @__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") }) })
|
|
43593
43897
|
] })
|
|
43594
43898
|
}
|
|
43595
43899
|
);
|
|
@@ -43615,6 +43919,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43615
43919
|
init_TransitionTimeline();
|
|
43616
43920
|
init_ServerBridgeTab();
|
|
43617
43921
|
init_EventDispatcherTab();
|
|
43922
|
+
init_useTranslate();
|
|
43618
43923
|
init_RuntimeDebugger();
|
|
43619
43924
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43620
43925
|
}
|
|
@@ -45014,7 +45319,7 @@ var init_StatCard = __esm({
|
|
|
45014
45319
|
}
|
|
45015
45320
|
);
|
|
45016
45321
|
}
|
|
45017
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45322
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
45018
45323
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
45019
45324
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
45020
45325
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45057,7 +45362,7 @@ var init_StatCard = __esm({
|
|
|
45057
45362
|
]
|
|
45058
45363
|
}
|
|
45059
45364
|
),
|
|
45060
|
-
/* @__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") })
|
|
45061
45366
|
] }),
|
|
45062
45367
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45063
45368
|
] }),
|