@almadar/ui 5.21.7 → 5.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +970 -650
- package/dist/avl/index.js +970 -650
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +675 -370
- package/dist/components/index.js +675 -370
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +675 -370
- package/dist/providers/index.js +675 -370
- package/dist/runtime/index.cjs +675 -370
- package/dist/runtime/index.js +675 -370
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -298,7 +298,10 @@ var en_default;
|
|
|
298
298
|
var init_en = __esm({
|
|
299
299
|
"locales/en.json"() {
|
|
300
300
|
en_default = {
|
|
301
|
-
$meta: {
|
|
301
|
+
$meta: {
|
|
302
|
+
locale: "en",
|
|
303
|
+
direction: "ltr"
|
|
304
|
+
},
|
|
302
305
|
"common.save": "Save",
|
|
303
306
|
"common.cancel": "Cancel",
|
|
304
307
|
"common.delete": "Delete",
|
|
@@ -440,7 +443,6 @@ var init_en = __esm({
|
|
|
440
443
|
"error.somethingWentWrong": "Something went wrong",
|
|
441
444
|
"error.loadingItems": "Loading items...",
|
|
442
445
|
"error.noItemsFound": "No items found",
|
|
443
|
-
"error.notFound": "Not found",
|
|
444
446
|
"debug.noEntityData": "No entity data",
|
|
445
447
|
"debug.noEntities": "No entities",
|
|
446
448
|
"debug.noTicks": "No ticks registered",
|
|
@@ -472,7 +474,298 @@ var init_en = __esm({
|
|
|
472
474
|
"template.showcase": "Showcase",
|
|
473
475
|
"template.faq": "Frequently Asked Questions",
|
|
474
476
|
"template.ourTeam": "Our Team",
|
|
475
|
-
"template.caseStudies": "Case Studies"
|
|
477
|
+
"template.caseStudies": "Case Studies",
|
|
478
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
479
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
480
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
481
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
482
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
483
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
484
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
485
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
486
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
487
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
488
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
489
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
490
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
491
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
492
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
493
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
494
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
495
|
+
"richBlockEditor.blockType.code": "Code",
|
|
496
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
497
|
+
"richBlockEditor.blockType.image": "Image",
|
|
498
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
499
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
500
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
501
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
502
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
503
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
504
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
505
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
506
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
507
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
508
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
509
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
510
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
511
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
512
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
513
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
514
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
515
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
516
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
517
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
518
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
519
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
520
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
521
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
522
|
+
"richBlockEditor.addItem": "Add item",
|
|
523
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
524
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
525
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
526
|
+
"versionDiff.compare": "Compare",
|
|
527
|
+
"versionDiff.to": "to",
|
|
528
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
529
|
+
"versionDiff.afterRevision": "After revision",
|
|
530
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
531
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
532
|
+
"versionDiff.revert": "Revert",
|
|
533
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
534
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
535
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
536
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
537
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
538
|
+
"violationAlert.adminLabel": "Admin:",
|
|
539
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
540
|
+
"violationAlert.goToField": "Go to field",
|
|
541
|
+
"branchingLogic.title": "Branching logic",
|
|
542
|
+
"branchingLogic.if": "If",
|
|
543
|
+
"branchingLogic.goTo": "go to",
|
|
544
|
+
"branchingLogic.rules": "Rules",
|
|
545
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
546
|
+
"branchingLogic.addRule": "Add rule",
|
|
547
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
548
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
549
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
550
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
551
|
+
"branchingLogic.selectTarget": "Select target",
|
|
552
|
+
"branchingLogic.selectValue": "Select value",
|
|
553
|
+
"branchingLogic.addValue": "Add value",
|
|
554
|
+
"branchingLogic.value": "Value",
|
|
555
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
556
|
+
"branchingLogic.operatorEquals": "equals",
|
|
557
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
558
|
+
"branchingLogic.operatorContains": "contains",
|
|
559
|
+
"branchingLogic.operatorIn": "is one of",
|
|
560
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
561
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
562
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
563
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
564
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
565
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
566
|
+
"filterGroup.filters": "Filters",
|
|
567
|
+
"filterGroup.all": "All",
|
|
568
|
+
"filterGroup.clear": "Clear",
|
|
569
|
+
"filterGroup.clearAll": "Clear all",
|
|
570
|
+
"filterGroup.from": "From",
|
|
571
|
+
"filterGroup.to": "To",
|
|
572
|
+
"filterGroup.allOf": "All {{label}}",
|
|
573
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
574
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
575
|
+
"debug.expression": "Expression",
|
|
576
|
+
"debug.inputs": "Inputs",
|
|
577
|
+
"debug.trait": "Trait",
|
|
578
|
+
"debug.filterAll": "All",
|
|
579
|
+
"debug.filterPassed": "Passed",
|
|
580
|
+
"debug.filterFailed": "Failed",
|
|
581
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
582
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
583
|
+
"debug.activeStates": "Active States",
|
|
584
|
+
"debug.availableEvents": "Available Events",
|
|
585
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
586
|
+
"debug.guarded": "guarded",
|
|
587
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
588
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
589
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
590
|
+
"debug.states": "States",
|
|
591
|
+
"debug.transitions": "Transitions",
|
|
592
|
+
"debug.guards": "Guards",
|
|
593
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
594
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
595
|
+
"debug.singleton": "Singleton",
|
|
596
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
597
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
598
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
599
|
+
"debug.persistent": "Persistent",
|
|
600
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
601
|
+
"debug.notLoaded": "not loaded",
|
|
602
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
603
|
+
"debug.allCount": "All ({{count}})",
|
|
604
|
+
"debug.autoScroll": "Auto-scroll",
|
|
605
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
606
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
607
|
+
"debug.guardLabel": "guard:",
|
|
608
|
+
"debug.effectsCount": "{{count}} effects",
|
|
609
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
610
|
+
"debug.never": "Never",
|
|
611
|
+
"debug.connected": "Connected",
|
|
612
|
+
"debug.disconnected": "Disconnected",
|
|
613
|
+
"debug.lastError": "Last Error",
|
|
614
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
615
|
+
"debug.server": "server",
|
|
616
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
617
|
+
"debug.emitLabel": "emit:",
|
|
618
|
+
"debug.rowsCount": "{{count}} rows",
|
|
619
|
+
"debug.serverResponse": "server response",
|
|
620
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
621
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
622
|
+
"debug.failCount": "{{count}} fail",
|
|
623
|
+
"debug.ok": "OK",
|
|
624
|
+
"debug.localCount": "{{count}} local",
|
|
625
|
+
"debug.serverCount": "{{count}} server",
|
|
626
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
627
|
+
"debug.tabDispatch": "Dispatch",
|
|
628
|
+
"debug.tabVerify": "Verify",
|
|
629
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
630
|
+
"debug.tabTimeline": "Timeline",
|
|
631
|
+
"debug.tabBridge": "Bridge",
|
|
632
|
+
"debug.tabTraits": "Traits",
|
|
633
|
+
"debug.tabTicks": "Ticks",
|
|
634
|
+
"debug.tabEntities": "Entities",
|
|
635
|
+
"debug.tabEvents": "Events",
|
|
636
|
+
"debug.tabGuards": "Guards",
|
|
637
|
+
"debug.debugger": "Debugger",
|
|
638
|
+
"debug.failedCount": "{{count}} failed",
|
|
639
|
+
"debug.traitsCount": "{{count}} traits",
|
|
640
|
+
"debug.idle": "Idle",
|
|
641
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
642
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
643
|
+
"debug.allPassing": "All passing",
|
|
644
|
+
"debug.runtime": "Runtime",
|
|
645
|
+
"debug.close": "Close (`)",
|
|
646
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
647
|
+
"replyTree.expandReplies": "Expand replies",
|
|
648
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
649
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
650
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
651
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
652
|
+
"replyTree.reply": "Reply",
|
|
653
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
654
|
+
"replyTree.flag": "Flag",
|
|
655
|
+
"replyTree.send": "Send",
|
|
656
|
+
"replyTree.continueThread": "Continue thread",
|
|
657
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
658
|
+
"signaturePad.label": "Signature",
|
|
659
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
660
|
+
"signaturePad.clear": "Clear",
|
|
661
|
+
"signaturePad.confirm": "Confirm",
|
|
662
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
663
|
+
"qrScanner.paused": "Paused",
|
|
664
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
665
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
666
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
667
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
668
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
669
|
+
"docSearch.placeholder": "Search documentation...",
|
|
670
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
671
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
672
|
+
"avl.trigger": "Trigger",
|
|
673
|
+
"avl.guard": "Guard",
|
|
674
|
+
"avl.effects": "Effects",
|
|
675
|
+
"avl.props": "Props",
|
|
676
|
+
"avl.entity": "Entity",
|
|
677
|
+
"avl.traits": "Traits",
|
|
678
|
+
"avl.transition": "Transition",
|
|
679
|
+
"avl.onEntity": "on {{entity}}",
|
|
680
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
681
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
682
|
+
"avl.zoomIn": "Zoom in",
|
|
683
|
+
"avl.zoomOut": "Zoom out",
|
|
684
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
685
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
686
|
+
"avl.noTraitData": "No trait data",
|
|
687
|
+
"avl.computingLayout": "Computing layout...",
|
|
688
|
+
"avl.noStateMachine": "No state machine",
|
|
689
|
+
"avl.listensFor": "listens for {{event}}",
|
|
690
|
+
"avl.emits": "emits {{event}}",
|
|
691
|
+
"avl.pageLayout": "Page Layout",
|
|
692
|
+
"avl.overlaySuffix": "(overlay)",
|
|
693
|
+
"orbPreview.previewBadge": "Preview",
|
|
694
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
695
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
696
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
697
|
+
"orbPreview.noPreview": "No preview available",
|
|
698
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
699
|
+
"detailView.noTransitionData": "No transition data",
|
|
700
|
+
"orbInspector.required": "req",
|
|
701
|
+
"orbInspector.addField": "Add Field",
|
|
702
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
703
|
+
"orbInspector.standalone": "Standalone",
|
|
704
|
+
"orbInspector.embedded": "Embedded",
|
|
705
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
706
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
707
|
+
"orbInspector.addEffect": "Add Effect",
|
|
708
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
709
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
710
|
+
"orbInspector.tokens": "Tokens",
|
|
711
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
712
|
+
"orbInspector.variant": "Variant",
|
|
713
|
+
"orbInspector.size": "Size",
|
|
714
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
715
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
716
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
717
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
718
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
719
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
720
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
721
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
722
|
+
"orbInspector.tab.styles": "Styles",
|
|
723
|
+
"orbInspector.tab.code": "Code",
|
|
724
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
725
|
+
"canvas.overview": "Overview",
|
|
726
|
+
"canvas.expanded": "Expanded",
|
|
727
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
728
|
+
"canvas.screensCount": "{{count}} screens",
|
|
729
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
730
|
+
"lawReference.viewFullText": "View full law text",
|
|
731
|
+
"statCard.defaultLabel": "Stat",
|
|
732
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
733
|
+
"mediaGallery.upload": "Upload",
|
|
734
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
735
|
+
"pagination.jumpPlaceholder": "Page",
|
|
736
|
+
"table.selectRow": "Select row {{id}}",
|
|
737
|
+
"card.selectItem": "Select {{item}}",
|
|
738
|
+
"card.itemFallback": "item",
|
|
739
|
+
"fileTree.noFiles": "No files",
|
|
740
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
741
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
742
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
743
|
+
"upload.dropFilesHere": "Drop files here",
|
|
744
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
745
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
746
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
747
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
748
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
749
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
750
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
751
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
752
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
753
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
754
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
755
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
756
|
+
"optionConstraint.optional": "Optional",
|
|
757
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
758
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
759
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
760
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
761
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
762
|
+
"stateMachine.pinned": "Pinned",
|
|
763
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
764
|
+
"stateMachine.externalEffects": "External Effects",
|
|
765
|
+
"stateMachine.legend.initial": "Initial",
|
|
766
|
+
"stateMachine.legend.final": "Final",
|
|
767
|
+
"stateMachine.legend.state": "State",
|
|
768
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
476
769
|
};
|
|
477
770
|
}
|
|
478
771
|
});
|
|
@@ -5455,6 +5748,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5455
5748
|
init_Typography();
|
|
5456
5749
|
init_Divider();
|
|
5457
5750
|
init_cn();
|
|
5751
|
+
init_useTranslate();
|
|
5458
5752
|
positionStyles2 = {
|
|
5459
5753
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5460
5754
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5473,6 +5767,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5473
5767
|
position = "top",
|
|
5474
5768
|
className
|
|
5475
5769
|
}) => {
|
|
5770
|
+
const { t } = useTranslate();
|
|
5476
5771
|
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
5477
5772
|
const timeoutRef = React84__default.useRef(null);
|
|
5478
5773
|
const handleMouseEnter = () => {
|
|
@@ -5556,7 +5851,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5556
5851
|
target: "_blank",
|
|
5557
5852
|
rel: "noopener noreferrer",
|
|
5558
5853
|
onClick: (e) => e.stopPropagation(),
|
|
5559
|
-
children: "
|
|
5854
|
+
children: t("lawReference.viewFullText")
|
|
5560
5855
|
}
|
|
5561
5856
|
)
|
|
5562
5857
|
] }),
|
|
@@ -13458,6 +13753,7 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13458
13753
|
var init_BehaviorView = __esm({
|
|
13459
13754
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13460
13755
|
"use client";
|
|
13756
|
+
init_useTranslate();
|
|
13461
13757
|
init_AvlState();
|
|
13462
13758
|
init_AvlTransitionLane();
|
|
13463
13759
|
init_AvlSwimLane();
|
|
@@ -13467,6 +13763,7 @@ var init_BehaviorView = __esm({
|
|
|
13467
13763
|
SWIM_GUTTER = 120;
|
|
13468
13764
|
CENTER_W = 360;
|
|
13469
13765
|
BehaviorView = ({ data }) => {
|
|
13766
|
+
const { t } = useTranslate();
|
|
13470
13767
|
const [layout, setLayout] = useState(null);
|
|
13471
13768
|
const traitName = data.traits[0]?.name;
|
|
13472
13769
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13476,10 +13773,10 @@ var init_BehaviorView = __esm({
|
|
|
13476
13773
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
13477
13774
|
}, [dataKey]);
|
|
13478
13775
|
if (!traitData) {
|
|
13479
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13776
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
13480
13777
|
}
|
|
13481
13778
|
if (!layout) {
|
|
13482
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13779
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.computingLayout") });
|
|
13483
13780
|
}
|
|
13484
13781
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
13485
13782
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -13495,10 +13792,7 @@ var init_BehaviorView = __esm({
|
|
|
13495
13792
|
const machineHeight = scaledH + 100;
|
|
13496
13793
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
13497
13794
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
13498
|
-
/* @__PURE__ */
|
|
13499
|
-
"on ",
|
|
13500
|
-
traitData.linkedEntity
|
|
13501
|
-
] }),
|
|
13795
|
+
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 36, textAnchor: "middle", fill: "var(--color-muted-foreground)", fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.onEntity", { entity: traitData.linkedEntity }) }),
|
|
13502
13796
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
13503
13797
|
/* @__PURE__ */ jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
13504
13798
|
/* @__PURE__ */ jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -13806,7 +14100,7 @@ var init_CodeBlock = __esm({
|
|
|
13806
14100
|
const isLolo = language === "lolo";
|
|
13807
14101
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
13808
14102
|
const eventBus = useEventBus();
|
|
13809
|
-
const { t
|
|
14103
|
+
const { t } = useTranslate();
|
|
13810
14104
|
const scrollRef = useRef(null);
|
|
13811
14105
|
const codeRef = useRef(null);
|
|
13812
14106
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -14061,7 +14355,7 @@ var init_CodeBlock = __esm({
|
|
|
14061
14355
|
size: "sm",
|
|
14062
14356
|
onClick: handleCopy,
|
|
14063
14357
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
14064
|
-
"aria-label": "
|
|
14358
|
+
"aria-label": t("common.copy"),
|
|
14065
14359
|
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
14066
14360
|
}
|
|
14067
14361
|
)
|
|
@@ -14282,9 +14576,18 @@ var init_MarkdownContent = __esm({
|
|
|
14282
14576
|
);
|
|
14283
14577
|
}
|
|
14284
14578
|
return /* @__PURE__ */ jsx(
|
|
14285
|
-
"
|
|
14579
|
+
"code",
|
|
14286
14580
|
{
|
|
14581
|
+
...props,
|
|
14582
|
+
className: codeClassName,
|
|
14287
14583
|
style: {
|
|
14584
|
+
backgroundColor: "var(--color-muted)",
|
|
14585
|
+
color: "var(--color-foreground)",
|
|
14586
|
+
border: "1px solid var(--color-border)",
|
|
14587
|
+
padding: "0.125rem 0.375rem",
|
|
14588
|
+
borderRadius: "0.25rem",
|
|
14589
|
+
fontSize: "0.875em",
|
|
14590
|
+
fontFamily: "ui-monospace, monospace",
|
|
14288
14591
|
whiteSpace: "pre-wrap",
|
|
14289
14592
|
wordBreak: "break-word"
|
|
14290
14593
|
},
|
|
@@ -14657,7 +14960,7 @@ var init_StateMachineView = __esm({
|
|
|
14657
14960
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14658
14961
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14659
14962
|
const isSingle2 = bundle.labels.length === 1;
|
|
14660
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
14963
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14661
14964
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
14662
14965
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
14663
14966
|
const cx = fromState.x;
|
|
@@ -14783,7 +15086,7 @@ var init_StateMachineView = __esm({
|
|
|
14783
15086
|
const controlX = midX + perpX;
|
|
14784
15087
|
const controlY = midY + perpY;
|
|
14785
15088
|
const isSingle = bundle.labels.length === 1;
|
|
14786
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
15089
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14787
15090
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
14788
15091
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
14789
15092
|
const curveMidpoint = {
|
|
@@ -14938,7 +15241,7 @@ var init_StateMachineView = __esm({
|
|
|
14938
15241
|
{
|
|
14939
15242
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
14940
15243
|
style: { backgroundColor: "var(--color-success)" },
|
|
14941
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
15244
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
14942
15245
|
}
|
|
14943
15246
|
),
|
|
14944
15247
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -14960,10 +15263,7 @@ var init_StateMachineView = __esm({
|
|
|
14960
15263
|
{
|
|
14961
15264
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
14962
15265
|
style: { backgroundColor: "var(--color-accent)" },
|
|
14963
|
-
children: /* @__PURE__ */
|
|
14964
|
-
bundle.labels.length,
|
|
14965
|
-
" events"
|
|
14966
|
-
] })
|
|
15266
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
14967
15267
|
}
|
|
14968
15268
|
)
|
|
14969
15269
|
]
|
|
@@ -15108,7 +15408,7 @@ var init_StateMachineView = __esm({
|
|
|
15108
15408
|
align: "center",
|
|
15109
15409
|
className: "mb-2",
|
|
15110
15410
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
15111
|
-
children: "
|
|
15411
|
+
children: t("stateMachine.externalEffects")
|
|
15112
15412
|
}
|
|
15113
15413
|
),
|
|
15114
15414
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -15128,10 +15428,10 @@ var init_StateMachineView = __esm({
|
|
|
15128
15428
|
Legend = ({ config, y }) => {
|
|
15129
15429
|
const { t } = useTranslate();
|
|
15130
15430
|
const items = [
|
|
15131
|
-
{ label: "
|
|
15132
|
-
{ label: "
|
|
15133
|
-
{ label: "
|
|
15134
|
-
{ label: "
|
|
15431
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15432
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
15433
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
15434
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
15135
15435
|
];
|
|
15136
15436
|
return /* @__PURE__ */ jsx(
|
|
15137
15437
|
HStack,
|
|
@@ -15146,8 +15446,8 @@ var init_StateMachineView = __esm({
|
|
|
15146
15446
|
{
|
|
15147
15447
|
className: "w-3 h-3 rounded-full",
|
|
15148
15448
|
style: {
|
|
15149
|
-
backgroundColor: item.
|
|
15150
|
-
border: item.
|
|
15449
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
15450
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
15151
15451
|
}
|
|
15152
15452
|
}
|
|
15153
15453
|
),
|
|
@@ -15159,7 +15459,7 @@ var init_StateMachineView = __esm({
|
|
|
15159
15459
|
children: item.label
|
|
15160
15460
|
}
|
|
15161
15461
|
)
|
|
15162
|
-
] }, item.
|
|
15462
|
+
] }, item.key))
|
|
15163
15463
|
}
|
|
15164
15464
|
);
|
|
15165
15465
|
};
|
|
@@ -15953,13 +16253,13 @@ var init_JazariStateMachine = __esm({
|
|
|
15953
16253
|
);
|
|
15954
16254
|
}, [resolvedTrait, entityFields]);
|
|
15955
16255
|
if (isLoading) {
|
|
15956
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
16256
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
15957
16257
|
}
|
|
15958
16258
|
if (error) {
|
|
15959
16259
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
15960
16260
|
}
|
|
15961
16261
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
15962
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
16262
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
15963
16263
|
}
|
|
15964
16264
|
return /* @__PURE__ */ jsx(
|
|
15965
16265
|
StateMachineView,
|
|
@@ -17003,13 +17303,13 @@ var init_LayoutPatterns = __esm({
|
|
|
17003
17303
|
function generateRuleId() {
|
|
17004
17304
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
17005
17305
|
}
|
|
17006
|
-
function questionsToOptions(questions,
|
|
17306
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
17007
17307
|
const opts = questions.map((q) => ({
|
|
17008
17308
|
value: q.id,
|
|
17009
17309
|
label: q.label
|
|
17010
17310
|
}));
|
|
17011
|
-
if (
|
|
17012
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
17311
|
+
if (endOfSurveyLabel !== null) {
|
|
17312
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
17013
17313
|
}
|
|
17014
17314
|
return opts;
|
|
17015
17315
|
}
|
|
@@ -17018,7 +17318,7 @@ function isRuleBroken(rule, questions) {
|
|
|
17018
17318
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
17019
17319
|
return !sourceExists || !targetExists;
|
|
17020
17320
|
}
|
|
17021
|
-
var END_OF_SURVEY,
|
|
17321
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
17022
17322
|
var init_BranchingLogicBuilder = __esm({
|
|
17023
17323
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
17024
17324
|
"use client";
|
|
@@ -17031,14 +17331,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17031
17331
|
init_FilterPill();
|
|
17032
17332
|
init_Box();
|
|
17033
17333
|
init_useEventBus();
|
|
17334
|
+
init_useTranslate();
|
|
17034
17335
|
init_cn();
|
|
17035
17336
|
END_OF_SURVEY = "end-of-survey";
|
|
17036
|
-
OPERATOR_OPTIONS = [
|
|
17037
|
-
{ value: "equals", label: "equals" },
|
|
17038
|
-
{ value: "not-equals", label: "does not equal" },
|
|
17039
|
-
{ value: "contains", label: "contains" },
|
|
17040
|
-
{ value: "in", label: "is one of" }
|
|
17041
|
-
];
|
|
17042
17337
|
RuleRow = ({
|
|
17043
17338
|
rule,
|
|
17044
17339
|
questions,
|
|
@@ -17047,8 +17342,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17047
17342
|
onChange,
|
|
17048
17343
|
onDelete
|
|
17049
17344
|
}) => {
|
|
17050
|
-
const
|
|
17051
|
-
const
|
|
17345
|
+
const { t } = useTranslate();
|
|
17346
|
+
const operatorOptions = useMemo(
|
|
17347
|
+
() => [
|
|
17348
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
17349
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
17350
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
17351
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
17352
|
+
],
|
|
17353
|
+
[t]
|
|
17354
|
+
);
|
|
17355
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
17356
|
+
const targetOptions = useMemo(
|
|
17357
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
17358
|
+
[questions, t]
|
|
17359
|
+
);
|
|
17052
17360
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
17053
17361
|
const valueOptions = useMemo(() => {
|
|
17054
17362
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -17093,22 +17401,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17093
17401
|
),
|
|
17094
17402
|
children: [
|
|
17095
17403
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
17096
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
17404
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
17097
17405
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17098
17406
|
Select,
|
|
17099
17407
|
{
|
|
17100
17408
|
options: sourceOptions,
|
|
17101
17409
|
value: rule.sourceQuestionId,
|
|
17102
|
-
placeholder: "
|
|
17410
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
17103
17411
|
onChange: handleSource,
|
|
17104
17412
|
disabled: readOnly,
|
|
17105
|
-
error: broken ? "
|
|
17413
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
17106
17414
|
}
|
|
17107
17415
|
) }),
|
|
17108
17416
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
17109
17417
|
Select,
|
|
17110
17418
|
{
|
|
17111
|
-
options:
|
|
17419
|
+
options: operatorOptions,
|
|
17112
17420
|
value: rule.operator,
|
|
17113
17421
|
onChange: handleOperator,
|
|
17114
17422
|
disabled: readOnly
|
|
@@ -17131,7 +17439,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17131
17439
|
{
|
|
17132
17440
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
17133
17441
|
value: "",
|
|
17134
|
-
placeholder: "
|
|
17442
|
+
placeholder: t("branchingLogic.addValue"),
|
|
17135
17443
|
onChange: handleAddChip,
|
|
17136
17444
|
disabled: readOnly
|
|
17137
17445
|
}
|
|
@@ -17139,7 +17447,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17139
17447
|
Input,
|
|
17140
17448
|
{
|
|
17141
17449
|
inputType: "text",
|
|
17142
|
-
placeholder: "
|
|
17450
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
17143
17451
|
value: "",
|
|
17144
17452
|
onKeyDown: (e) => {
|
|
17145
17453
|
if (e.key !== "Enter") return;
|
|
@@ -17157,7 +17465,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17157
17465
|
{
|
|
17158
17466
|
options: valueOptions,
|
|
17159
17467
|
value: scalarValue,
|
|
17160
|
-
placeholder: "
|
|
17468
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
17161
17469
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
17162
17470
|
disabled: readOnly
|
|
17163
17471
|
}
|
|
@@ -17165,7 +17473,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17165
17473
|
Input,
|
|
17166
17474
|
{
|
|
17167
17475
|
inputType: "text",
|
|
17168
|
-
placeholder: "
|
|
17476
|
+
placeholder: t("branchingLogic.value"),
|
|
17169
17477
|
value: scalarValue,
|
|
17170
17478
|
onChange: handleScalarValue,
|
|
17171
17479
|
disabled: readOnly
|
|
@@ -17173,17 +17481,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17173
17481
|
) }),
|
|
17174
17482
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
17175
17483
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
17176
|
-
"
|
|
17484
|
+
t("branchingLogic.goTo")
|
|
17177
17485
|
] }),
|
|
17178
17486
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17179
17487
|
Select,
|
|
17180
17488
|
{
|
|
17181
17489
|
options: targetOptions,
|
|
17182
17490
|
value: rule.targetQuestionId,
|
|
17183
|
-
placeholder: "
|
|
17491
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
17184
17492
|
onChange: handleTarget,
|
|
17185
17493
|
disabled: readOnly,
|
|
17186
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
17494
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
17187
17495
|
}
|
|
17188
17496
|
) }),
|
|
17189
17497
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -17195,11 +17503,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17195
17503
|
action: "DELETE_RULE",
|
|
17196
17504
|
actionPayload: { ruleId: rule.id },
|
|
17197
17505
|
onClick: onDelete,
|
|
17198
|
-
"aria-label": "
|
|
17506
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
17199
17507
|
}
|
|
17200
17508
|
)
|
|
17201
17509
|
] }),
|
|
17202
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
17510
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
17203
17511
|
]
|
|
17204
17512
|
}
|
|
17205
17513
|
);
|
|
@@ -17209,10 +17517,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17209
17517
|
NODE_GAP_Y = 80;
|
|
17210
17518
|
PADDING = 32;
|
|
17211
17519
|
LogicGraph = ({ questions, rules }) => {
|
|
17520
|
+
const { t } = useTranslate();
|
|
17521
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17212
17522
|
const layout = useMemo(() => {
|
|
17213
17523
|
const items = [
|
|
17214
17524
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
17215
|
-
{ id: END_OF_SURVEY, label:
|
|
17525
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
17216
17526
|
];
|
|
17217
17527
|
const positions = {};
|
|
17218
17528
|
items.forEach((item, i) => {
|
|
@@ -17224,14 +17534,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17224
17534
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
17225
17535
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
17226
17536
|
return { items, positions, width, height };
|
|
17227
|
-
}, [questions]);
|
|
17537
|
+
}, [questions, endOfSurveyLabel]);
|
|
17228
17538
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
17229
17539
|
"svg",
|
|
17230
17540
|
{
|
|
17231
17541
|
width: layout.width,
|
|
17232
17542
|
height: layout.height,
|
|
17233
17543
|
role: "img",
|
|
17234
|
-
"aria-label": "
|
|
17544
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
17235
17545
|
style: { display: "block" },
|
|
17236
17546
|
children: [
|
|
17237
17547
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -17339,6 +17649,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17339
17649
|
readOnly = false,
|
|
17340
17650
|
className
|
|
17341
17651
|
}) => {
|
|
17652
|
+
const { t } = useTranslate();
|
|
17342
17653
|
const eventBus = useEventBus();
|
|
17343
17654
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17344
17655
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17391,16 +17702,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17391
17702
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
17392
17703
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
17393
17704
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
17394
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
17705
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
17395
17706
|
/* @__PURE__ */ jsx(
|
|
17396
17707
|
Badge,
|
|
17397
17708
|
{
|
|
17398
17709
|
variant: "neutral",
|
|
17399
17710
|
size: "sm",
|
|
17400
|
-
label:
|
|
17711
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
17401
17712
|
}
|
|
17402
17713
|
),
|
|
17403
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17714
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17715
|
+
Badge,
|
|
17716
|
+
{
|
|
17717
|
+
variant: "error",
|
|
17718
|
+
size: "sm",
|
|
17719
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
17720
|
+
}
|
|
17721
|
+
)
|
|
17404
17722
|
] }),
|
|
17405
17723
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
17406
17724
|
/* @__PURE__ */ jsx(
|
|
@@ -17411,7 +17729,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17411
17729
|
leftIcon: Pencil,
|
|
17412
17730
|
action: "VIEW_EDIT",
|
|
17413
17731
|
onClick: () => setView("edit"),
|
|
17414
|
-
children: "
|
|
17732
|
+
children: t("branchingLogic.rules")
|
|
17415
17733
|
}
|
|
17416
17734
|
),
|
|
17417
17735
|
/* @__PURE__ */ jsx(
|
|
@@ -17422,13 +17740,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17422
17740
|
leftIcon: Eye,
|
|
17423
17741
|
action: "VIEW_GRAPH",
|
|
17424
17742
|
onClick: () => setView("graph"),
|
|
17425
|
-
children: "
|
|
17743
|
+
children: t("branchingLogic.logicGraph")
|
|
17426
17744
|
}
|
|
17427
17745
|
)
|
|
17428
17746
|
] })
|
|
17429
17747
|
] }),
|
|
17430
17748
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
17431
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
17749
|
+
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsx(
|
|
17432
17750
|
RuleRow,
|
|
17433
17751
|
{
|
|
17434
17752
|
rule,
|
|
@@ -17449,7 +17767,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17449
17767
|
action: "ADD_RULE",
|
|
17450
17768
|
onClick: handleAddRule,
|
|
17451
17769
|
disabled: noQuestions,
|
|
17452
|
-
children: "
|
|
17770
|
+
children: t("branchingLogic.addRule")
|
|
17453
17771
|
}
|
|
17454
17772
|
) })
|
|
17455
17773
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -18009,7 +18327,7 @@ function CalendarGrid({
|
|
|
18009
18327
|
onClick: stepPrev,
|
|
18010
18328
|
"aria-disabled": !canPrev || void 0,
|
|
18011
18329
|
"aria-label": t("aria.previousDays"),
|
|
18012
|
-
children: "
|
|
18330
|
+
children: t("nav.previous")
|
|
18013
18331
|
}
|
|
18014
18332
|
),
|
|
18015
18333
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -18022,7 +18340,7 @@ function CalendarGrid({
|
|
|
18022
18340
|
onClick: stepNext,
|
|
18023
18341
|
"aria-disabled": !canNext || void 0,
|
|
18024
18342
|
"aria-label": t("aria.nextDays"),
|
|
18025
|
-
children: "
|
|
18343
|
+
children: t("nav.next")
|
|
18026
18344
|
}
|
|
18027
18345
|
)
|
|
18028
18346
|
] }),
|
|
@@ -19572,7 +19890,7 @@ var init_Pagination = __esm({
|
|
|
19572
19890
|
type: "number",
|
|
19573
19891
|
value: jumpToPage,
|
|
19574
19892
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
19575
|
-
placeholder: "
|
|
19893
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
19576
19894
|
className: "w-20",
|
|
19577
19895
|
onKeyDown: (e) => {
|
|
19578
19896
|
if (e.key === "Enter") {
|
|
@@ -19710,13 +20028,10 @@ var init_CardGrid = __esm({
|
|
|
19710
20028
|
return children;
|
|
19711
20029
|
}
|
|
19712
20030
|
if (isLoading) {
|
|
19713
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
20031
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
19714
20032
|
}
|
|
19715
20033
|
if (error) {
|
|
19716
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
19717
|
-
"Error loading items: ",
|
|
19718
|
-
error.message
|
|
19719
|
-
] }) });
|
|
20034
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
19720
20035
|
}
|
|
19721
20036
|
if (normalizedData.length === 0) {
|
|
19722
20037
|
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -23568,7 +23883,7 @@ function DataGrid({
|
|
|
23568
23883
|
onChange: () => toggleSelection(id),
|
|
23569
23884
|
onClick: (e) => e.stopPropagation(),
|
|
23570
23885
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
23571
|
-
"aria-label":
|
|
23886
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
23572
23887
|
}
|
|
23573
23888
|
),
|
|
23574
23889
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -23766,7 +24081,7 @@ function formatDate3(value) {
|
|
|
23766
24081
|
if (isNaN(d.getTime())) return String(value);
|
|
23767
24082
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
23768
24083
|
}
|
|
23769
|
-
function formatValue2(value, format) {
|
|
24084
|
+
function formatValue2(value, format, boolLabels) {
|
|
23770
24085
|
if (value === void 0 || value === null) return "";
|
|
23771
24086
|
switch (format) {
|
|
23772
24087
|
case "date":
|
|
@@ -23778,7 +24093,7 @@ function formatValue2(value, format) {
|
|
|
23778
24093
|
case "percent":
|
|
23779
24094
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
23780
24095
|
case "boolean":
|
|
23781
|
-
return value ? "Yes" : "No";
|
|
24096
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
23782
24097
|
default:
|
|
23783
24098
|
return String(value);
|
|
23784
24099
|
}
|
|
@@ -24074,7 +24389,7 @@ function DataList({
|
|
|
24074
24389
|
field.label ?? fieldLabel3(field.name),
|
|
24075
24390
|
":"
|
|
24076
24391
|
] }),
|
|
24077
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
24392
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
24078
24393
|
] }, field.name);
|
|
24079
24394
|
}) }),
|
|
24080
24395
|
progressFields.map((field) => {
|
|
@@ -24204,6 +24519,7 @@ var init_FileTree = __esm({
|
|
|
24204
24519
|
init_Box();
|
|
24205
24520
|
init_Typography();
|
|
24206
24521
|
init_Icon();
|
|
24522
|
+
init_useTranslate();
|
|
24207
24523
|
TreeNodeItem = ({
|
|
24208
24524
|
node,
|
|
24209
24525
|
depth,
|
|
@@ -24289,8 +24605,9 @@ var init_FileTree = __esm({
|
|
|
24289
24605
|
className,
|
|
24290
24606
|
indent = 16
|
|
24291
24607
|
}) => {
|
|
24608
|
+
const { t } = useTranslate();
|
|
24292
24609
|
if (tree.length === 0) {
|
|
24293
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
24610
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24294
24611
|
}
|
|
24295
24612
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
24296
24613
|
TreeNodeItem,
|
|
@@ -24345,6 +24662,7 @@ var init_FilterGroup = __esm({
|
|
|
24345
24662
|
init_Icon();
|
|
24346
24663
|
init_useEventBus();
|
|
24347
24664
|
init_useQuerySingleton();
|
|
24665
|
+
init_useTranslate();
|
|
24348
24666
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24349
24667
|
lookStyles6 = {
|
|
24350
24668
|
toolbar: "",
|
|
@@ -24365,6 +24683,7 @@ var init_FilterGroup = __esm({
|
|
|
24365
24683
|
isLoading,
|
|
24366
24684
|
look = "toolbar"
|
|
24367
24685
|
}) => {
|
|
24686
|
+
const { t } = useTranslate();
|
|
24368
24687
|
const eventBus = useEventBus();
|
|
24369
24688
|
const queryState = useQuerySingleton(query);
|
|
24370
24689
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -24446,7 +24765,7 @@ var init_FilterGroup = __esm({
|
|
|
24446
24765
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
24447
24766
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24448
24767
|
),
|
|
24449
|
-
children: "
|
|
24768
|
+
children: t("filterGroup.all")
|
|
24450
24769
|
}
|
|
24451
24770
|
),
|
|
24452
24771
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -24474,7 +24793,7 @@ var init_FilterGroup = __esm({
|
|
|
24474
24793
|
size: "sm",
|
|
24475
24794
|
onClick: handleClearAll,
|
|
24476
24795
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24477
|
-
children: "
|
|
24796
|
+
children: t("filterGroup.clear")
|
|
24478
24797
|
}
|
|
24479
24798
|
)
|
|
24480
24799
|
]
|
|
@@ -24485,7 +24804,7 @@ var init_FilterGroup = __esm({
|
|
|
24485
24804
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
24486
24805
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
24487
24806
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24488
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24807
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24489
24808
|
] }),
|
|
24490
24809
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
24491
24810
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -24508,7 +24827,7 @@ var init_FilterGroup = __esm({
|
|
|
24508
24827
|
`${filter.field}_from`,
|
|
24509
24828
|
e.target.value || null
|
|
24510
24829
|
),
|
|
24511
|
-
placeholder: "
|
|
24830
|
+
placeholder: t("filterGroup.from"),
|
|
24512
24831
|
clearable: true,
|
|
24513
24832
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
24514
24833
|
}
|
|
@@ -24522,7 +24841,7 @@ var init_FilterGroup = __esm({
|
|
|
24522
24841
|
`${filter.field}_to`,
|
|
24523
24842
|
e.target.value || null
|
|
24524
24843
|
),
|
|
24525
|
-
placeholder: "
|
|
24844
|
+
placeholder: t("filterGroup.to"),
|
|
24526
24845
|
clearable: true,
|
|
24527
24846
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
24528
24847
|
}
|
|
@@ -24542,7 +24861,7 @@ var init_FilterGroup = __esm({
|
|
|
24542
24861
|
value: selectedValues[filter.field] || "all",
|
|
24543
24862
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24544
24863
|
options: [
|
|
24545
|
-
{ value: "all", label: "
|
|
24864
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24546
24865
|
...filter.options?.map((opt) => ({
|
|
24547
24866
|
value: opt,
|
|
24548
24867
|
label: opt
|
|
@@ -24559,7 +24878,7 @@ var init_FilterGroup = __esm({
|
|
|
24559
24878
|
onClick: handleClearAll,
|
|
24560
24879
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24561
24880
|
className: "self-start",
|
|
24562
|
-
children: "
|
|
24881
|
+
children: t("filterGroup.clearAll")
|
|
24563
24882
|
}
|
|
24564
24883
|
)
|
|
24565
24884
|
] });
|
|
@@ -24625,7 +24944,7 @@ var init_FilterGroup = __esm({
|
|
|
24625
24944
|
value: selectedValues[filter.field] || "all",
|
|
24626
24945
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24627
24946
|
options: [
|
|
24628
|
-
{ value: "all", label:
|
|
24947
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
24629
24948
|
...filter.options?.map((opt) => ({
|
|
24630
24949
|
value: opt,
|
|
24631
24950
|
label: opt
|
|
@@ -24654,7 +24973,7 @@ var init_FilterGroup = __esm({
|
|
|
24654
24973
|
field
|
|
24655
24974
|
);
|
|
24656
24975
|
}),
|
|
24657
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
24976
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
24658
24977
|
] })
|
|
24659
24978
|
]
|
|
24660
24979
|
}
|
|
@@ -24679,7 +24998,7 @@ var init_FilterGroup = __esm({
|
|
|
24679
24998
|
className: "text-muted-foreground",
|
|
24680
24999
|
children: [
|
|
24681
25000
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24682
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
25001
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24683
25002
|
]
|
|
24684
25003
|
}
|
|
24685
25004
|
),
|
|
@@ -24705,7 +25024,7 @@ var init_FilterGroup = __esm({
|
|
|
24705
25024
|
`${filter.field}_from`,
|
|
24706
25025
|
e.target.value || null
|
|
24707
25026
|
),
|
|
24708
|
-
placeholder: "
|
|
25027
|
+
placeholder: t("filterGroup.from"),
|
|
24709
25028
|
clearable: true,
|
|
24710
25029
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
24711
25030
|
className: "min-w-[130px]"
|
|
@@ -24721,7 +25040,7 @@ var init_FilterGroup = __esm({
|
|
|
24721
25040
|
`${filter.field}_to`,
|
|
24722
25041
|
e.target.value || null
|
|
24723
25042
|
),
|
|
24724
|
-
placeholder: "
|
|
25043
|
+
placeholder: t("filterGroup.to"),
|
|
24725
25044
|
clearable: true,
|
|
24726
25045
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
24727
25046
|
className: "min-w-[130px]"
|
|
@@ -24743,7 +25062,7 @@ var init_FilterGroup = __esm({
|
|
|
24743
25062
|
value: selectedValues[filter.field] || "all",
|
|
24744
25063
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24745
25064
|
options: [
|
|
24746
|
-
{ value: "all", label: "
|
|
25065
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24747
25066
|
...filter.options?.map((opt) => ({
|
|
24748
25067
|
value: opt,
|
|
24749
25068
|
label: opt
|
|
@@ -24754,10 +25073,7 @@ var init_FilterGroup = __esm({
|
|
|
24754
25073
|
)
|
|
24755
25074
|
] }, filter.field)),
|
|
24756
25075
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
24757
|
-
/* @__PURE__ */
|
|
24758
|
-
activeFilterCount,
|
|
24759
|
-
" active"
|
|
24760
|
-
] }),
|
|
25076
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
24761
25077
|
/* @__PURE__ */ jsx(
|
|
24762
25078
|
Button,
|
|
24763
25079
|
{
|
|
@@ -24765,7 +25081,7 @@ var init_FilterGroup = __esm({
|
|
|
24765
25081
|
size: "sm",
|
|
24766
25082
|
onClick: handleClearAll,
|
|
24767
25083
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24768
|
-
children: "
|
|
25084
|
+
children: t("filterGroup.clearAll")
|
|
24769
25085
|
}
|
|
24770
25086
|
)
|
|
24771
25087
|
] })
|
|
@@ -25709,19 +26025,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25709
26025
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25710
26026
|
}
|
|
25711
26027
|
});
|
|
25712
|
-
var
|
|
26028
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
25713
26029
|
var init_ViolationAlert = __esm({
|
|
25714
26030
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25715
26031
|
init_cn();
|
|
26032
|
+
init_useTranslate();
|
|
25716
26033
|
init_Box();
|
|
25717
26034
|
init_Stack();
|
|
25718
26035
|
init_Typography();
|
|
25719
26036
|
init_Button();
|
|
25720
26037
|
init_Icon();
|
|
25721
|
-
|
|
25722
|
-
measure: "
|
|
25723
|
-
admin: "
|
|
25724
|
-
penalty: "
|
|
26038
|
+
actionTypeLabelKeys = {
|
|
26039
|
+
measure: "violationAlert.actionType.measure",
|
|
26040
|
+
admin: "violationAlert.actionType.admin",
|
|
26041
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25725
26042
|
};
|
|
25726
26043
|
actionTypeIcons = {
|
|
25727
26044
|
measure: "alert-triangle",
|
|
@@ -25738,10 +26055,11 @@ var init_ViolationAlert = __esm({
|
|
|
25738
26055
|
className,
|
|
25739
26056
|
...flatProps
|
|
25740
26057
|
}) => {
|
|
26058
|
+
const { t } = useTranslate();
|
|
25741
26059
|
const resolvedViolation = violation ?? {
|
|
25742
26060
|
law: "",
|
|
25743
26061
|
article: "",
|
|
25744
|
-
message: flatProps.message ?? "
|
|
26062
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25745
26063
|
actionType: "measure"
|
|
25746
26064
|
};
|
|
25747
26065
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25826,7 +26144,7 @@ var init_ViolationAlert = __esm({
|
|
|
25826
26144
|
{
|
|
25827
26145
|
variant: "caption",
|
|
25828
26146
|
className: cn(textColor, "opacity-75"),
|
|
25829
|
-
children:
|
|
26147
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25830
26148
|
}
|
|
25831
26149
|
)
|
|
25832
26150
|
] })
|
|
@@ -25857,7 +26175,7 @@ var init_ViolationAlert = __esm({
|
|
|
25857
26175
|
{
|
|
25858
26176
|
variant: "caption",
|
|
25859
26177
|
className: cn(textColor, "opacity-75"),
|
|
25860
|
-
children: "
|
|
26178
|
+
children: t("violationAlert.adminLabel")
|
|
25861
26179
|
}
|
|
25862
26180
|
),
|
|
25863
26181
|
/* @__PURE__ */ jsx(
|
|
@@ -25876,7 +26194,7 @@ var init_ViolationAlert = __esm({
|
|
|
25876
26194
|
{
|
|
25877
26195
|
variant: "caption",
|
|
25878
26196
|
className: cn(textColor, "opacity-75"),
|
|
25879
|
-
children: "
|
|
26197
|
+
children: t("violationAlert.penaltyLabel")
|
|
25880
26198
|
}
|
|
25881
26199
|
),
|
|
25882
26200
|
/* @__PURE__ */ jsx(
|
|
@@ -25901,7 +26219,7 @@ var init_ViolationAlert = __esm({
|
|
|
25901
26219
|
className: cn(textColor, "self-start"),
|
|
25902
26220
|
children: [
|
|
25903
26221
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25904
|
-
"
|
|
26222
|
+
t("violationAlert.goToField")
|
|
25905
26223
|
]
|
|
25906
26224
|
}
|
|
25907
26225
|
)
|
|
@@ -26217,6 +26535,7 @@ var init_LineChart = __esm({
|
|
|
26217
26535
|
"use client";
|
|
26218
26536
|
init_cn();
|
|
26219
26537
|
init_atoms2();
|
|
26538
|
+
init_useTranslate();
|
|
26220
26539
|
LineChart2 = ({
|
|
26221
26540
|
data,
|
|
26222
26541
|
width = 400,
|
|
@@ -26228,6 +26547,7 @@ var init_LineChart = __esm({
|
|
|
26228
26547
|
areaColor = "var(--color-primary)",
|
|
26229
26548
|
className
|
|
26230
26549
|
}) => {
|
|
26550
|
+
const { t } = useTranslate();
|
|
26231
26551
|
const gradientId = useId();
|
|
26232
26552
|
const safeData = data ?? [];
|
|
26233
26553
|
const sortedData = useMemo(() => {
|
|
@@ -26264,7 +26584,7 @@ var init_LineChart = __esm({
|
|
|
26264
26584
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
26265
26585
|
}, [linePath, points, height, showArea]);
|
|
26266
26586
|
if (safeData.length === 0) {
|
|
26267
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
26587
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
26268
26588
|
}
|
|
26269
26589
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
26270
26590
|
"svg",
|
|
@@ -28171,6 +28491,7 @@ var init_GraphView = __esm({
|
|
|
28171
28491
|
"use client";
|
|
28172
28492
|
init_cn();
|
|
28173
28493
|
init_atoms2();
|
|
28494
|
+
init_useTranslate();
|
|
28174
28495
|
GROUP_COLORS = [
|
|
28175
28496
|
"#3b82f6",
|
|
28176
28497
|
// blue-500
|
|
@@ -28203,6 +28524,7 @@ var init_GraphView = __esm({
|
|
|
28203
28524
|
showLabels = true,
|
|
28204
28525
|
zoomToFit = true
|
|
28205
28526
|
}) => {
|
|
28527
|
+
const { t } = useTranslate();
|
|
28206
28528
|
const containerRef = useRef(null);
|
|
28207
28529
|
const animRef = useRef(0);
|
|
28208
28530
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -28380,7 +28702,7 @@ var init_GraphView = __esm({
|
|
|
28380
28702
|
[onNodeClick]
|
|
28381
28703
|
);
|
|
28382
28704
|
if (nodes.length === 0) {
|
|
28383
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: "
|
|
28705
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
28384
28706
|
}
|
|
28385
28707
|
return /* @__PURE__ */ jsx(
|
|
28386
28708
|
Box,
|
|
@@ -28836,11 +29158,12 @@ var init_UploadDropZone = __esm({
|
|
|
28836
29158
|
init_Icon();
|
|
28837
29159
|
init_Typography();
|
|
28838
29160
|
init_useEventBus();
|
|
29161
|
+
init_useTranslate();
|
|
28839
29162
|
UploadDropZone = ({
|
|
28840
29163
|
accept,
|
|
28841
29164
|
maxSize,
|
|
28842
29165
|
maxFiles = 1,
|
|
28843
|
-
label
|
|
29166
|
+
label,
|
|
28844
29167
|
description,
|
|
28845
29168
|
disabled = false,
|
|
28846
29169
|
action,
|
|
@@ -28848,22 +29171,24 @@ var init_UploadDropZone = __esm({
|
|
|
28848
29171
|
onFiles,
|
|
28849
29172
|
className
|
|
28850
29173
|
}) => {
|
|
29174
|
+
const { t } = useTranslate();
|
|
29175
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28851
29176
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
28852
29177
|
const [error, setError] = useState(null);
|
|
28853
29178
|
const inputRef = useRef(null);
|
|
28854
29179
|
const eventBus = useSafeEventBus7();
|
|
28855
29180
|
const defaultDescription = [
|
|
28856
|
-
accept ?
|
|
28857
|
-
maxSize ?
|
|
28858
|
-
maxFiles > 1 ?
|
|
29181
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
29182
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
29183
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28859
29184
|
].filter(Boolean).join(". ");
|
|
28860
29185
|
const validateFiles = useCallback(
|
|
28861
29186
|
(files) => {
|
|
28862
29187
|
if (files.length > maxFiles) {
|
|
28863
|
-
return { valid: [], error:
|
|
29188
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28864
29189
|
}
|
|
28865
29190
|
if (accept) {
|
|
28866
|
-
const acceptedTypes = accept.split(",").map((
|
|
29191
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28867
29192
|
const invalid = files.filter((file) => {
|
|
28868
29193
|
return !acceptedTypes.some((type) => {
|
|
28869
29194
|
if (type.endsWith("/*")) {
|
|
@@ -28873,7 +29198,7 @@ var init_UploadDropZone = __esm({
|
|
|
28873
29198
|
});
|
|
28874
29199
|
});
|
|
28875
29200
|
if (invalid.length > 0) {
|
|
28876
|
-
return { valid: [], error:
|
|
29201
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28877
29202
|
}
|
|
28878
29203
|
}
|
|
28879
29204
|
if (maxSize) {
|
|
@@ -28881,13 +29206,13 @@ var init_UploadDropZone = __esm({
|
|
|
28881
29206
|
if (tooLarge.length > 0) {
|
|
28882
29207
|
return {
|
|
28883
29208
|
valid: [],
|
|
28884
|
-
error:
|
|
29209
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28885
29210
|
};
|
|
28886
29211
|
}
|
|
28887
29212
|
}
|
|
28888
29213
|
return { valid: files, error: null };
|
|
28889
29214
|
},
|
|
28890
|
-
[accept, maxSize, maxFiles]
|
|
29215
|
+
[accept, maxSize, maxFiles, t]
|
|
28891
29216
|
);
|
|
28892
29217
|
const handleFiles = useCallback(
|
|
28893
29218
|
(files) => {
|
|
@@ -28958,7 +29283,7 @@ var init_UploadDropZone = __esm({
|
|
|
28958
29283
|
handleClick();
|
|
28959
29284
|
}
|
|
28960
29285
|
},
|
|
28961
|
-
"aria-label":
|
|
29286
|
+
"aria-label": resolvedLabel,
|
|
28962
29287
|
children: [
|
|
28963
29288
|
/* @__PURE__ */ jsx(
|
|
28964
29289
|
"input",
|
|
@@ -28974,7 +29299,7 @@ var init_UploadDropZone = __esm({
|
|
|
28974
29299
|
}
|
|
28975
29300
|
),
|
|
28976
29301
|
error ? /* @__PURE__ */ jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
28977
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
29302
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
28978
29303
|
error ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
28979
29304
|
]
|
|
28980
29305
|
}
|
|
@@ -29396,7 +29721,7 @@ function TableView({
|
|
|
29396
29721
|
{
|
|
29397
29722
|
checked: selected.has(id),
|
|
29398
29723
|
onChange: () => toggleRow(id),
|
|
29399
|
-
"aria-label":
|
|
29724
|
+
"aria-label": t("table.selectRow", { id })
|
|
29400
29725
|
}
|
|
29401
29726
|
) }),
|
|
29402
29727
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -32105,7 +32430,7 @@ var init_QrScanner = __esm({
|
|
|
32105
32430
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
32106
32431
|
children: [
|
|
32107
32432
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
32108
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32433
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
32109
32434
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
32110
32435
|
]
|
|
32111
32436
|
}
|
|
@@ -32116,7 +32441,7 @@ var init_QrScanner = __esm({
|
|
|
32116
32441
|
position: "absolute",
|
|
32117
32442
|
display: "flex",
|
|
32118
32443
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
32119
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32444
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
32120
32445
|
}
|
|
32121
32446
|
),
|
|
32122
32447
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -32135,7 +32460,7 @@ var init_QrScanner = __esm({
|
|
|
32135
32460
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32136
32461
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32137
32462
|
),
|
|
32138
|
-
"aria-label": isPaused ? "
|
|
32463
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
32139
32464
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
32140
32465
|
}
|
|
32141
32466
|
),
|
|
@@ -32148,7 +32473,7 @@ var init_QrScanner = __esm({
|
|
|
32148
32473
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32149
32474
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32150
32475
|
),
|
|
32151
|
-
"aria-label":
|
|
32476
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
32152
32477
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
32153
32478
|
}
|
|
32154
32479
|
),
|
|
@@ -32162,7 +32487,7 @@ var init_QrScanner = __esm({
|
|
|
32162
32487
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32163
32488
|
),
|
|
32164
32489
|
"aria-label": t("aria.mockScanDev"),
|
|
32165
|
-
children: "
|
|
32490
|
+
children: t("qrScanner.mockScan")
|
|
32166
32491
|
}
|
|
32167
32492
|
)
|
|
32168
32493
|
]
|
|
@@ -32180,6 +32505,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32180
32505
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32181
32506
|
init_cn();
|
|
32182
32507
|
init_useEventBus();
|
|
32508
|
+
init_useTranslate();
|
|
32183
32509
|
init_Typography();
|
|
32184
32510
|
init_Box();
|
|
32185
32511
|
init_Label();
|
|
@@ -32189,36 +32515,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32189
32515
|
const sign = delta >= 0 ? "+" : "-";
|
|
32190
32516
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
32191
32517
|
};
|
|
32192
|
-
constraintHint = (constraint) => {
|
|
32518
|
+
constraintHint = (constraint, t) => {
|
|
32193
32519
|
if (constraint.type === "single") {
|
|
32194
|
-
return constraint.required ? "
|
|
32520
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
32195
32521
|
}
|
|
32196
32522
|
const { min, max } = constraint;
|
|
32197
32523
|
if (min && max) {
|
|
32198
|
-
return min === max ?
|
|
32524
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
32199
32525
|
}
|
|
32200
|
-
if (min) return
|
|
32201
|
-
if (max) return
|
|
32202
|
-
return "
|
|
32526
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32527
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32528
|
+
return t("optionConstraint.optional");
|
|
32203
32529
|
};
|
|
32204
|
-
validateSelection = (selected, constraint) => {
|
|
32530
|
+
validateSelection = (selected, constraint, t) => {
|
|
32205
32531
|
if (constraint.type === "single") {
|
|
32206
32532
|
if (constraint.required && selected.length === 0) {
|
|
32207
|
-
return "
|
|
32533
|
+
return t("optionConstraint.error.pickOne");
|
|
32208
32534
|
}
|
|
32209
32535
|
if (selected.length > 1) {
|
|
32210
|
-
return "
|
|
32536
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32211
32537
|
}
|
|
32212
32538
|
return void 0;
|
|
32213
32539
|
}
|
|
32214
32540
|
const { min, max } = constraint;
|
|
32215
32541
|
if (min !== void 0 && selected.length < min) {
|
|
32216
32542
|
const remaining = min - selected.length;
|
|
32217
|
-
return
|
|
32543
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32218
32544
|
}
|
|
32219
32545
|
if (max !== void 0 && selected.length > max) {
|
|
32220
32546
|
const excess = selected.length - max;
|
|
32221
|
-
return
|
|
32547
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32222
32548
|
}
|
|
32223
32549
|
return void 0;
|
|
32224
32550
|
};
|
|
@@ -32235,8 +32561,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32235
32561
|
className
|
|
32236
32562
|
}) => {
|
|
32237
32563
|
const eventBus = useEventBus();
|
|
32238
|
-
const
|
|
32239
|
-
const
|
|
32564
|
+
const { t } = useTranslate();
|
|
32565
|
+
const hint = constraintHint(constraint, t);
|
|
32566
|
+
const error = validateSelection(selected, constraint, t);
|
|
32240
32567
|
const inputName = `option-${groupId}`;
|
|
32241
32568
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32242
32569
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32336,7 +32663,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32336
32663
|
variant: "caption",
|
|
32337
32664
|
color: "warning",
|
|
32338
32665
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32339
|
-
children: "
|
|
32666
|
+
children: t("optionConstraint.outOfStock")
|
|
32340
32667
|
}
|
|
32341
32668
|
)
|
|
32342
32669
|
]
|
|
@@ -32658,6 +32985,7 @@ function changeBlockType(block, type) {
|
|
|
32658
32985
|
return { id: block.id, type, content: seed };
|
|
32659
32986
|
}
|
|
32660
32987
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32988
|
+
const { t } = useTranslate();
|
|
32661
32989
|
const [open, setOpen] = useState(false);
|
|
32662
32990
|
const ref = useRef(null);
|
|
32663
32991
|
useEffect(() => {
|
|
@@ -32677,7 +33005,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32677
33005
|
{
|
|
32678
33006
|
type: "button",
|
|
32679
33007
|
variant: "ghost",
|
|
32680
|
-
"aria-label": "
|
|
33008
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32681
33009
|
className: cn(
|
|
32682
33010
|
"inline-flex items-center justify-center",
|
|
32683
33011
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32699,7 +33027,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32699
33027
|
"py-1 text-sm"
|
|
32700
33028
|
),
|
|
32701
33029
|
children: [
|
|
32702
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
33030
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32703
33031
|
/* @__PURE__ */ jsxs(
|
|
32704
33032
|
Button,
|
|
32705
33033
|
{
|
|
@@ -32713,7 +33041,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32713
33041
|
},
|
|
32714
33042
|
children: [
|
|
32715
33043
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32716
|
-
"
|
|
33044
|
+
" ",
|
|
33045
|
+
t("richBlockEditor.duplicate")
|
|
32717
33046
|
]
|
|
32718
33047
|
}
|
|
32719
33048
|
),
|
|
@@ -32730,14 +33059,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32730
33059
|
},
|
|
32731
33060
|
children: [
|
|
32732
33061
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32733
|
-
"
|
|
33062
|
+
" ",
|
|
33063
|
+
t("common.delete")
|
|
32734
33064
|
]
|
|
32735
33065
|
}
|
|
32736
33066
|
),
|
|
32737
33067
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32738
33068
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
32739
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32740
|
-
CHANGEABLE_TYPES.filter((
|
|
33069
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
33070
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
32741
33071
|
Button,
|
|
32742
33072
|
{
|
|
32743
33073
|
type: "button",
|
|
@@ -32745,12 +33075,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32745
33075
|
role: "menuitem",
|
|
32746
33076
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32747
33077
|
onClick: () => {
|
|
32748
|
-
onChangeType(
|
|
33078
|
+
onChangeType(bt);
|
|
32749
33079
|
setOpen(false);
|
|
32750
33080
|
},
|
|
32751
|
-
children:
|
|
33081
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32752
33082
|
},
|
|
32753
|
-
|
|
33083
|
+
bt
|
|
32754
33084
|
))
|
|
32755
33085
|
] })
|
|
32756
33086
|
]
|
|
@@ -32812,6 +33142,7 @@ function BlockRow({
|
|
|
32812
33142
|
onInsertAfter,
|
|
32813
33143
|
onChangeType
|
|
32814
33144
|
}) {
|
|
33145
|
+
const { t } = useTranslate();
|
|
32815
33146
|
const setContent = useCallback(
|
|
32816
33147
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32817
33148
|
[onUpdate]
|
|
@@ -32861,8 +33192,8 @@ function BlockRow({
|
|
|
32861
33192
|
tag: "h1",
|
|
32862
33193
|
value: block.content ?? "",
|
|
32863
33194
|
readOnly,
|
|
32864
|
-
placeholder: placeholder ?? "
|
|
32865
|
-
ariaLabel: "
|
|
33195
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
33196
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32866
33197
|
className: "text-3xl font-bold leading-tight",
|
|
32867
33198
|
onValueChange: setContent
|
|
32868
33199
|
}
|
|
@@ -32874,8 +33205,8 @@ function BlockRow({
|
|
|
32874
33205
|
tag: "h2",
|
|
32875
33206
|
value: block.content ?? "",
|
|
32876
33207
|
readOnly,
|
|
32877
|
-
placeholder: placeholder ?? "
|
|
32878
|
-
ariaLabel: "
|
|
33208
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
33209
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32879
33210
|
className: "text-2xl font-semibold leading-tight",
|
|
32880
33211
|
onValueChange: setContent
|
|
32881
33212
|
}
|
|
@@ -32887,8 +33218,8 @@ function BlockRow({
|
|
|
32887
33218
|
tag: "h3",
|
|
32888
33219
|
value: block.content ?? "",
|
|
32889
33220
|
readOnly,
|
|
32890
|
-
placeholder: placeholder ?? "
|
|
32891
|
-
ariaLabel: "
|
|
33221
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33222
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32892
33223
|
className: "text-xl font-semibold leading-tight",
|
|
32893
33224
|
onValueChange: setContent
|
|
32894
33225
|
}
|
|
@@ -32900,8 +33231,8 @@ function BlockRow({
|
|
|
32900
33231
|
tag: "blockquote",
|
|
32901
33232
|
value: block.content ?? "",
|
|
32902
33233
|
readOnly,
|
|
32903
|
-
placeholder: placeholder ?? "
|
|
32904
|
-
ariaLabel: "
|
|
33234
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33235
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32905
33236
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32906
33237
|
onValueChange: setContent
|
|
32907
33238
|
}
|
|
@@ -32909,13 +33240,13 @@ function BlockRow({
|
|
|
32909
33240
|
case "code":
|
|
32910
33241
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32911
33242
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32912
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
33243
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32913
33244
|
!readOnly && /* @__PURE__ */ jsx(
|
|
32914
33245
|
Input,
|
|
32915
33246
|
{
|
|
32916
33247
|
inputType: "text",
|
|
32917
33248
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32918
|
-
"aria-label": "
|
|
33249
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32919
33250
|
className: cn(
|
|
32920
33251
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32921
33252
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32931,8 +33262,8 @@ function BlockRow({
|
|
|
32931
33262
|
tag: "pre",
|
|
32932
33263
|
value: block.content ?? "",
|
|
32933
33264
|
readOnly,
|
|
32934
|
-
placeholder: placeholder ?? "
|
|
32935
|
-
ariaLabel: "
|
|
33265
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33266
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32936
33267
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32937
33268
|
onValueChange: setContent
|
|
32938
33269
|
}
|
|
@@ -32945,7 +33276,7 @@ function BlockRow({
|
|
|
32945
33276
|
const caption = String(block.metadata?.caption ?? "");
|
|
32946
33277
|
const imgProps = {
|
|
32947
33278
|
src: url,
|
|
32948
|
-
alt: caption || "
|
|
33279
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32949
33280
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32950
33281
|
};
|
|
32951
33282
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -32959,7 +33290,8 @@ function BlockRow({
|
|
|
32959
33290
|
),
|
|
32960
33291
|
children: [
|
|
32961
33292
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32962
|
-
"
|
|
33293
|
+
" ",
|
|
33294
|
+
t("richBlockEditor.noImageUrl")
|
|
32963
33295
|
]
|
|
32964
33296
|
}
|
|
32965
33297
|
),
|
|
@@ -32970,7 +33302,7 @@ function BlockRow({
|
|
|
32970
33302
|
inputType: "url",
|
|
32971
33303
|
value: url,
|
|
32972
33304
|
placeholder: "https://example.com/image.png",
|
|
32973
|
-
"aria-label": "
|
|
33305
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32974
33306
|
className: cn(
|
|
32975
33307
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32976
33308
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32983,8 +33315,8 @@ function BlockRow({
|
|
|
32983
33315
|
{
|
|
32984
33316
|
inputType: "text",
|
|
32985
33317
|
value: caption,
|
|
32986
|
-
placeholder: "
|
|
32987
|
-
"aria-label": "
|
|
33318
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33319
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32988
33320
|
className: cn(
|
|
32989
33321
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32990
33322
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33015,8 +33347,8 @@ function BlockRow({
|
|
|
33015
33347
|
tag: "span",
|
|
33016
33348
|
value: child.content ?? "",
|
|
33017
33349
|
readOnly,
|
|
33018
|
-
placeholder: "
|
|
33019
|
-
ariaLabel: "
|
|
33350
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33351
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
33020
33352
|
className: "inline-block min-w-[1ch] flex-1",
|
|
33021
33353
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
33022
33354
|
}
|
|
@@ -33026,7 +33358,7 @@ function BlockRow({
|
|
|
33026
33358
|
{
|
|
33027
33359
|
type: "button",
|
|
33028
33360
|
variant: "ghost",
|
|
33029
|
-
"aria-label": "
|
|
33361
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
33030
33362
|
className: cn(
|
|
33031
33363
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
33032
33364
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -33048,7 +33380,8 @@ function BlockRow({
|
|
|
33048
33380
|
onClick: addListItem,
|
|
33049
33381
|
children: [
|
|
33050
33382
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
33051
|
-
"
|
|
33383
|
+
" ",
|
|
33384
|
+
t("richBlockEditor.addItem")
|
|
33052
33385
|
]
|
|
33053
33386
|
}
|
|
33054
33387
|
) })
|
|
@@ -33064,8 +33397,8 @@ function BlockRow({
|
|
|
33064
33397
|
tag: "p",
|
|
33065
33398
|
value: block.content ?? "",
|
|
33066
33399
|
readOnly,
|
|
33067
|
-
placeholder: placeholder ?? "
|
|
33068
|
-
ariaLabel: "
|
|
33400
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33401
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
33069
33402
|
className: "leading-7",
|
|
33070
33403
|
onValueChange: setContent
|
|
33071
33404
|
}
|
|
@@ -33088,7 +33421,7 @@ function BlockRow({
|
|
|
33088
33421
|
{
|
|
33089
33422
|
type: "button",
|
|
33090
33423
|
variant: "ghost",
|
|
33091
|
-
"aria-label": "
|
|
33424
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
33092
33425
|
className: cn(
|
|
33093
33426
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
33094
33427
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -33115,7 +33448,7 @@ function BlockRow({
|
|
|
33115
33448
|
}
|
|
33116
33449
|
);
|
|
33117
33450
|
}
|
|
33118
|
-
var TOOLBAR_ENTRIES,
|
|
33451
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
33119
33452
|
var init_RichBlockEditor = __esm({
|
|
33120
33453
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
33121
33454
|
"use client";
|
|
@@ -33128,29 +33461,30 @@ var init_RichBlockEditor = __esm({
|
|
|
33128
33461
|
init_Input();
|
|
33129
33462
|
init_Icon();
|
|
33130
33463
|
init_useEventBus();
|
|
33464
|
+
init_useTranslate();
|
|
33131
33465
|
TOOLBAR_ENTRIES = [
|
|
33132
|
-
{ type: "paragraph",
|
|
33133
|
-
{ type: "heading-1",
|
|
33134
|
-
{ type: "heading-2",
|
|
33135
|
-
{ type: "heading-3",
|
|
33136
|
-
{ type: "bullet-list",
|
|
33137
|
-
{ type: "numbered-list",
|
|
33138
|
-
{ type: "quote",
|
|
33139
|
-
{ type: "code",
|
|
33140
|
-
{ type: "divider",
|
|
33141
|
-
{ type: "image",
|
|
33466
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33467
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
33468
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
33469
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
33470
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
33471
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
33472
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
33473
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
33474
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
33475
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
33142
33476
|
];
|
|
33143
|
-
|
|
33144
|
-
paragraph: "
|
|
33145
|
-
"heading-1": "
|
|
33146
|
-
"heading-2": "
|
|
33147
|
-
"heading-3": "
|
|
33148
|
-
"bullet-list": "
|
|
33149
|
-
"numbered-list": "
|
|
33150
|
-
quote: "
|
|
33151
|
-
code: "
|
|
33152
|
-
divider: "
|
|
33153
|
-
image: "
|
|
33477
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33478
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33479
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33480
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33481
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33482
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33483
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33484
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33485
|
+
code: "richBlockEditor.blockType.code",
|
|
33486
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33487
|
+
image: "richBlockEditor.blockType.image"
|
|
33154
33488
|
};
|
|
33155
33489
|
CHANGEABLE_TYPES = [
|
|
33156
33490
|
"paragraph",
|
|
@@ -33184,6 +33518,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33184
33518
|
showToolbar = true,
|
|
33185
33519
|
className
|
|
33186
33520
|
}) => {
|
|
33521
|
+
const { t } = useTranslate();
|
|
33187
33522
|
const [blocks, setBlocks] = useState(
|
|
33188
33523
|
() => normalizeBlocks(initialBlocks)
|
|
33189
33524
|
);
|
|
@@ -33255,25 +33590,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33255
33590
|
Box,
|
|
33256
33591
|
{
|
|
33257
33592
|
role: "toolbar",
|
|
33258
|
-
"aria-label": "
|
|
33593
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33259
33594
|
className: cn(
|
|
33260
33595
|
"flex flex-wrap items-center gap-1",
|
|
33261
33596
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33262
33597
|
),
|
|
33263
33598
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33264
33599
|
const Icon3 = entry.icon;
|
|
33600
|
+
const entryLabel = t(entry.labelKey);
|
|
33265
33601
|
return /* @__PURE__ */ jsxs(
|
|
33266
33602
|
Button,
|
|
33267
33603
|
{
|
|
33268
33604
|
type: "button",
|
|
33269
33605
|
variant: "ghost",
|
|
33270
33606
|
size: "sm",
|
|
33271
|
-
"aria-label":
|
|
33272
|
-
title:
|
|
33607
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33608
|
+
title: entryLabel,
|
|
33273
33609
|
onClick: () => handleAppend(entry.type),
|
|
33274
33610
|
children: [
|
|
33275
33611
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33276
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33612
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33277
33613
|
]
|
|
33278
33614
|
},
|
|
33279
33615
|
entry.type
|
|
@@ -33316,6 +33652,7 @@ var init_ReplyTree = __esm({
|
|
|
33316
33652
|
"use client";
|
|
33317
33653
|
init_cn();
|
|
33318
33654
|
init_useEventBus();
|
|
33655
|
+
init_useTranslate();
|
|
33319
33656
|
init_atoms2();
|
|
33320
33657
|
init_VoteStack();
|
|
33321
33658
|
ReplyTreeNode = ({
|
|
@@ -33335,6 +33672,7 @@ var init_ReplyTree = __esm({
|
|
|
33335
33672
|
showActions
|
|
33336
33673
|
}) => {
|
|
33337
33674
|
const eventBus = useEventBus();
|
|
33675
|
+
const { t } = useTranslate();
|
|
33338
33676
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33339
33677
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33340
33678
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33381,7 +33719,7 @@ var init_ReplyTree = __esm({
|
|
|
33381
33719
|
variant: "ghost",
|
|
33382
33720
|
size: "sm",
|
|
33383
33721
|
onClick: handleToggle,
|
|
33384
|
-
"aria-label": isCollapsed ? "
|
|
33722
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33385
33723
|
"aria-expanded": !isCollapsed,
|
|
33386
33724
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33387
33725
|
className: cn(
|
|
@@ -33422,7 +33760,7 @@ var init_ReplyTree = __esm({
|
|
|
33422
33760
|
onVote: handleVote,
|
|
33423
33761
|
size: "sm",
|
|
33424
33762
|
variant: "horizontal",
|
|
33425
|
-
label:
|
|
33763
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33426
33764
|
}
|
|
33427
33765
|
),
|
|
33428
33766
|
/* @__PURE__ */ jsx(
|
|
@@ -33432,8 +33770,8 @@ var init_ReplyTree = __esm({
|
|
|
33432
33770
|
size: "sm",
|
|
33433
33771
|
leftIcon: "message-square",
|
|
33434
33772
|
onClick: handleReply,
|
|
33435
|
-
"aria-label":
|
|
33436
|
-
children: "
|
|
33773
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33774
|
+
children: t("replyTree.reply")
|
|
33437
33775
|
}
|
|
33438
33776
|
),
|
|
33439
33777
|
/* @__PURE__ */ jsx(
|
|
@@ -33443,8 +33781,8 @@ var init_ReplyTree = __esm({
|
|
|
33443
33781
|
size: "sm",
|
|
33444
33782
|
leftIcon: "flag",
|
|
33445
33783
|
onClick: handleFlag,
|
|
33446
|
-
"aria-label":
|
|
33447
|
-
children: "
|
|
33784
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33785
|
+
children: t("replyTree.flag")
|
|
33448
33786
|
}
|
|
33449
33787
|
)
|
|
33450
33788
|
] }),
|
|
@@ -33455,9 +33793,9 @@ var init_ReplyTree = __esm({
|
|
|
33455
33793
|
inputType: "textarea",
|
|
33456
33794
|
rows: 2,
|
|
33457
33795
|
value: draft,
|
|
33458
|
-
placeholder:
|
|
33796
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33459
33797
|
onChange: (e) => setDraft(e.target.value),
|
|
33460
|
-
"aria-label":
|
|
33798
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33461
33799
|
}
|
|
33462
33800
|
),
|
|
33463
33801
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33469,10 +33807,10 @@ var init_ReplyTree = __esm({
|
|
|
33469
33807
|
leftIcon: "send",
|
|
33470
33808
|
onClick: handleSubmitReply,
|
|
33471
33809
|
disabled: !draft.trim(),
|
|
33472
|
-
children: "
|
|
33810
|
+
children: t("replyTree.send")
|
|
33473
33811
|
}
|
|
33474
33812
|
),
|
|
33475
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33813
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33476
33814
|
] })
|
|
33477
33815
|
] }),
|
|
33478
33816
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33486,7 +33824,7 @@ var init_ReplyTree = __esm({
|
|
|
33486
33824
|
"self-start gap-1 px-0 h-auto",
|
|
33487
33825
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33488
33826
|
),
|
|
33489
|
-
children: "
|
|
33827
|
+
children: t("replyTree.continueThread")
|
|
33490
33828
|
}
|
|
33491
33829
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33492
33830
|
ReplyTreeNode,
|
|
@@ -33525,6 +33863,7 @@ var init_ReplyTree = __esm({
|
|
|
33525
33863
|
showActions = true,
|
|
33526
33864
|
className
|
|
33527
33865
|
}) => {
|
|
33866
|
+
const { t } = useTranslate();
|
|
33528
33867
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33529
33868
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33530
33869
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33543,7 +33882,7 @@ var init_ReplyTree = __esm({
|
|
|
33543
33882
|
});
|
|
33544
33883
|
}, []);
|
|
33545
33884
|
if (nodeList.length === 0) {
|
|
33546
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33885
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33547
33886
|
}
|
|
33548
33887
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33549
33888
|
ReplyTreeNode,
|
|
@@ -33621,6 +33960,7 @@ var init_VersionDiff = __esm({
|
|
|
33621
33960
|
"use client";
|
|
33622
33961
|
init_cn();
|
|
33623
33962
|
init_useEventBus();
|
|
33963
|
+
init_useTranslate();
|
|
33624
33964
|
init_atoms2();
|
|
33625
33965
|
init_Stack();
|
|
33626
33966
|
INLINE_STYLES = {
|
|
@@ -33643,6 +33983,7 @@ var init_VersionDiff = __esm({
|
|
|
33643
33983
|
language,
|
|
33644
33984
|
className
|
|
33645
33985
|
}) => {
|
|
33986
|
+
const { t } = useTranslate();
|
|
33646
33987
|
const eventBus = useEventBus();
|
|
33647
33988
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33648
33989
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33724,24 +34065,24 @@ var init_VersionDiff = __esm({
|
|
|
33724
34065
|
children: [
|
|
33725
34066
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33726
34067
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33727
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
34068
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33728
34069
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33729
34070
|
Select,
|
|
33730
34071
|
{
|
|
33731
34072
|
options,
|
|
33732
34073
|
value: activeBeforeId,
|
|
33733
34074
|
onChange: handleBeforeChange,
|
|
33734
|
-
"aria-label": "
|
|
34075
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33735
34076
|
}
|
|
33736
34077
|
) }),
|
|
33737
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
34078
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33738
34079
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33739
34080
|
Select,
|
|
33740
34081
|
{
|
|
33741
34082
|
options,
|
|
33742
34083
|
value: activeAfterId,
|
|
33743
34084
|
onChange: handleAfterChange,
|
|
33744
|
-
"aria-label": "
|
|
34085
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33745
34086
|
}
|
|
33746
34087
|
) }),
|
|
33747
34088
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -33762,7 +34103,7 @@ var init_VersionDiff = __esm({
|
|
|
33762
34103
|
size: "sm",
|
|
33763
34104
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33764
34105
|
onClick: handleViewToggle,
|
|
33765
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
34106
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33766
34107
|
}
|
|
33767
34108
|
),
|
|
33768
34109
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -33772,7 +34113,7 @@ var init_VersionDiff = __esm({
|
|
|
33772
34113
|
size: "sm",
|
|
33773
34114
|
icon: "rotate-ccw",
|
|
33774
34115
|
onClick: handleRevert,
|
|
33775
|
-
children: "
|
|
34116
|
+
children: t("versionDiff.revert")
|
|
33776
34117
|
}
|
|
33777
34118
|
)
|
|
33778
34119
|
] })
|
|
@@ -33789,12 +34130,12 @@ var init_VersionDiff = __esm({
|
|
|
33789
34130
|
children: [
|
|
33790
34131
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33791
34132
|
beforeRev?.label,
|
|
33792
|
-
beforeRev?.author ?
|
|
34133
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33793
34134
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33794
34135
|
] }),
|
|
33795
34136
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33796
34137
|
afterRev?.label,
|
|
33797
|
-
afterRev?.author ?
|
|
34138
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33798
34139
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33799
34140
|
] })
|
|
33800
34141
|
]
|
|
@@ -34187,10 +34528,12 @@ var init_DocPagination = __esm({
|
|
|
34187
34528
|
}
|
|
34188
34529
|
});
|
|
34189
34530
|
function DocSearch({
|
|
34190
|
-
placeholder
|
|
34531
|
+
placeholder,
|
|
34191
34532
|
onSearch,
|
|
34192
34533
|
className
|
|
34193
34534
|
}) {
|
|
34535
|
+
const { t } = useTranslate();
|
|
34536
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34194
34537
|
const [query, setQuery] = useState("");
|
|
34195
34538
|
const [results, setResults] = useState([]);
|
|
34196
34539
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34297,7 +34640,7 @@ function DocSearch({
|
|
|
34297
34640
|
Input,
|
|
34298
34641
|
{
|
|
34299
34642
|
inputType: "search",
|
|
34300
|
-
placeholder,
|
|
34643
|
+
placeholder: resolvedPlaceholder,
|
|
34301
34644
|
value: query,
|
|
34302
34645
|
onChange: handleChange,
|
|
34303
34646
|
onFocus: handleFocus,
|
|
@@ -34362,6 +34705,7 @@ var init_DocSearch = __esm({
|
|
|
34362
34705
|
init_Typography();
|
|
34363
34706
|
init_Icon();
|
|
34364
34707
|
init_Input();
|
|
34708
|
+
init_useTranslate();
|
|
34365
34709
|
}
|
|
34366
34710
|
});
|
|
34367
34711
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36366,8 +36710,8 @@ var init_SignaturePad = __esm({
|
|
|
36366
36710
|
init_useEventBus();
|
|
36367
36711
|
init_useTranslate();
|
|
36368
36712
|
SignaturePad = ({
|
|
36369
|
-
label
|
|
36370
|
-
helperText
|
|
36713
|
+
label,
|
|
36714
|
+
helperText,
|
|
36371
36715
|
strokeColor,
|
|
36372
36716
|
strokeWidth = 2,
|
|
36373
36717
|
height = 200,
|
|
@@ -36383,6 +36727,8 @@ var init_SignaturePad = __esm({
|
|
|
36383
36727
|
}) => {
|
|
36384
36728
|
const eventBus = useEventBus();
|
|
36385
36729
|
const { t } = useTranslate();
|
|
36730
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36731
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36386
36732
|
const canvasRef = useRef(null);
|
|
36387
36733
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36388
36734
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36485,7 +36831,7 @@ var init_SignaturePad = __esm({
|
|
|
36485
36831
|
);
|
|
36486
36832
|
}
|
|
36487
36833
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36488
|
-
|
|
36834
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36489
36835
|
/* @__PURE__ */ jsx(
|
|
36490
36836
|
Box,
|
|
36491
36837
|
{
|
|
@@ -36514,7 +36860,7 @@ var init_SignaturePad = __esm({
|
|
|
36514
36860
|
)
|
|
36515
36861
|
}
|
|
36516
36862
|
),
|
|
36517
|
-
|
|
36863
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36518
36864
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36519
36865
|
/* @__PURE__ */ jsx(
|
|
36520
36866
|
Button,
|
|
@@ -36524,7 +36870,7 @@ var init_SignaturePad = __esm({
|
|
|
36524
36870
|
icon: Eraser,
|
|
36525
36871
|
onClick: clearSignature,
|
|
36526
36872
|
disabled: !hasSignature,
|
|
36527
|
-
children: "
|
|
36873
|
+
children: t("signaturePad.clear")
|
|
36528
36874
|
}
|
|
36529
36875
|
),
|
|
36530
36876
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36535,7 +36881,7 @@ var init_SignaturePad = __esm({
|
|
|
36535
36881
|
icon: Check,
|
|
36536
36882
|
onClick: confirmSignature,
|
|
36537
36883
|
disabled: !hasSignature,
|
|
36538
|
-
children: "
|
|
36884
|
+
children: t("signaturePad.confirm")
|
|
36539
36885
|
}
|
|
36540
36886
|
)
|
|
36541
36887
|
] })
|
|
@@ -40980,6 +41326,7 @@ function MasterDetail({
|
|
|
40980
41326
|
className,
|
|
40981
41327
|
...rest
|
|
40982
41328
|
}) {
|
|
41329
|
+
const { t } = useTranslate();
|
|
40983
41330
|
const loading = externalLoading ?? false;
|
|
40984
41331
|
const isLoading = externalIsLoading ?? false;
|
|
40985
41332
|
const error = externalError ?? null;
|
|
@@ -40992,8 +41339,8 @@ function MasterDetail({
|
|
|
40992
41339
|
isLoading: loading || isLoading,
|
|
40993
41340
|
error,
|
|
40994
41341
|
className,
|
|
40995
|
-
emptyTitle: "
|
|
40996
|
-
emptyDescription: "
|
|
41342
|
+
emptyTitle: t("table.empty.title"),
|
|
41343
|
+
emptyDescription: t("empty.createFirst"),
|
|
40997
41344
|
...rest
|
|
40998
41345
|
}
|
|
40999
41346
|
);
|
|
@@ -41002,6 +41349,7 @@ var init_MasterDetail = __esm({
|
|
|
41002
41349
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41003
41350
|
"use client";
|
|
41004
41351
|
init_DataTable();
|
|
41352
|
+
init_useTranslate();
|
|
41005
41353
|
MasterDetail.displayName = "MasterDetail";
|
|
41006
41354
|
}
|
|
41007
41355
|
});
|
|
@@ -41010,14 +41358,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41010
41358
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41011
41359
|
init_cn();
|
|
41012
41360
|
init_Typography();
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
{
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
|
|
41019
|
-
|
|
41020
|
-
|
|
41361
|
+
init_useTranslate();
|
|
41362
|
+
DefaultEmptyDetail = () => {
|
|
41363
|
+
const { t } = useTranslate();
|
|
41364
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
41365
|
+
Typography,
|
|
41366
|
+
{
|
|
41367
|
+
variant: "body2",
|
|
41368
|
+
className: "text-muted-foreground",
|
|
41369
|
+
children: t("masterDetail.selectItem")
|
|
41370
|
+
}
|
|
41371
|
+
) });
|
|
41372
|
+
};
|
|
41021
41373
|
MasterDetailLayout = ({
|
|
41022
41374
|
master,
|
|
41023
41375
|
detail,
|
|
@@ -41144,7 +41496,7 @@ var init_MediaGallery = __esm({
|
|
|
41144
41496
|
{
|
|
41145
41497
|
icon: Image$1,
|
|
41146
41498
|
title: t("display.noMedia"),
|
|
41147
|
-
description: "
|
|
41499
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41148
41500
|
className
|
|
41149
41501
|
}
|
|
41150
41502
|
);
|
|
@@ -41161,7 +41513,7 @@ var init_MediaGallery = __esm({
|
|
|
41161
41513
|
size: "sm",
|
|
41162
41514
|
icon: Upload,
|
|
41163
41515
|
action: "MEDIA_UPLOAD",
|
|
41164
|
-
children: "
|
|
41516
|
+
children: t("mediaGallery.upload")
|
|
41165
41517
|
}
|
|
41166
41518
|
),
|
|
41167
41519
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41175,10 +41527,7 @@ var init_MediaGallery = __esm({
|
|
|
41175
41527
|
))
|
|
41176
41528
|
] })
|
|
41177
41529
|
] }),
|
|
41178
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41179
|
-
selectedItems.length,
|
|
41180
|
-
" selected"
|
|
41181
|
-
] }) }),
|
|
41530
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsx(Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
41182
41531
|
/* @__PURE__ */ jsx(
|
|
41183
41532
|
Box,
|
|
41184
41533
|
{
|
|
@@ -42052,7 +42401,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42052
42401
|
EmptyState,
|
|
42053
42402
|
{
|
|
42054
42403
|
title: t("debug.noActiveTraits"),
|
|
42055
|
-
description: "
|
|
42404
|
+
description: t("debug.traitsMountHint"),
|
|
42056
42405
|
className: "py-8"
|
|
42057
42406
|
}
|
|
42058
42407
|
);
|
|
@@ -42062,14 +42411,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42062
42411
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42063
42412
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42064
42413
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42065
|
-
/* @__PURE__ */
|
|
42066
|
-
trait.transitionCount,
|
|
42067
|
-
" transitions"
|
|
42068
|
-
] })
|
|
42414
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42069
42415
|
] }),
|
|
42070
42416
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42071
42417
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42072
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42418
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42073
42419
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42074
42420
|
Badge,
|
|
42075
42421
|
{
|
|
@@ -42081,7 +42427,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42081
42427
|
)) })
|
|
42082
42428
|
] }),
|
|
42083
42429
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42084
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42430
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42085
42431
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42086
42432
|
t2.from,
|
|
42087
42433
|
" \u2192 ",
|
|
@@ -42100,7 +42446,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42100
42446
|
] }, i)) })
|
|
42101
42447
|
] }),
|
|
42102
42448
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42103
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42449
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42104
42450
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42105
42451
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42106
42452
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42206,7 +42552,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42206
42552
|
EmptyState,
|
|
42207
42553
|
{
|
|
42208
42554
|
title: t("debug.noEntityData"),
|
|
42209
|
-
description: "
|
|
42555
|
+
description: t("debug.debugModeHint"),
|
|
42210
42556
|
className: "py-8"
|
|
42211
42557
|
}
|
|
42212
42558
|
);
|
|
@@ -42219,7 +42565,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42219
42565
|
EmptyState,
|
|
42220
42566
|
{
|
|
42221
42567
|
title: t("debug.noEntities"),
|
|
42222
|
-
description: "
|
|
42568
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42223
42569
|
className: "py-8"
|
|
42224
42570
|
}
|
|
42225
42571
|
);
|
|
@@ -42227,7 +42573,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42227
42573
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42228
42574
|
id: `singleton-${name}`,
|
|
42229
42575
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42230
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42576
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42231
42577
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42232
42578
|
] }),
|
|
42233
42579
|
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
@@ -42245,31 +42591,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42245
42591
|
}));
|
|
42246
42592
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42247
42593
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42248
|
-
/* @__PURE__ */
|
|
42249
|
-
"Singletons (",
|
|
42250
|
-
singletonItems.length,
|
|
42251
|
-
")"
|
|
42252
|
-
] }),
|
|
42594
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42253
42595
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42254
42596
|
] }),
|
|
42255
42597
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42256
|
-
/* @__PURE__ */
|
|
42257
|
-
"Runtime (",
|
|
42258
|
-
runtimeEntities.length,
|
|
42259
|
-
")"
|
|
42260
|
-
] }),
|
|
42598
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42261
42599
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42262
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42263
|
-
"+",
|
|
42264
|
-
runtimeEntities.length - 20,
|
|
42265
|
-
" more entities"
|
|
42266
|
-
] })
|
|
42600
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42267
42601
|
] }),
|
|
42268
42602
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42269
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42603
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42270
42604
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42271
42605
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42272
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42606
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42273
42607
|
] }, type)) })
|
|
42274
42608
|
] })
|
|
42275
42609
|
] });
|
|
@@ -42313,7 +42647,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42313
42647
|
EmptyState,
|
|
42314
42648
|
{
|
|
42315
42649
|
title: t("debug.noEventsYet"),
|
|
42316
|
-
description: "
|
|
42650
|
+
description: t("debug.eventsExecuteHint"),
|
|
42317
42651
|
className: "py-8"
|
|
42318
42652
|
}
|
|
42319
42653
|
);
|
|
@@ -42324,17 +42658,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42324
42658
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42325
42659
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42326
42660
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42327
|
-
/* @__PURE__ */
|
|
42661
|
+
/* @__PURE__ */ jsx(
|
|
42328
42662
|
Button,
|
|
42329
42663
|
{
|
|
42330
42664
|
size: "sm",
|
|
42331
42665
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42332
42666
|
onClick: () => setFilter("all"),
|
|
42333
|
-
children:
|
|
42334
|
-
"All (",
|
|
42335
|
-
events2.length,
|
|
42336
|
-
")"
|
|
42337
|
-
]
|
|
42667
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42338
42668
|
}
|
|
42339
42669
|
),
|
|
42340
42670
|
eventTypes.map((type) => {
|
|
@@ -42364,7 +42694,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42364
42694
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42365
42695
|
}
|
|
42366
42696
|
),
|
|
42367
|
-
"
|
|
42697
|
+
t("debug.autoScroll")
|
|
42368
42698
|
] })
|
|
42369
42699
|
] }),
|
|
42370
42700
|
/* @__PURE__ */ jsx(
|
|
@@ -42422,7 +42752,7 @@ function GuardsPanel({ guards }) {
|
|
|
42422
42752
|
EmptyState,
|
|
42423
42753
|
{
|
|
42424
42754
|
title: t("debug.noGuardEvaluations"),
|
|
42425
|
-
description: "
|
|
42755
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42426
42756
|
className: "py-8"
|
|
42427
42757
|
}
|
|
42428
42758
|
);
|
|
@@ -42453,15 +42783,15 @@ function GuardsPanel({ guards }) {
|
|
|
42453
42783
|
] }),
|
|
42454
42784
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42455
42785
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42456
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42786
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42457
42787
|
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
|
|
42458
42788
|
] }),
|
|
42459
42789
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42460
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42790
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42461
42791
|
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
42462
42792
|
] }),
|
|
42463
42793
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42464
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42794
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42465
42795
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42466
42796
|
] })
|
|
42467
42797
|
] })
|
|
@@ -42479,9 +42809,9 @@ function GuardsPanel({ guards }) {
|
|
|
42479
42809
|
] })
|
|
42480
42810
|
] }),
|
|
42481
42811
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42482
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42483
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42484
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
42812
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
42813
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
42814
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42485
42815
|
] })
|
|
42486
42816
|
] }),
|
|
42487
42817
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -42607,7 +42937,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42607
42937
|
EmptyState,
|
|
42608
42938
|
{
|
|
42609
42939
|
title: t("debug.noTransitionsRecorded"),
|
|
42610
|
-
description: "
|
|
42940
|
+
description: t("debug.transitionsProcessHint"),
|
|
42611
42941
|
className: "py-8"
|
|
42612
42942
|
}
|
|
42613
42943
|
);
|
|
@@ -42624,10 +42954,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42624
42954
|
const sorted = [...transitions].reverse();
|
|
42625
42955
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42626
42956
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42627
|
-
/* @__PURE__ */
|
|
42628
|
-
transitions.length,
|
|
42629
|
-
" transitions recorded"
|
|
42630
|
-
] }),
|
|
42957
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42631
42958
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42632
42959
|
/* @__PURE__ */ jsx(
|
|
42633
42960
|
Checkbox,
|
|
@@ -42636,7 +42963,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42636
42963
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42637
42964
|
}
|
|
42638
42965
|
),
|
|
42639
|
-
"
|
|
42966
|
+
t("debug.autoScroll")
|
|
42640
42967
|
] })
|
|
42641
42968
|
] }),
|
|
42642
42969
|
/* @__PURE__ */ jsx(
|
|
@@ -42679,15 +43006,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42679
43006
|
variant: trace.guardResult ? "success" : "danger",
|
|
42680
43007
|
size: "sm",
|
|
42681
43008
|
children: [
|
|
42682
|
-
"
|
|
43009
|
+
t("debug.guardLabel"),
|
|
43010
|
+
" ",
|
|
42683
43011
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42684
43012
|
]
|
|
42685
43013
|
}
|
|
42686
43014
|
),
|
|
42687
|
-
/* @__PURE__ */
|
|
42688
|
-
trace.effects.length,
|
|
42689
|
-
" effects"
|
|
42690
|
-
] })
|
|
43015
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42691
43016
|
] }),
|
|
42692
43017
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42693
43018
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -42736,13 +43061,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42736
43061
|
EmptyState,
|
|
42737
43062
|
{
|
|
42738
43063
|
title: t("debug.noBridgeData"),
|
|
42739
|
-
description: "
|
|
43064
|
+
description: t("debug.bridgeInitHint"),
|
|
42740
43065
|
className: "py-8"
|
|
42741
43066
|
}
|
|
42742
43067
|
);
|
|
42743
43068
|
}
|
|
42744
43069
|
const formatTime4 = (ts) => {
|
|
42745
|
-
if (ts === 0) return "
|
|
43070
|
+
if (ts === 0) return t("debug.never");
|
|
42746
43071
|
const d = new Date(ts);
|
|
42747
43072
|
return d.toLocaleTimeString("en-US", {
|
|
42748
43073
|
hour12: false,
|
|
@@ -42755,14 +43080,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42755
43080
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42756
43081
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42757
43082
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
42758
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43083
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42759
43084
|
] }),
|
|
42760
43085
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
42761
43086
|
/* @__PURE__ */ jsx(
|
|
42762
43087
|
StatRow,
|
|
42763
43088
|
{
|
|
42764
43089
|
label: t("debug.status"),
|
|
42765
|
-
value: bridge.connected ? "
|
|
43090
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
42766
43091
|
variant: bridge.connected ? "success" : "danger"
|
|
42767
43092
|
}
|
|
42768
43093
|
),
|
|
@@ -42790,13 +43115,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42790
43115
|
] })
|
|
42791
43116
|
] }),
|
|
42792
43117
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
42793
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43118
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
42794
43119
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
42795
43120
|
] }),
|
|
42796
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
42797
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
42798
|
-
" total events processed"
|
|
42799
|
-
] }) })
|
|
43121
|
+
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
42800
43122
|
] }) });
|
|
42801
43123
|
}
|
|
42802
43124
|
var init_ServerBridgeTab = __esm({
|
|
@@ -42906,7 +43228,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42906
43228
|
EmptyState,
|
|
42907
43229
|
{
|
|
42908
43230
|
title: t("debug.noActiveTraits"),
|
|
42909
|
-
description: "
|
|
43231
|
+
description: t("debug.traitsInitHint"),
|
|
42910
43232
|
className: "py-8"
|
|
42911
43233
|
}
|
|
42912
43234
|
);
|
|
@@ -42923,7 +43245,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42923
43245
|
};
|
|
42924
43246
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
42925
43247
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42926
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43248
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
42927
43249
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42928
43250
|
trait.name,
|
|
42929
43251
|
": ",
|
|
@@ -42931,8 +43253,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42931
43253
|
] }, trait.id)) })
|
|
42932
43254
|
] }),
|
|
42933
43255
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42934
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
42935
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43256
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43257
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42936
43258
|
/* @__PURE__ */ jsx(
|
|
42937
43259
|
Button,
|
|
42938
43260
|
{
|
|
@@ -42944,15 +43266,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42944
43266
|
}
|
|
42945
43267
|
),
|
|
42946
43268
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
42947
|
-
transitions.some((
|
|
43269
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
42948
43270
|
] }, event)) })
|
|
42949
43271
|
] }),
|
|
42950
43272
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42951
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43273
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
42952
43274
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
42953
43275
|
] }),
|
|
42954
43276
|
log12.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42955
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43277
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
42956
43278
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
42957
43279
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
42958
43280
|
" ",
|
|
@@ -42983,21 +43305,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
42983
43305
|
}
|
|
42984
43306
|
});
|
|
42985
43307
|
function ServerResponseRow({ sr }) {
|
|
43308
|
+
const { t } = useTranslate();
|
|
42986
43309
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
42987
43310
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
42988
43311
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42989
43312
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
42990
43313
|
sr.success ? "\u2713" : "\u2717",
|
|
42991
|
-
"
|
|
43314
|
+
" ",
|
|
43315
|
+
t("debug.server")
|
|
42992
43316
|
] }),
|
|
42993
43317
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
42994
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
42995
|
-
sr.clientEffects,
|
|
42996
|
-
" clientEffect",
|
|
42997
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
42998
|
-
] }),
|
|
43318
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
42999
43319
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43000
|
-
"
|
|
43320
|
+
t("debug.emitLabel"),
|
|
43321
|
+
" ",
|
|
43001
43322
|
sr.emittedEvents.join(", ")
|
|
43002
43323
|
] }),
|
|
43003
43324
|
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -43005,13 +43326,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43005
43326
|
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
43006
43327
|
name,
|
|
43007
43328
|
": ",
|
|
43008
|
-
count
|
|
43009
|
-
" row",
|
|
43010
|
-
count !== 1 ? "s" : ""
|
|
43329
|
+
t("debug.rowsCount", { count })
|
|
43011
43330
|
] }, name)) })
|
|
43012
43331
|
] });
|
|
43013
43332
|
}
|
|
43014
43333
|
function TransitionRow({ trace }) {
|
|
43334
|
+
const { t } = useTranslate();
|
|
43015
43335
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43016
43336
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43017
43337
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43019,7 +43339,7 @@ function TransitionRow({ trace }) {
|
|
|
43019
43339
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43020
43340
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43021
43341
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43022
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43342
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43023
43343
|
] }),
|
|
43024
43344
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43025
43345
|
] });
|
|
@@ -43060,6 +43380,7 @@ function VerifyModePanel({
|
|
|
43060
43380
|
serverCount,
|
|
43061
43381
|
localCount
|
|
43062
43382
|
}) {
|
|
43383
|
+
const { t } = useTranslate();
|
|
43063
43384
|
const [expanded, setExpanded] = React84.useState(true);
|
|
43064
43385
|
const scrollRef = React84.useRef(null);
|
|
43065
43386
|
const prevCountRef = React84.useRef(0);
|
|
@@ -43090,30 +43411,20 @@ function VerifyModePanel({
|
|
|
43090
43411
|
onClick: () => setExpanded((v) => !v),
|
|
43091
43412
|
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",
|
|
43092
43413
|
"aria-expanded": expanded,
|
|
43093
|
-
"aria-label": expanded ? "
|
|
43414
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43094
43415
|
"data-testid": "debugger-verify-toggle",
|
|
43095
43416
|
children: [
|
|
43096
43417
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43097
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43098
|
-
/* @__PURE__ */
|
|
43099
|
-
|
|
43100
|
-
" local"
|
|
43101
|
-
] }),
|
|
43102
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43103
|
-
serverCount,
|
|
43104
|
-
" server"
|
|
43105
|
-
] }),
|
|
43418
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43419
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43420
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43106
43421
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43107
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43108
|
-
transitions.length,
|
|
43109
|
-
" transition",
|
|
43110
|
-
transitions.length !== 1 ? "s" : ""
|
|
43111
|
-
] })
|
|
43422
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43112
43423
|
]
|
|
43113
43424
|
}
|
|
43114
43425
|
),
|
|
43115
43426
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43116
|
-
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
43427
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
43117
43428
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43118
43429
|
] })
|
|
43119
43430
|
]
|
|
@@ -43129,6 +43440,7 @@ function RuntimeDebugger({
|
|
|
43129
43440
|
defaultTab,
|
|
43130
43441
|
schema
|
|
43131
43442
|
}) {
|
|
43443
|
+
const { t } = useTranslate();
|
|
43132
43444
|
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43133
43445
|
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43134
43446
|
const debugData = useDebugData();
|
|
@@ -43167,55 +43479,55 @@ function RuntimeDebugger({
|
|
|
43167
43479
|
const tabItems = [
|
|
43168
43480
|
{
|
|
43169
43481
|
id: "dispatch",
|
|
43170
|
-
label: "
|
|
43482
|
+
label: t("debug.tabDispatch"),
|
|
43171
43483
|
badge: debugData.traits.length || void 0,
|
|
43172
43484
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43173
43485
|
},
|
|
43174
43486
|
{
|
|
43175
43487
|
id: "verify",
|
|
43176
|
-
label: failedChecks > 0 ? "
|
|
43488
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43177
43489
|
badge: verification.summary.totalChecks || void 0,
|
|
43178
43490
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43179
43491
|
},
|
|
43180
43492
|
{
|
|
43181
43493
|
id: "timeline",
|
|
43182
|
-
label: "
|
|
43494
|
+
label: t("debug.tabTimeline"),
|
|
43183
43495
|
badge: verification.transitions.length || void 0,
|
|
43184
43496
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43185
43497
|
},
|
|
43186
43498
|
{
|
|
43187
43499
|
id: "bridge",
|
|
43188
|
-
label: "
|
|
43500
|
+
label: t("debug.tabBridge"),
|
|
43189
43501
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43190
43502
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43191
43503
|
},
|
|
43192
43504
|
{
|
|
43193
43505
|
id: "traits",
|
|
43194
|
-
label: "
|
|
43506
|
+
label: t("debug.tabTraits"),
|
|
43195
43507
|
badge: debugData.traits.length || void 0,
|
|
43196
43508
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43197
43509
|
},
|
|
43198
43510
|
{
|
|
43199
43511
|
id: "ticks",
|
|
43200
|
-
label: "
|
|
43201
|
-
badge: debugData.ticks.filter((
|
|
43512
|
+
label: t("debug.tabTicks"),
|
|
43513
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43202
43514
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43203
43515
|
},
|
|
43204
43516
|
{
|
|
43205
43517
|
id: "entities",
|
|
43206
|
-
label: "
|
|
43518
|
+
label: t("debug.tabEntities"),
|
|
43207
43519
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43208
43520
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43209
43521
|
},
|
|
43210
43522
|
{
|
|
43211
43523
|
id: "events",
|
|
43212
|
-
label: "
|
|
43524
|
+
label: t("debug.tabEvents"),
|
|
43213
43525
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43214
43526
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43215
43527
|
},
|
|
43216
43528
|
{
|
|
43217
43529
|
id: "guards",
|
|
43218
|
-
label: "
|
|
43530
|
+
label: t("debug.tabGuards"),
|
|
43219
43531
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43220
43532
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43221
43533
|
}
|
|
@@ -43243,15 +43555,10 @@ function RuntimeDebugger({
|
|
|
43243
43555
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43244
43556
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43245
43557
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43246
|
-
"
|
|
43558
|
+
" ",
|
|
43559
|
+
t("debug.debugger")
|
|
43247
43560
|
] }),
|
|
43248
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43249
|
-
failedChecks,
|
|
43250
|
-
" failed"
|
|
43251
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43252
|
-
debugData.traits.length,
|
|
43253
|
-
" traits"
|
|
43254
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43561
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
43255
43562
|
] })
|
|
43256
43563
|
}
|
|
43257
43564
|
),
|
|
@@ -43269,9 +43576,9 @@ function RuntimeDebugger({
|
|
|
43269
43576
|
);
|
|
43270
43577
|
}
|
|
43271
43578
|
if (mode === "verify") {
|
|
43272
|
-
const traitStates = debugData.traits.map((
|
|
43273
|
-
const serverEntries = verification.transitions.filter((
|
|
43274
|
-
const localEntries = verification.transitions.filter((
|
|
43579
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43580
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43581
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43275
43582
|
return /* @__PURE__ */ jsx(
|
|
43276
43583
|
VerifyModePanel,
|
|
43277
43584
|
{
|
|
@@ -43303,7 +43610,7 @@ function RuntimeDebugger({
|
|
|
43303
43610
|
variant: "secondary",
|
|
43304
43611
|
size: "sm",
|
|
43305
43612
|
className: "runtime-debugger__toggle",
|
|
43306
|
-
title: "
|
|
43613
|
+
title: t("debug.openDebugger"),
|
|
43307
43614
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43308
43615
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43309
43616
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43313,11 +43620,8 @@ function RuntimeDebugger({
|
|
|
43313
43620
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43314
43621
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43315
43622
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43316
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43317
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43318
|
-
failedChecks,
|
|
43319
|
-
" failed"
|
|
43320
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43623
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43624
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
43321
43625
|
] }),
|
|
43322
43626
|
/* @__PURE__ */ jsx(
|
|
43323
43627
|
Button,
|
|
@@ -43325,7 +43629,7 @@ function RuntimeDebugger({
|
|
|
43325
43629
|
onClick: () => setIsCollapsed(true),
|
|
43326
43630
|
variant: "ghost",
|
|
43327
43631
|
size: "sm",
|
|
43328
|
-
title: "
|
|
43632
|
+
title: t("debug.close"),
|
|
43329
43633
|
children: "x"
|
|
43330
43634
|
}
|
|
43331
43635
|
)
|
|
@@ -43339,7 +43643,7 @@ function RuntimeDebugger({
|
|
|
43339
43643
|
className: "runtime-debugger__tabs"
|
|
43340
43644
|
}
|
|
43341
43645
|
) }),
|
|
43342
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43646
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43343
43647
|
] })
|
|
43344
43648
|
}
|
|
43345
43649
|
);
|
|
@@ -43365,6 +43669,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43365
43669
|
init_TransitionTimeline();
|
|
43366
43670
|
init_ServerBridgeTab();
|
|
43367
43671
|
init_EventDispatcherTab();
|
|
43672
|
+
init_useTranslate();
|
|
43368
43673
|
init_RuntimeDebugger();
|
|
43369
43674
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43370
43675
|
}
|
|
@@ -44653,7 +44958,7 @@ var init_StatCard = __esm({
|
|
|
44653
44958
|
}
|
|
44654
44959
|
);
|
|
44655
44960
|
}
|
|
44656
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
44961
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
44657
44962
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
44658
44963
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
44659
44964
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -44696,7 +45001,7 @@ var init_StatCard = __esm({
|
|
|
44696
45001
|
]
|
|
44697
45002
|
}
|
|
44698
45003
|
),
|
|
44699
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45004
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
44700
45005
|
] }),
|
|
44701
45006
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
44702
45007
|
] }),
|