@almadar/ui 5.21.8 → 5.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +960 -649
- package/dist/avl/index.js +960 -649
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +665 -369
- package/dist/components/index.js +665 -369
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +665 -369
- package/dist/providers/index.js +665 -369
- package/dist/runtime/index.cjs +665 -369
- package/dist/runtime/index.js +665 -369
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -347,7 +347,10 @@ var en_default;
|
|
|
347
347
|
var init_en = __esm({
|
|
348
348
|
"locales/en.json"() {
|
|
349
349
|
en_default = {
|
|
350
|
-
$meta: {
|
|
350
|
+
$meta: {
|
|
351
|
+
locale: "en",
|
|
352
|
+
direction: "ltr"
|
|
353
|
+
},
|
|
351
354
|
"common.save": "Save",
|
|
352
355
|
"common.cancel": "Cancel",
|
|
353
356
|
"common.delete": "Delete",
|
|
@@ -489,7 +492,6 @@ var init_en = __esm({
|
|
|
489
492
|
"error.somethingWentWrong": "Something went wrong",
|
|
490
493
|
"error.loadingItems": "Loading items...",
|
|
491
494
|
"error.noItemsFound": "No items found",
|
|
492
|
-
"error.notFound": "Not found",
|
|
493
495
|
"debug.noEntityData": "No entity data",
|
|
494
496
|
"debug.noEntities": "No entities",
|
|
495
497
|
"debug.noTicks": "No ticks registered",
|
|
@@ -521,7 +523,298 @@ var init_en = __esm({
|
|
|
521
523
|
"template.showcase": "Showcase",
|
|
522
524
|
"template.faq": "Frequently Asked Questions",
|
|
523
525
|
"template.ourTeam": "Our Team",
|
|
524
|
-
"template.caseStudies": "Case Studies"
|
|
526
|
+
"template.caseStudies": "Case Studies",
|
|
527
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
528
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
529
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
530
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
531
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
532
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
533
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
534
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
535
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
536
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
537
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
538
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
539
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
540
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
541
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
542
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
543
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
544
|
+
"richBlockEditor.blockType.code": "Code",
|
|
545
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
546
|
+
"richBlockEditor.blockType.image": "Image",
|
|
547
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
548
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
549
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
550
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
551
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
552
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
553
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
554
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
555
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
556
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
557
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
558
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
559
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
560
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
561
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
562
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
563
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
564
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
565
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
566
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
567
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
568
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
569
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
570
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
571
|
+
"richBlockEditor.addItem": "Add item",
|
|
572
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
573
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
574
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
575
|
+
"versionDiff.compare": "Compare",
|
|
576
|
+
"versionDiff.to": "to",
|
|
577
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
578
|
+
"versionDiff.afterRevision": "After revision",
|
|
579
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
580
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
581
|
+
"versionDiff.revert": "Revert",
|
|
582
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
583
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
584
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
585
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
586
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
587
|
+
"violationAlert.adminLabel": "Admin:",
|
|
588
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
589
|
+
"violationAlert.goToField": "Go to field",
|
|
590
|
+
"branchingLogic.title": "Branching logic",
|
|
591
|
+
"branchingLogic.if": "If",
|
|
592
|
+
"branchingLogic.goTo": "go to",
|
|
593
|
+
"branchingLogic.rules": "Rules",
|
|
594
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
595
|
+
"branchingLogic.addRule": "Add rule",
|
|
596
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
597
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
598
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
599
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
600
|
+
"branchingLogic.selectTarget": "Select target",
|
|
601
|
+
"branchingLogic.selectValue": "Select value",
|
|
602
|
+
"branchingLogic.addValue": "Add value",
|
|
603
|
+
"branchingLogic.value": "Value",
|
|
604
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
605
|
+
"branchingLogic.operatorEquals": "equals",
|
|
606
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
607
|
+
"branchingLogic.operatorContains": "contains",
|
|
608
|
+
"branchingLogic.operatorIn": "is one of",
|
|
609
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
610
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
611
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
612
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
613
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
614
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
615
|
+
"filterGroup.filters": "Filters",
|
|
616
|
+
"filterGroup.all": "All",
|
|
617
|
+
"filterGroup.clear": "Clear",
|
|
618
|
+
"filterGroup.clearAll": "Clear all",
|
|
619
|
+
"filterGroup.from": "From",
|
|
620
|
+
"filterGroup.to": "To",
|
|
621
|
+
"filterGroup.allOf": "All {{label}}",
|
|
622
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
623
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
624
|
+
"debug.expression": "Expression",
|
|
625
|
+
"debug.inputs": "Inputs",
|
|
626
|
+
"debug.trait": "Trait",
|
|
627
|
+
"debug.filterAll": "All",
|
|
628
|
+
"debug.filterPassed": "Passed",
|
|
629
|
+
"debug.filterFailed": "Failed",
|
|
630
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
631
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
632
|
+
"debug.activeStates": "Active States",
|
|
633
|
+
"debug.availableEvents": "Available Events",
|
|
634
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
635
|
+
"debug.guarded": "guarded",
|
|
636
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
637
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
638
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
639
|
+
"debug.states": "States",
|
|
640
|
+
"debug.transitions": "Transitions",
|
|
641
|
+
"debug.guards": "Guards",
|
|
642
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
643
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
644
|
+
"debug.singleton": "Singleton",
|
|
645
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
646
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
647
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
648
|
+
"debug.persistent": "Persistent",
|
|
649
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
650
|
+
"debug.notLoaded": "not loaded",
|
|
651
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
652
|
+
"debug.allCount": "All ({{count}})",
|
|
653
|
+
"debug.autoScroll": "Auto-scroll",
|
|
654
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
655
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
656
|
+
"debug.guardLabel": "guard:",
|
|
657
|
+
"debug.effectsCount": "{{count}} effects",
|
|
658
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
659
|
+
"debug.never": "Never",
|
|
660
|
+
"debug.connected": "Connected",
|
|
661
|
+
"debug.disconnected": "Disconnected",
|
|
662
|
+
"debug.lastError": "Last Error",
|
|
663
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
664
|
+
"debug.server": "server",
|
|
665
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
666
|
+
"debug.emitLabel": "emit:",
|
|
667
|
+
"debug.rowsCount": "{{count}} rows",
|
|
668
|
+
"debug.serverResponse": "server response",
|
|
669
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
670
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
671
|
+
"debug.failCount": "{{count}} fail",
|
|
672
|
+
"debug.ok": "OK",
|
|
673
|
+
"debug.localCount": "{{count}} local",
|
|
674
|
+
"debug.serverCount": "{{count}} server",
|
|
675
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
676
|
+
"debug.tabDispatch": "Dispatch",
|
|
677
|
+
"debug.tabVerify": "Verify",
|
|
678
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
679
|
+
"debug.tabTimeline": "Timeline",
|
|
680
|
+
"debug.tabBridge": "Bridge",
|
|
681
|
+
"debug.tabTraits": "Traits",
|
|
682
|
+
"debug.tabTicks": "Ticks",
|
|
683
|
+
"debug.tabEntities": "Entities",
|
|
684
|
+
"debug.tabEvents": "Events",
|
|
685
|
+
"debug.tabGuards": "Guards",
|
|
686
|
+
"debug.debugger": "Debugger",
|
|
687
|
+
"debug.failedCount": "{{count}} failed",
|
|
688
|
+
"debug.traitsCount": "{{count}} traits",
|
|
689
|
+
"debug.idle": "Idle",
|
|
690
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
691
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
692
|
+
"debug.allPassing": "All passing",
|
|
693
|
+
"debug.runtime": "Runtime",
|
|
694
|
+
"debug.close": "Close (`)",
|
|
695
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
696
|
+
"replyTree.expandReplies": "Expand replies",
|
|
697
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
698
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
699
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
700
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
701
|
+
"replyTree.reply": "Reply",
|
|
702
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
703
|
+
"replyTree.flag": "Flag",
|
|
704
|
+
"replyTree.send": "Send",
|
|
705
|
+
"replyTree.continueThread": "Continue thread",
|
|
706
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
707
|
+
"signaturePad.label": "Signature",
|
|
708
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
709
|
+
"signaturePad.clear": "Clear",
|
|
710
|
+
"signaturePad.confirm": "Confirm",
|
|
711
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
712
|
+
"qrScanner.paused": "Paused",
|
|
713
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
714
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
715
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
716
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
717
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
718
|
+
"docSearch.placeholder": "Search documentation...",
|
|
719
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
720
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
721
|
+
"avl.trigger": "Trigger",
|
|
722
|
+
"avl.guard": "Guard",
|
|
723
|
+
"avl.effects": "Effects",
|
|
724
|
+
"avl.props": "Props",
|
|
725
|
+
"avl.entity": "Entity",
|
|
726
|
+
"avl.traits": "Traits",
|
|
727
|
+
"avl.transition": "Transition",
|
|
728
|
+
"avl.onEntity": "on {{entity}}",
|
|
729
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
730
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
731
|
+
"avl.zoomIn": "Zoom in",
|
|
732
|
+
"avl.zoomOut": "Zoom out",
|
|
733
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
734
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
735
|
+
"avl.noTraitData": "No trait data",
|
|
736
|
+
"avl.computingLayout": "Computing layout...",
|
|
737
|
+
"avl.noStateMachine": "No state machine",
|
|
738
|
+
"avl.listensFor": "listens for {{event}}",
|
|
739
|
+
"avl.emits": "emits {{event}}",
|
|
740
|
+
"avl.pageLayout": "Page Layout",
|
|
741
|
+
"avl.overlaySuffix": "(overlay)",
|
|
742
|
+
"orbPreview.previewBadge": "Preview",
|
|
743
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
744
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
745
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
746
|
+
"orbPreview.noPreview": "No preview available",
|
|
747
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
748
|
+
"detailView.noTransitionData": "No transition data",
|
|
749
|
+
"orbInspector.required": "req",
|
|
750
|
+
"orbInspector.addField": "Add Field",
|
|
751
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
752
|
+
"orbInspector.standalone": "Standalone",
|
|
753
|
+
"orbInspector.embedded": "Embedded",
|
|
754
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
755
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
756
|
+
"orbInspector.addEffect": "Add Effect",
|
|
757
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
758
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
759
|
+
"orbInspector.tokens": "Tokens",
|
|
760
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
761
|
+
"orbInspector.variant": "Variant",
|
|
762
|
+
"orbInspector.size": "Size",
|
|
763
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
764
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
765
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
766
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
767
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
768
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
769
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
770
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
771
|
+
"orbInspector.tab.styles": "Styles",
|
|
772
|
+
"orbInspector.tab.code": "Code",
|
|
773
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
774
|
+
"canvas.overview": "Overview",
|
|
775
|
+
"canvas.expanded": "Expanded",
|
|
776
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
777
|
+
"canvas.screensCount": "{{count}} screens",
|
|
778
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
779
|
+
"lawReference.viewFullText": "View full law text",
|
|
780
|
+
"statCard.defaultLabel": "Stat",
|
|
781
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
782
|
+
"mediaGallery.upload": "Upload",
|
|
783
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
784
|
+
"pagination.jumpPlaceholder": "Page",
|
|
785
|
+
"table.selectRow": "Select row {{id}}",
|
|
786
|
+
"card.selectItem": "Select {{item}}",
|
|
787
|
+
"card.itemFallback": "item",
|
|
788
|
+
"fileTree.noFiles": "No files",
|
|
789
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
790
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
791
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
792
|
+
"upload.dropFilesHere": "Drop files here",
|
|
793
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
794
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
795
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
796
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
797
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
798
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
799
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
800
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
801
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
802
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
803
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
804
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
805
|
+
"optionConstraint.optional": "Optional",
|
|
806
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
807
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
808
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
809
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
810
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
811
|
+
"stateMachine.pinned": "Pinned",
|
|
812
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
813
|
+
"stateMachine.externalEffects": "External Effects",
|
|
814
|
+
"stateMachine.legend.initial": "Initial",
|
|
815
|
+
"stateMachine.legend.final": "Final",
|
|
816
|
+
"stateMachine.legend.state": "State",
|
|
817
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
525
818
|
};
|
|
526
819
|
}
|
|
527
820
|
});
|
|
@@ -5504,6 +5797,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5504
5797
|
init_Typography();
|
|
5505
5798
|
init_Divider();
|
|
5506
5799
|
init_cn();
|
|
5800
|
+
init_useTranslate();
|
|
5507
5801
|
positionStyles2 = {
|
|
5508
5802
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5509
5803
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5522,6 +5816,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5522
5816
|
position = "top",
|
|
5523
5817
|
className
|
|
5524
5818
|
}) => {
|
|
5819
|
+
const { t } = useTranslate();
|
|
5525
5820
|
const [isVisible, setIsVisible] = React84__namespace.default.useState(false);
|
|
5526
5821
|
const timeoutRef = React84__namespace.default.useRef(null);
|
|
5527
5822
|
const handleMouseEnter = () => {
|
|
@@ -5605,7 +5900,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5605
5900
|
target: "_blank",
|
|
5606
5901
|
rel: "noopener noreferrer",
|
|
5607
5902
|
onClick: (e) => e.stopPropagation(),
|
|
5608
|
-
children: "
|
|
5903
|
+
children: t("lawReference.viewFullText")
|
|
5609
5904
|
}
|
|
5610
5905
|
)
|
|
5611
5906
|
] }),
|
|
@@ -13507,6 +13802,7 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13507
13802
|
var init_BehaviorView = __esm({
|
|
13508
13803
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13509
13804
|
"use client";
|
|
13805
|
+
init_useTranslate();
|
|
13510
13806
|
init_AvlState();
|
|
13511
13807
|
init_AvlTransitionLane();
|
|
13512
13808
|
init_AvlSwimLane();
|
|
@@ -13516,6 +13812,7 @@ var init_BehaviorView = __esm({
|
|
|
13516
13812
|
SWIM_GUTTER = 120;
|
|
13517
13813
|
CENTER_W = 360;
|
|
13518
13814
|
BehaviorView = ({ data }) => {
|
|
13815
|
+
const { t } = useTranslate();
|
|
13519
13816
|
const [layout, setLayout] = React84.useState(null);
|
|
13520
13817
|
const traitName = data.traits[0]?.name;
|
|
13521
13818
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13525,10 +13822,10 @@ var init_BehaviorView = __esm({
|
|
|
13525
13822
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
13526
13823
|
}, [dataKey]);
|
|
13527
13824
|
if (!traitData) {
|
|
13528
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13825
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
13529
13826
|
}
|
|
13530
13827
|
if (!layout) {
|
|
13531
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13828
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.computingLayout") });
|
|
13532
13829
|
}
|
|
13533
13830
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
13534
13831
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -13544,10 +13841,7 @@ var init_BehaviorView = __esm({
|
|
|
13544
13841
|
const machineHeight = scaledH + 100;
|
|
13545
13842
|
const renderMachine = /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
13546
13843
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
13547
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13548
|
-
"on ",
|
|
13549
|
-
traitData.linkedEntity
|
|
13550
|
-
] }),
|
|
13844
|
+
/* @__PURE__ */ jsxRuntime.jsx("text", { x: CENTER_W / 2, y: 36, textAnchor: "middle", fill: "var(--color-muted-foreground)", fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.onEntity", { entity: traitData.linkedEntity }) }),
|
|
13551
13845
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
13552
13846
|
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
13553
13847
|
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -13855,7 +14149,7 @@ var init_CodeBlock = __esm({
|
|
|
13855
14149
|
const isLolo = language === "lolo";
|
|
13856
14150
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
13857
14151
|
const eventBus = useEventBus();
|
|
13858
|
-
const { t
|
|
14152
|
+
const { t } = useTranslate();
|
|
13859
14153
|
const scrollRef = React84.useRef(null);
|
|
13860
14154
|
const codeRef = React84.useRef(null);
|
|
13861
14155
|
const savedScrollLeftRef = React84.useRef(0);
|
|
@@ -14110,7 +14404,7 @@ var init_CodeBlock = __esm({
|
|
|
14110
14404
|
size: "sm",
|
|
14111
14405
|
onClick: handleCopy,
|
|
14112
14406
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
14113
|
-
"aria-label": "
|
|
14407
|
+
"aria-label": t("common.copy"),
|
|
14114
14408
|
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
14115
14409
|
}
|
|
14116
14410
|
)
|
|
@@ -14715,7 +15009,7 @@ var init_StateMachineView = __esm({
|
|
|
14715
15009
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14716
15010
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14717
15011
|
const isSingle2 = bundle.labels.length === 1;
|
|
14718
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
15012
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14719
15013
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
14720
15014
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
14721
15015
|
const cx = fromState.x;
|
|
@@ -14841,7 +15135,7 @@ var init_StateMachineView = __esm({
|
|
|
14841
15135
|
const controlX = midX + perpX;
|
|
14842
15136
|
const controlY = midY + perpY;
|
|
14843
15137
|
const isSingle = bundle.labels.length === 1;
|
|
14844
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
15138
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14845
15139
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
14846
15140
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
14847
15141
|
const curveMidpoint = {
|
|
@@ -14996,7 +15290,7 @@ var init_StateMachineView = __esm({
|
|
|
14996
15290
|
{
|
|
14997
15291
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
14998
15292
|
style: { backgroundColor: "var(--color-success)" },
|
|
14999
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
15293
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
15000
15294
|
}
|
|
15001
15295
|
),
|
|
15002
15296
|
!isSingle && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -15018,10 +15312,7 @@ var init_StateMachineView = __esm({
|
|
|
15018
15312
|
{
|
|
15019
15313
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
15020
15314
|
style: { backgroundColor: "var(--color-accent)" },
|
|
15021
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
15022
|
-
bundle.labels.length,
|
|
15023
|
-
" events"
|
|
15024
|
-
] })
|
|
15315
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
15025
15316
|
}
|
|
15026
15317
|
)
|
|
15027
15318
|
]
|
|
@@ -15166,7 +15457,7 @@ var init_StateMachineView = __esm({
|
|
|
15166
15457
|
align: "center",
|
|
15167
15458
|
className: "mb-2",
|
|
15168
15459
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
15169
|
-
children: "
|
|
15460
|
+
children: t("stateMachine.externalEffects")
|
|
15170
15461
|
}
|
|
15171
15462
|
),
|
|
15172
15463
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15186,10 +15477,10 @@ var init_StateMachineView = __esm({
|
|
|
15186
15477
|
Legend = ({ config, y }) => {
|
|
15187
15478
|
const { t } = useTranslate();
|
|
15188
15479
|
const items = [
|
|
15189
|
-
{ label: "
|
|
15190
|
-
{ label: "
|
|
15191
|
-
{ label: "
|
|
15192
|
-
{ label: "
|
|
15480
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15481
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
15482
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
15483
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
15193
15484
|
];
|
|
15194
15485
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15195
15486
|
HStack,
|
|
@@ -15204,8 +15495,8 @@ var init_StateMachineView = __esm({
|
|
|
15204
15495
|
{
|
|
15205
15496
|
className: "w-3 h-3 rounded-full",
|
|
15206
15497
|
style: {
|
|
15207
|
-
backgroundColor: item.
|
|
15208
|
-
border: item.
|
|
15498
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
15499
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
15209
15500
|
}
|
|
15210
15501
|
}
|
|
15211
15502
|
),
|
|
@@ -15217,7 +15508,7 @@ var init_StateMachineView = __esm({
|
|
|
15217
15508
|
children: item.label
|
|
15218
15509
|
}
|
|
15219
15510
|
)
|
|
15220
|
-
] }, item.
|
|
15511
|
+
] }, item.key))
|
|
15221
15512
|
}
|
|
15222
15513
|
);
|
|
15223
15514
|
};
|
|
@@ -16011,13 +16302,13 @@ var init_JazariStateMachine = __esm({
|
|
|
16011
16302
|
);
|
|
16012
16303
|
}, [resolvedTrait, entityFields]);
|
|
16013
16304
|
if (isLoading) {
|
|
16014
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: "
|
|
16305
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
16015
16306
|
}
|
|
16016
16307
|
if (error) {
|
|
16017
16308
|
return /* @__PURE__ */ jsxRuntime.jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
16018
16309
|
}
|
|
16019
16310
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
16020
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
16311
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
16021
16312
|
}
|
|
16022
16313
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16023
16314
|
StateMachineView,
|
|
@@ -17061,13 +17352,13 @@ var init_LayoutPatterns = __esm({
|
|
|
17061
17352
|
function generateRuleId() {
|
|
17062
17353
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
17063
17354
|
}
|
|
17064
|
-
function questionsToOptions(questions,
|
|
17355
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
17065
17356
|
const opts = questions.map((q) => ({
|
|
17066
17357
|
value: q.id,
|
|
17067
17358
|
label: q.label
|
|
17068
17359
|
}));
|
|
17069
|
-
if (
|
|
17070
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
17360
|
+
if (endOfSurveyLabel !== null) {
|
|
17361
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
17071
17362
|
}
|
|
17072
17363
|
return opts;
|
|
17073
17364
|
}
|
|
@@ -17076,7 +17367,7 @@ function isRuleBroken(rule, questions) {
|
|
|
17076
17367
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
17077
17368
|
return !sourceExists || !targetExists;
|
|
17078
17369
|
}
|
|
17079
|
-
var END_OF_SURVEY,
|
|
17370
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
17080
17371
|
var init_BranchingLogicBuilder = __esm({
|
|
17081
17372
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
17082
17373
|
"use client";
|
|
@@ -17089,14 +17380,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17089
17380
|
init_FilterPill();
|
|
17090
17381
|
init_Box();
|
|
17091
17382
|
init_useEventBus();
|
|
17383
|
+
init_useTranslate();
|
|
17092
17384
|
init_cn();
|
|
17093
17385
|
END_OF_SURVEY = "end-of-survey";
|
|
17094
|
-
OPERATOR_OPTIONS = [
|
|
17095
|
-
{ value: "equals", label: "equals" },
|
|
17096
|
-
{ value: "not-equals", label: "does not equal" },
|
|
17097
|
-
{ value: "contains", label: "contains" },
|
|
17098
|
-
{ value: "in", label: "is one of" }
|
|
17099
|
-
];
|
|
17100
17386
|
RuleRow = ({
|
|
17101
17387
|
rule,
|
|
17102
17388
|
questions,
|
|
@@ -17105,8 +17391,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17105
17391
|
onChange,
|
|
17106
17392
|
onDelete
|
|
17107
17393
|
}) => {
|
|
17108
|
-
const
|
|
17109
|
-
const
|
|
17394
|
+
const { t } = useTranslate();
|
|
17395
|
+
const operatorOptions = React84.useMemo(
|
|
17396
|
+
() => [
|
|
17397
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
17398
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
17399
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
17400
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
17401
|
+
],
|
|
17402
|
+
[t]
|
|
17403
|
+
);
|
|
17404
|
+
const sourceOptions = React84.useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
17405
|
+
const targetOptions = React84.useMemo(
|
|
17406
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
17407
|
+
[questions, t]
|
|
17408
|
+
);
|
|
17110
17409
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
17111
17410
|
const valueOptions = React84.useMemo(() => {
|
|
17112
17411
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -17151,22 +17450,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17151
17450
|
),
|
|
17152
17451
|
children: [
|
|
17153
17452
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
17154
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
17453
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
17155
17454
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17156
17455
|
Select,
|
|
17157
17456
|
{
|
|
17158
17457
|
options: sourceOptions,
|
|
17159
17458
|
value: rule.sourceQuestionId,
|
|
17160
|
-
placeholder: "
|
|
17459
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
17161
17460
|
onChange: handleSource,
|
|
17162
17461
|
disabled: readOnly,
|
|
17163
|
-
error: broken ? "
|
|
17462
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
17164
17463
|
}
|
|
17165
17464
|
) }),
|
|
17166
17465
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17167
17466
|
Select,
|
|
17168
17467
|
{
|
|
17169
|
-
options:
|
|
17468
|
+
options: operatorOptions,
|
|
17170
17469
|
value: rule.operator,
|
|
17171
17470
|
onChange: handleOperator,
|
|
17172
17471
|
disabled: readOnly
|
|
@@ -17189,7 +17488,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17189
17488
|
{
|
|
17190
17489
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
17191
17490
|
value: "",
|
|
17192
|
-
placeholder: "
|
|
17491
|
+
placeholder: t("branchingLogic.addValue"),
|
|
17193
17492
|
onChange: handleAddChip,
|
|
17194
17493
|
disabled: readOnly
|
|
17195
17494
|
}
|
|
@@ -17197,7 +17496,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17197
17496
|
Input,
|
|
17198
17497
|
{
|
|
17199
17498
|
inputType: "text",
|
|
17200
|
-
placeholder: "
|
|
17499
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
17201
17500
|
value: "",
|
|
17202
17501
|
onKeyDown: (e) => {
|
|
17203
17502
|
if (e.key !== "Enter") return;
|
|
@@ -17215,7 +17514,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17215
17514
|
{
|
|
17216
17515
|
options: valueOptions,
|
|
17217
17516
|
value: scalarValue,
|
|
17218
|
-
placeholder: "
|
|
17517
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
17219
17518
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
17220
17519
|
disabled: readOnly
|
|
17221
17520
|
}
|
|
@@ -17223,7 +17522,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17223
17522
|
Input,
|
|
17224
17523
|
{
|
|
17225
17524
|
inputType: "text",
|
|
17226
|
-
placeholder: "
|
|
17525
|
+
placeholder: t("branchingLogic.value"),
|
|
17227
17526
|
value: scalarValue,
|
|
17228
17527
|
onChange: handleScalarValue,
|
|
17229
17528
|
disabled: readOnly
|
|
@@ -17231,17 +17530,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17231
17530
|
) }),
|
|
17232
17531
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
17233
17532
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.ArrowRight, { className: "h-4 w-4" }),
|
|
17234
|
-
"
|
|
17533
|
+
t("branchingLogic.goTo")
|
|
17235
17534
|
] }),
|
|
17236
17535
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17237
17536
|
Select,
|
|
17238
17537
|
{
|
|
17239
17538
|
options: targetOptions,
|
|
17240
17539
|
value: rule.targetQuestionId,
|
|
17241
|
-
placeholder: "
|
|
17540
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
17242
17541
|
onChange: handleTarget,
|
|
17243
17542
|
disabled: readOnly,
|
|
17244
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
17543
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
17245
17544
|
}
|
|
17246
17545
|
) }),
|
|
17247
17546
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17253,11 +17552,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17253
17552
|
action: "DELETE_RULE",
|
|
17254
17553
|
actionPayload: { ruleId: rule.id },
|
|
17255
17554
|
onClick: onDelete,
|
|
17256
|
-
"aria-label": "
|
|
17555
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
17257
17556
|
}
|
|
17258
17557
|
)
|
|
17259
17558
|
] }),
|
|
17260
|
-
broken && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "error", size: "sm", label: "
|
|
17559
|
+
broken && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
17261
17560
|
]
|
|
17262
17561
|
}
|
|
17263
17562
|
);
|
|
@@ -17267,10 +17566,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17267
17566
|
NODE_GAP_Y = 80;
|
|
17268
17567
|
PADDING = 32;
|
|
17269
17568
|
LogicGraph = ({ questions, rules }) => {
|
|
17569
|
+
const { t } = useTranslate();
|
|
17570
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17270
17571
|
const layout = React84.useMemo(() => {
|
|
17271
17572
|
const items = [
|
|
17272
17573
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
17273
|
-
{ id: END_OF_SURVEY, label:
|
|
17574
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
17274
17575
|
];
|
|
17275
17576
|
const positions = {};
|
|
17276
17577
|
items.forEach((item, i) => {
|
|
@@ -17282,14 +17583,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17282
17583
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
17283
17584
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
17284
17585
|
return { items, positions, width, height };
|
|
17285
|
-
}, [questions]);
|
|
17586
|
+
}, [questions, endOfSurveyLabel]);
|
|
17286
17587
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17287
17588
|
"svg",
|
|
17288
17589
|
{
|
|
17289
17590
|
width: layout.width,
|
|
17290
17591
|
height: layout.height,
|
|
17291
17592
|
role: "img",
|
|
17292
|
-
"aria-label": "
|
|
17593
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
17293
17594
|
style: { display: "block" },
|
|
17294
17595
|
children: [
|
|
17295
17596
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17397,6 +17698,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17397
17698
|
readOnly = false,
|
|
17398
17699
|
className
|
|
17399
17700
|
}) => {
|
|
17701
|
+
const { t } = useTranslate();
|
|
17400
17702
|
const eventBus = useEventBus();
|
|
17401
17703
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17402
17704
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17449,16 +17751,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17449
17751
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
17450
17752
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
17451
17753
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
17452
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
17754
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
17453
17755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17454
17756
|
Badge,
|
|
17455
17757
|
{
|
|
17456
17758
|
variant: "neutral",
|
|
17457
17759
|
size: "sm",
|
|
17458
|
-
label:
|
|
17760
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
17459
17761
|
}
|
|
17460
17762
|
),
|
|
17461
|
-
brokenCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17763
|
+
brokenCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17764
|
+
Badge,
|
|
17765
|
+
{
|
|
17766
|
+
variant: "error",
|
|
17767
|
+
size: "sm",
|
|
17768
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
17769
|
+
}
|
|
17770
|
+
)
|
|
17462
17771
|
] }),
|
|
17463
17772
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
17464
17773
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17469,7 +17778,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17469
17778
|
leftIcon: LucideIcons2.Pencil,
|
|
17470
17779
|
action: "VIEW_EDIT",
|
|
17471
17780
|
onClick: () => setView("edit"),
|
|
17472
|
-
children: "
|
|
17781
|
+
children: t("branchingLogic.rules")
|
|
17473
17782
|
}
|
|
17474
17783
|
),
|
|
17475
17784
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17480,13 +17789,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17480
17789
|
leftIcon: LucideIcons2.Eye,
|
|
17481
17790
|
action: "VIEW_GRAPH",
|
|
17482
17791
|
onClick: () => setView("graph"),
|
|
17483
|
-
children: "
|
|
17792
|
+
children: t("branchingLogic.logicGraph")
|
|
17484
17793
|
}
|
|
17485
17794
|
)
|
|
17486
17795
|
] })
|
|
17487
17796
|
] }),
|
|
17488
17797
|
view === "edit" ? /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
17489
|
-
rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
17798
|
+
rules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17490
17799
|
RuleRow,
|
|
17491
17800
|
{
|
|
17492
17801
|
rule,
|
|
@@ -17507,7 +17816,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17507
17816
|
action: "ADD_RULE",
|
|
17508
17817
|
onClick: handleAddRule,
|
|
17509
17818
|
disabled: noQuestions,
|
|
17510
|
-
children: "
|
|
17819
|
+
children: t("branchingLogic.addRule")
|
|
17511
17820
|
}
|
|
17512
17821
|
) })
|
|
17513
17822
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(LogicGraph, { questions, rules })
|
|
@@ -18067,7 +18376,7 @@ function CalendarGrid({
|
|
|
18067
18376
|
onClick: stepPrev,
|
|
18068
18377
|
"aria-disabled": !canPrev || void 0,
|
|
18069
18378
|
"aria-label": t("aria.previousDays"),
|
|
18070
|
-
children: "
|
|
18379
|
+
children: t("nav.previous")
|
|
18071
18380
|
}
|
|
18072
18381
|
),
|
|
18073
18382
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -18080,7 +18389,7 @@ function CalendarGrid({
|
|
|
18080
18389
|
onClick: stepNext,
|
|
18081
18390
|
"aria-disabled": !canNext || void 0,
|
|
18082
18391
|
"aria-label": t("aria.nextDays"),
|
|
18083
|
-
children: "
|
|
18392
|
+
children: t("nav.next")
|
|
18084
18393
|
}
|
|
18085
18394
|
)
|
|
18086
18395
|
] }),
|
|
@@ -19630,7 +19939,7 @@ var init_Pagination = __esm({
|
|
|
19630
19939
|
type: "number",
|
|
19631
19940
|
value: jumpToPage,
|
|
19632
19941
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
19633
|
-
placeholder: "
|
|
19942
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
19634
19943
|
className: "w-20",
|
|
19635
19944
|
onKeyDown: (e) => {
|
|
19636
19945
|
if (e.key === "Enter") {
|
|
@@ -19768,13 +20077,10 @@ var init_CardGrid = __esm({
|
|
|
19768
20077
|
return children;
|
|
19769
20078
|
}
|
|
19770
20079
|
if (isLoading) {
|
|
19771
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
20080
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
19772
20081
|
}
|
|
19773
20082
|
if (error) {
|
|
19774
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsxRuntime.
|
|
19775
|
-
"Error loading items: ",
|
|
19776
|
-
error.message
|
|
19777
|
-
] }) });
|
|
20083
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
19778
20084
|
}
|
|
19779
20085
|
if (normalizedData.length === 0) {
|
|
19780
20086
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -23626,7 +23932,7 @@ function DataGrid({
|
|
|
23626
23932
|
onChange: () => toggleSelection(id),
|
|
23627
23933
|
onClick: (e) => e.stopPropagation(),
|
|
23628
23934
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
23629
|
-
"aria-label":
|
|
23935
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
23630
23936
|
}
|
|
23631
23937
|
),
|
|
23632
23938
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -23824,7 +24130,7 @@ function formatDate3(value) {
|
|
|
23824
24130
|
if (isNaN(d.getTime())) return String(value);
|
|
23825
24131
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
23826
24132
|
}
|
|
23827
|
-
function formatValue2(value, format) {
|
|
24133
|
+
function formatValue2(value, format, boolLabels) {
|
|
23828
24134
|
if (value === void 0 || value === null) return "";
|
|
23829
24135
|
switch (format) {
|
|
23830
24136
|
case "date":
|
|
@@ -23836,7 +24142,7 @@ function formatValue2(value, format) {
|
|
|
23836
24142
|
case "percent":
|
|
23837
24143
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
23838
24144
|
case "boolean":
|
|
23839
|
-
return value ? "Yes" : "No";
|
|
24145
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
23840
24146
|
default:
|
|
23841
24147
|
return String(value);
|
|
23842
24148
|
}
|
|
@@ -24132,7 +24438,7 @@ function DataList({
|
|
|
24132
24438
|
field.label ?? fieldLabel3(field.name),
|
|
24133
24439
|
":"
|
|
24134
24440
|
] }),
|
|
24135
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
24441
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
24136
24442
|
] }, field.name);
|
|
24137
24443
|
}) }),
|
|
24138
24444
|
progressFields.map((field) => {
|
|
@@ -24262,6 +24568,7 @@ var init_FileTree = __esm({
|
|
|
24262
24568
|
init_Box();
|
|
24263
24569
|
init_Typography();
|
|
24264
24570
|
init_Icon();
|
|
24571
|
+
init_useTranslate();
|
|
24265
24572
|
TreeNodeItem = ({
|
|
24266
24573
|
node,
|
|
24267
24574
|
depth,
|
|
@@ -24347,8 +24654,9 @@ var init_FileTree = __esm({
|
|
|
24347
24654
|
className,
|
|
24348
24655
|
indent = 16
|
|
24349
24656
|
}) => {
|
|
24657
|
+
const { t } = useTranslate();
|
|
24350
24658
|
if (tree.length === 0) {
|
|
24351
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
24659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24352
24660
|
}
|
|
24353
24661
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24354
24662
|
TreeNodeItem,
|
|
@@ -24403,6 +24711,7 @@ var init_FilterGroup = __esm({
|
|
|
24403
24711
|
init_Icon();
|
|
24404
24712
|
init_useEventBus();
|
|
24405
24713
|
init_useQuerySingleton();
|
|
24714
|
+
init_useTranslate();
|
|
24406
24715
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24407
24716
|
lookStyles6 = {
|
|
24408
24717
|
toolbar: "",
|
|
@@ -24423,6 +24732,7 @@ var init_FilterGroup = __esm({
|
|
|
24423
24732
|
isLoading,
|
|
24424
24733
|
look = "toolbar"
|
|
24425
24734
|
}) => {
|
|
24735
|
+
const { t } = useTranslate();
|
|
24426
24736
|
const eventBus = useEventBus();
|
|
24427
24737
|
const queryState = useQuerySingleton(query);
|
|
24428
24738
|
const [selectedValues, setSelectedValues] = React84.useState(
|
|
@@ -24504,7 +24814,7 @@ var init_FilterGroup = __esm({
|
|
|
24504
24814
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
24505
24815
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24506
24816
|
),
|
|
24507
|
-
children: "
|
|
24817
|
+
children: t("filterGroup.all")
|
|
24508
24818
|
}
|
|
24509
24819
|
),
|
|
24510
24820
|
filter.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24532,7 +24842,7 @@ var init_FilterGroup = __esm({
|
|
|
24532
24842
|
size: "sm",
|
|
24533
24843
|
onClick: handleClearAll,
|
|
24534
24844
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24535
|
-
children: "
|
|
24845
|
+
children: t("filterGroup.clear")
|
|
24536
24846
|
}
|
|
24537
24847
|
)
|
|
24538
24848
|
]
|
|
@@ -24543,7 +24853,7 @@ var init_FilterGroup = __esm({
|
|
|
24543
24853
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
24544
24854
|
showIcon && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
24545
24855
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24546
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24856
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24547
24857
|
] }),
|
|
24548
24858
|
filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
24549
24859
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -24566,7 +24876,7 @@ var init_FilterGroup = __esm({
|
|
|
24566
24876
|
`${filter.field}_from`,
|
|
24567
24877
|
e.target.value || null
|
|
24568
24878
|
),
|
|
24569
|
-
placeholder: "
|
|
24879
|
+
placeholder: t("filterGroup.from"),
|
|
24570
24880
|
clearable: true,
|
|
24571
24881
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
24572
24882
|
}
|
|
@@ -24580,7 +24890,7 @@ var init_FilterGroup = __esm({
|
|
|
24580
24890
|
`${filter.field}_to`,
|
|
24581
24891
|
e.target.value || null
|
|
24582
24892
|
),
|
|
24583
|
-
placeholder: "
|
|
24893
|
+
placeholder: t("filterGroup.to"),
|
|
24584
24894
|
clearable: true,
|
|
24585
24895
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
24586
24896
|
}
|
|
@@ -24600,7 +24910,7 @@ var init_FilterGroup = __esm({
|
|
|
24600
24910
|
value: selectedValues[filter.field] || "all",
|
|
24601
24911
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24602
24912
|
options: [
|
|
24603
|
-
{ value: "all", label: "
|
|
24913
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24604
24914
|
...filter.options?.map((opt) => ({
|
|
24605
24915
|
value: opt,
|
|
24606
24916
|
label: opt
|
|
@@ -24617,7 +24927,7 @@ var init_FilterGroup = __esm({
|
|
|
24617
24927
|
onClick: handleClearAll,
|
|
24618
24928
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24619
24929
|
className: "self-start",
|
|
24620
|
-
children: "
|
|
24930
|
+
children: t("filterGroup.clearAll")
|
|
24621
24931
|
}
|
|
24622
24932
|
)
|
|
24623
24933
|
] });
|
|
@@ -24683,7 +24993,7 @@ var init_FilterGroup = __esm({
|
|
|
24683
24993
|
value: selectedValues[filter.field] || "all",
|
|
24684
24994
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24685
24995
|
options: [
|
|
24686
|
-
{ value: "all", label:
|
|
24996
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
24687
24997
|
...filter.options?.map((opt) => ({
|
|
24688
24998
|
value: opt,
|
|
24689
24999
|
label: opt
|
|
@@ -24712,7 +25022,7 @@ var init_FilterGroup = __esm({
|
|
|
24712
25022
|
field
|
|
24713
25023
|
);
|
|
24714
25024
|
}),
|
|
24715
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
25025
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
24716
25026
|
] })
|
|
24717
25027
|
]
|
|
24718
25028
|
}
|
|
@@ -24737,7 +25047,7 @@ var init_FilterGroup = __esm({
|
|
|
24737
25047
|
className: "text-muted-foreground",
|
|
24738
25048
|
children: [
|
|
24739
25049
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24740
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
25050
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24741
25051
|
]
|
|
24742
25052
|
}
|
|
24743
25053
|
),
|
|
@@ -24763,7 +25073,7 @@ var init_FilterGroup = __esm({
|
|
|
24763
25073
|
`${filter.field}_from`,
|
|
24764
25074
|
e.target.value || null
|
|
24765
25075
|
),
|
|
24766
|
-
placeholder: "
|
|
25076
|
+
placeholder: t("filterGroup.from"),
|
|
24767
25077
|
clearable: true,
|
|
24768
25078
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
24769
25079
|
className: "min-w-[130px]"
|
|
@@ -24779,7 +25089,7 @@ var init_FilterGroup = __esm({
|
|
|
24779
25089
|
`${filter.field}_to`,
|
|
24780
25090
|
e.target.value || null
|
|
24781
25091
|
),
|
|
24782
|
-
placeholder: "
|
|
25092
|
+
placeholder: t("filterGroup.to"),
|
|
24783
25093
|
clearable: true,
|
|
24784
25094
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
24785
25095
|
className: "min-w-[130px]"
|
|
@@ -24801,7 +25111,7 @@ var init_FilterGroup = __esm({
|
|
|
24801
25111
|
value: selectedValues[filter.field] || "all",
|
|
24802
25112
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24803
25113
|
options: [
|
|
24804
|
-
{ value: "all", label: "
|
|
25114
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24805
25115
|
...filter.options?.map((opt) => ({
|
|
24806
25116
|
value: opt,
|
|
24807
25117
|
label: opt
|
|
@@ -24812,10 +25122,7 @@ var init_FilterGroup = __esm({
|
|
|
24812
25122
|
)
|
|
24813
25123
|
] }, filter.field)),
|
|
24814
25124
|
activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
24815
|
-
/* @__PURE__ */ jsxRuntime.
|
|
24816
|
-
activeFilterCount,
|
|
24817
|
-
" active"
|
|
24818
|
-
] }),
|
|
25125
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
24819
25126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24820
25127
|
Button,
|
|
24821
25128
|
{
|
|
@@ -24823,7 +25130,7 @@ var init_FilterGroup = __esm({
|
|
|
24823
25130
|
size: "sm",
|
|
24824
25131
|
onClick: handleClearAll,
|
|
24825
25132
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24826
|
-
children: "
|
|
25133
|
+
children: t("filterGroup.clearAll")
|
|
24827
25134
|
}
|
|
24828
25135
|
)
|
|
24829
25136
|
] })
|
|
@@ -25767,19 +26074,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25767
26074
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25768
26075
|
}
|
|
25769
26076
|
});
|
|
25770
|
-
var
|
|
26077
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
25771
26078
|
var init_ViolationAlert = __esm({
|
|
25772
26079
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25773
26080
|
init_cn();
|
|
26081
|
+
init_useTranslate();
|
|
25774
26082
|
init_Box();
|
|
25775
26083
|
init_Stack();
|
|
25776
26084
|
init_Typography();
|
|
25777
26085
|
init_Button();
|
|
25778
26086
|
init_Icon();
|
|
25779
|
-
|
|
25780
|
-
measure: "
|
|
25781
|
-
admin: "
|
|
25782
|
-
penalty: "
|
|
26087
|
+
actionTypeLabelKeys = {
|
|
26088
|
+
measure: "violationAlert.actionType.measure",
|
|
26089
|
+
admin: "violationAlert.actionType.admin",
|
|
26090
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25783
26091
|
};
|
|
25784
26092
|
actionTypeIcons = {
|
|
25785
26093
|
measure: "alert-triangle",
|
|
@@ -25796,10 +26104,11 @@ var init_ViolationAlert = __esm({
|
|
|
25796
26104
|
className,
|
|
25797
26105
|
...flatProps
|
|
25798
26106
|
}) => {
|
|
26107
|
+
const { t } = useTranslate();
|
|
25799
26108
|
const resolvedViolation = violation ?? {
|
|
25800
26109
|
law: "",
|
|
25801
26110
|
article: "",
|
|
25802
|
-
message: flatProps.message ?? "
|
|
26111
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25803
26112
|
actionType: "measure"
|
|
25804
26113
|
};
|
|
25805
26114
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25884,7 +26193,7 @@ var init_ViolationAlert = __esm({
|
|
|
25884
26193
|
{
|
|
25885
26194
|
variant: "caption",
|
|
25886
26195
|
className: cn(textColor, "opacity-75"),
|
|
25887
|
-
children:
|
|
26196
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25888
26197
|
}
|
|
25889
26198
|
)
|
|
25890
26199
|
] })
|
|
@@ -25915,7 +26224,7 @@ var init_ViolationAlert = __esm({
|
|
|
25915
26224
|
{
|
|
25916
26225
|
variant: "caption",
|
|
25917
26226
|
className: cn(textColor, "opacity-75"),
|
|
25918
|
-
children: "
|
|
26227
|
+
children: t("violationAlert.adminLabel")
|
|
25919
26228
|
}
|
|
25920
26229
|
),
|
|
25921
26230
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25934,7 +26243,7 @@ var init_ViolationAlert = __esm({
|
|
|
25934
26243
|
{
|
|
25935
26244
|
variant: "caption",
|
|
25936
26245
|
className: cn(textColor, "opacity-75"),
|
|
25937
|
-
children: "
|
|
26246
|
+
children: t("violationAlert.penaltyLabel")
|
|
25938
26247
|
}
|
|
25939
26248
|
),
|
|
25940
26249
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25959,7 +26268,7 @@ var init_ViolationAlert = __esm({
|
|
|
25959
26268
|
className: cn(textColor, "self-start"),
|
|
25960
26269
|
children: [
|
|
25961
26270
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25962
|
-
"
|
|
26271
|
+
t("violationAlert.goToField")
|
|
25963
26272
|
]
|
|
25964
26273
|
}
|
|
25965
26274
|
)
|
|
@@ -26275,6 +26584,7 @@ var init_LineChart = __esm({
|
|
|
26275
26584
|
"use client";
|
|
26276
26585
|
init_cn();
|
|
26277
26586
|
init_atoms2();
|
|
26587
|
+
init_useTranslate();
|
|
26278
26588
|
LineChart2 = ({
|
|
26279
26589
|
data,
|
|
26280
26590
|
width = 400,
|
|
@@ -26286,6 +26596,7 @@ var init_LineChart = __esm({
|
|
|
26286
26596
|
areaColor = "var(--color-primary)",
|
|
26287
26597
|
className
|
|
26288
26598
|
}) => {
|
|
26599
|
+
const { t } = useTranslate();
|
|
26289
26600
|
const gradientId = React84.useId();
|
|
26290
26601
|
const safeData = data ?? [];
|
|
26291
26602
|
const sortedData = React84.useMemo(() => {
|
|
@@ -26322,7 +26633,7 @@ var init_LineChart = __esm({
|
|
|
26322
26633
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
26323
26634
|
}, [linePath, points, height, showArea]);
|
|
26324
26635
|
if (safeData.length === 0) {
|
|
26325
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
26636
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
26326
26637
|
}
|
|
26327
26638
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26328
26639
|
"svg",
|
|
@@ -28229,6 +28540,7 @@ var init_GraphView = __esm({
|
|
|
28229
28540
|
"use client";
|
|
28230
28541
|
init_cn();
|
|
28231
28542
|
init_atoms2();
|
|
28543
|
+
init_useTranslate();
|
|
28232
28544
|
GROUP_COLORS = [
|
|
28233
28545
|
"#3b82f6",
|
|
28234
28546
|
// blue-500
|
|
@@ -28261,6 +28573,7 @@ var init_GraphView = __esm({
|
|
|
28261
28573
|
showLabels = true,
|
|
28262
28574
|
zoomToFit = true
|
|
28263
28575
|
}) => {
|
|
28576
|
+
const { t } = useTranslate();
|
|
28264
28577
|
const containerRef = React84.useRef(null);
|
|
28265
28578
|
const animRef = React84.useRef(0);
|
|
28266
28579
|
const [simNodes, setSimNodes] = React84.useState([]);
|
|
@@ -28438,7 +28751,7 @@ var init_GraphView = __esm({
|
|
|
28438
28751
|
[onNodeClick]
|
|
28439
28752
|
);
|
|
28440
28753
|
if (nodes.length === 0) {
|
|
28441
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-muted-foreground text-sm", children: "
|
|
28754
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
28442
28755
|
}
|
|
28443
28756
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28444
28757
|
Box,
|
|
@@ -28894,11 +29207,12 @@ var init_UploadDropZone = __esm({
|
|
|
28894
29207
|
init_Icon();
|
|
28895
29208
|
init_Typography();
|
|
28896
29209
|
init_useEventBus();
|
|
29210
|
+
init_useTranslate();
|
|
28897
29211
|
UploadDropZone = ({
|
|
28898
29212
|
accept,
|
|
28899
29213
|
maxSize,
|
|
28900
29214
|
maxFiles = 1,
|
|
28901
|
-
label
|
|
29215
|
+
label,
|
|
28902
29216
|
description,
|
|
28903
29217
|
disabled = false,
|
|
28904
29218
|
action,
|
|
@@ -28906,22 +29220,24 @@ var init_UploadDropZone = __esm({
|
|
|
28906
29220
|
onFiles,
|
|
28907
29221
|
className
|
|
28908
29222
|
}) => {
|
|
29223
|
+
const { t } = useTranslate();
|
|
29224
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28909
29225
|
const [isDragOver, setIsDragOver] = React84.useState(false);
|
|
28910
29226
|
const [error, setError] = React84.useState(null);
|
|
28911
29227
|
const inputRef = React84.useRef(null);
|
|
28912
29228
|
const eventBus = useSafeEventBus7();
|
|
28913
29229
|
const defaultDescription = [
|
|
28914
|
-
accept ?
|
|
28915
|
-
maxSize ?
|
|
28916
|
-
maxFiles > 1 ?
|
|
29230
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
29231
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
29232
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28917
29233
|
].filter(Boolean).join(". ");
|
|
28918
29234
|
const validateFiles = React84.useCallback(
|
|
28919
29235
|
(files) => {
|
|
28920
29236
|
if (files.length > maxFiles) {
|
|
28921
|
-
return { valid: [], error:
|
|
29237
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28922
29238
|
}
|
|
28923
29239
|
if (accept) {
|
|
28924
|
-
const acceptedTypes = accept.split(",").map((
|
|
29240
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28925
29241
|
const invalid = files.filter((file) => {
|
|
28926
29242
|
return !acceptedTypes.some((type) => {
|
|
28927
29243
|
if (type.endsWith("/*")) {
|
|
@@ -28931,7 +29247,7 @@ var init_UploadDropZone = __esm({
|
|
|
28931
29247
|
});
|
|
28932
29248
|
});
|
|
28933
29249
|
if (invalid.length > 0) {
|
|
28934
|
-
return { valid: [], error:
|
|
29250
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28935
29251
|
}
|
|
28936
29252
|
}
|
|
28937
29253
|
if (maxSize) {
|
|
@@ -28939,13 +29255,13 @@ var init_UploadDropZone = __esm({
|
|
|
28939
29255
|
if (tooLarge.length > 0) {
|
|
28940
29256
|
return {
|
|
28941
29257
|
valid: [],
|
|
28942
|
-
error:
|
|
29258
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28943
29259
|
};
|
|
28944
29260
|
}
|
|
28945
29261
|
}
|
|
28946
29262
|
return { valid: files, error: null };
|
|
28947
29263
|
},
|
|
28948
|
-
[accept, maxSize, maxFiles]
|
|
29264
|
+
[accept, maxSize, maxFiles, t]
|
|
28949
29265
|
);
|
|
28950
29266
|
const handleFiles = React84.useCallback(
|
|
28951
29267
|
(files) => {
|
|
@@ -29016,7 +29332,7 @@ var init_UploadDropZone = __esm({
|
|
|
29016
29332
|
handleClick();
|
|
29017
29333
|
}
|
|
29018
29334
|
},
|
|
29019
|
-
"aria-label":
|
|
29335
|
+
"aria-label": resolvedLabel,
|
|
29020
29336
|
children: [
|
|
29021
29337
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29022
29338
|
"input",
|
|
@@ -29032,7 +29348,7 @@ var init_UploadDropZone = __esm({
|
|
|
29032
29348
|
}
|
|
29033
29349
|
),
|
|
29034
29350
|
error ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
29035
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
29351
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
29036
29352
|
error ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
29037
29353
|
]
|
|
29038
29354
|
}
|
|
@@ -29454,7 +29770,7 @@ function TableView({
|
|
|
29454
29770
|
{
|
|
29455
29771
|
checked: selected.has(id),
|
|
29456
29772
|
onChange: () => toggleRow(id),
|
|
29457
|
-
"aria-label":
|
|
29773
|
+
"aria-label": t("table.selectRow", { id })
|
|
29458
29774
|
}
|
|
29459
29775
|
) }),
|
|
29460
29776
|
hasRenderProp ? /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -32163,7 +32479,7 @@ var init_QrScanner = __esm({
|
|
|
32163
32479
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
32164
32480
|
children: [
|
|
32165
32481
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
32166
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32482
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
32167
32483
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
32168
32484
|
]
|
|
32169
32485
|
}
|
|
@@ -32174,7 +32490,7 @@ var init_QrScanner = __esm({
|
|
|
32174
32490
|
position: "absolute",
|
|
32175
32491
|
display: "flex",
|
|
32176
32492
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
32177
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32493
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
32178
32494
|
}
|
|
32179
32495
|
),
|
|
32180
32496
|
showCameraControls && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -32193,7 +32509,7 @@ var init_QrScanner = __esm({
|
|
|
32193
32509
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32194
32510
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32195
32511
|
),
|
|
32196
|
-
"aria-label": isPaused ? "
|
|
32512
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
32197
32513
|
children: isPaused ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
32198
32514
|
}
|
|
32199
32515
|
),
|
|
@@ -32206,7 +32522,7 @@ var init_QrScanner = __esm({
|
|
|
32206
32522
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32207
32523
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32208
32524
|
),
|
|
32209
|
-
"aria-label":
|
|
32525
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
32210
32526
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
32211
32527
|
}
|
|
32212
32528
|
),
|
|
@@ -32220,7 +32536,7 @@ var init_QrScanner = __esm({
|
|
|
32220
32536
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32221
32537
|
),
|
|
32222
32538
|
"aria-label": t("aria.mockScanDev"),
|
|
32223
|
-
children: "
|
|
32539
|
+
children: t("qrScanner.mockScan")
|
|
32224
32540
|
}
|
|
32225
32541
|
)
|
|
32226
32542
|
]
|
|
@@ -32238,6 +32554,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32238
32554
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32239
32555
|
init_cn();
|
|
32240
32556
|
init_useEventBus();
|
|
32557
|
+
init_useTranslate();
|
|
32241
32558
|
init_Typography();
|
|
32242
32559
|
init_Box();
|
|
32243
32560
|
init_Label();
|
|
@@ -32247,36 +32564,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32247
32564
|
const sign = delta >= 0 ? "+" : "-";
|
|
32248
32565
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
32249
32566
|
};
|
|
32250
|
-
constraintHint = (constraint) => {
|
|
32567
|
+
constraintHint = (constraint, t) => {
|
|
32251
32568
|
if (constraint.type === "single") {
|
|
32252
|
-
return constraint.required ? "
|
|
32569
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
32253
32570
|
}
|
|
32254
32571
|
const { min, max } = constraint;
|
|
32255
32572
|
if (min && max) {
|
|
32256
|
-
return min === max ?
|
|
32573
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
32257
32574
|
}
|
|
32258
|
-
if (min) return
|
|
32259
|
-
if (max) return
|
|
32260
|
-
return "
|
|
32575
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32576
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32577
|
+
return t("optionConstraint.optional");
|
|
32261
32578
|
};
|
|
32262
|
-
validateSelection = (selected, constraint) => {
|
|
32579
|
+
validateSelection = (selected, constraint, t) => {
|
|
32263
32580
|
if (constraint.type === "single") {
|
|
32264
32581
|
if (constraint.required && selected.length === 0) {
|
|
32265
|
-
return "
|
|
32582
|
+
return t("optionConstraint.error.pickOne");
|
|
32266
32583
|
}
|
|
32267
32584
|
if (selected.length > 1) {
|
|
32268
|
-
return "
|
|
32585
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32269
32586
|
}
|
|
32270
32587
|
return void 0;
|
|
32271
32588
|
}
|
|
32272
32589
|
const { min, max } = constraint;
|
|
32273
32590
|
if (min !== void 0 && selected.length < min) {
|
|
32274
32591
|
const remaining = min - selected.length;
|
|
32275
|
-
return
|
|
32592
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32276
32593
|
}
|
|
32277
32594
|
if (max !== void 0 && selected.length > max) {
|
|
32278
32595
|
const excess = selected.length - max;
|
|
32279
|
-
return
|
|
32596
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32280
32597
|
}
|
|
32281
32598
|
return void 0;
|
|
32282
32599
|
};
|
|
@@ -32293,8 +32610,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32293
32610
|
className
|
|
32294
32611
|
}) => {
|
|
32295
32612
|
const eventBus = useEventBus();
|
|
32296
|
-
const
|
|
32297
|
-
const
|
|
32613
|
+
const { t } = useTranslate();
|
|
32614
|
+
const hint = constraintHint(constraint, t);
|
|
32615
|
+
const error = validateSelection(selected, constraint, t);
|
|
32298
32616
|
const inputName = `option-${groupId}`;
|
|
32299
32617
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32300
32618
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32394,7 +32712,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32394
32712
|
variant: "caption",
|
|
32395
32713
|
color: "warning",
|
|
32396
32714
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32397
|
-
children: "
|
|
32715
|
+
children: t("optionConstraint.outOfStock")
|
|
32398
32716
|
}
|
|
32399
32717
|
)
|
|
32400
32718
|
]
|
|
@@ -32716,6 +33034,7 @@ function changeBlockType(block, type) {
|
|
|
32716
33034
|
return { id: block.id, type, content: seed };
|
|
32717
33035
|
}
|
|
32718
33036
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33037
|
+
const { t } = useTranslate();
|
|
32719
33038
|
const [open, setOpen] = React84.useState(false);
|
|
32720
33039
|
const ref = React84.useRef(null);
|
|
32721
33040
|
React84.useEffect(() => {
|
|
@@ -32735,7 +33054,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32735
33054
|
{
|
|
32736
33055
|
type: "button",
|
|
32737
33056
|
variant: "ghost",
|
|
32738
|
-
"aria-label": "
|
|
33057
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32739
33058
|
className: cn(
|
|
32740
33059
|
"inline-flex items-center justify-center",
|
|
32741
33060
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32757,7 +33076,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32757
33076
|
"py-1 text-sm"
|
|
32758
33077
|
),
|
|
32759
33078
|
children: [
|
|
32760
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
33079
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32761
33080
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32762
33081
|
Button,
|
|
32763
33082
|
{
|
|
@@ -32771,7 +33090,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32771
33090
|
},
|
|
32772
33091
|
children: [
|
|
32773
33092
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32774
|
-
"
|
|
33093
|
+
" ",
|
|
33094
|
+
t("richBlockEditor.duplicate")
|
|
32775
33095
|
]
|
|
32776
33096
|
}
|
|
32777
33097
|
),
|
|
@@ -32788,14 +33108,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32788
33108
|
},
|
|
32789
33109
|
children: [
|
|
32790
33110
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32791
|
-
"
|
|
33111
|
+
" ",
|
|
33112
|
+
t("common.delete")
|
|
32792
33113
|
]
|
|
32793
33114
|
}
|
|
32794
33115
|
),
|
|
32795
33116
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32796
33117
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "my-1 border-t border-border" }),
|
|
32797
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32798
|
-
CHANGEABLE_TYPES.filter((
|
|
33118
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
33119
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32799
33120
|
Button,
|
|
32800
33121
|
{
|
|
32801
33122
|
type: "button",
|
|
@@ -32803,12 +33124,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32803
33124
|
role: "menuitem",
|
|
32804
33125
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32805
33126
|
onClick: () => {
|
|
32806
|
-
onChangeType(
|
|
33127
|
+
onChangeType(bt);
|
|
32807
33128
|
setOpen(false);
|
|
32808
33129
|
},
|
|
32809
|
-
children:
|
|
33130
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32810
33131
|
},
|
|
32811
|
-
|
|
33132
|
+
bt
|
|
32812
33133
|
))
|
|
32813
33134
|
] })
|
|
32814
33135
|
]
|
|
@@ -32870,6 +33191,7 @@ function BlockRow({
|
|
|
32870
33191
|
onInsertAfter,
|
|
32871
33192
|
onChangeType
|
|
32872
33193
|
}) {
|
|
33194
|
+
const { t } = useTranslate();
|
|
32873
33195
|
const setContent = React84.useCallback(
|
|
32874
33196
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32875
33197
|
[onUpdate]
|
|
@@ -32919,8 +33241,8 @@ function BlockRow({
|
|
|
32919
33241
|
tag: "h1",
|
|
32920
33242
|
value: block.content ?? "",
|
|
32921
33243
|
readOnly,
|
|
32922
|
-
placeholder: placeholder ?? "
|
|
32923
|
-
ariaLabel: "
|
|
33244
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
33245
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32924
33246
|
className: "text-3xl font-bold leading-tight",
|
|
32925
33247
|
onValueChange: setContent
|
|
32926
33248
|
}
|
|
@@ -32932,8 +33254,8 @@ function BlockRow({
|
|
|
32932
33254
|
tag: "h2",
|
|
32933
33255
|
value: block.content ?? "",
|
|
32934
33256
|
readOnly,
|
|
32935
|
-
placeholder: placeholder ?? "
|
|
32936
|
-
ariaLabel: "
|
|
33257
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
33258
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32937
33259
|
className: "text-2xl font-semibold leading-tight",
|
|
32938
33260
|
onValueChange: setContent
|
|
32939
33261
|
}
|
|
@@ -32945,8 +33267,8 @@ function BlockRow({
|
|
|
32945
33267
|
tag: "h3",
|
|
32946
33268
|
value: block.content ?? "",
|
|
32947
33269
|
readOnly,
|
|
32948
|
-
placeholder: placeholder ?? "
|
|
32949
|
-
ariaLabel: "
|
|
33270
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33271
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32950
33272
|
className: "text-xl font-semibold leading-tight",
|
|
32951
33273
|
onValueChange: setContent
|
|
32952
33274
|
}
|
|
@@ -32958,8 +33280,8 @@ function BlockRow({
|
|
|
32958
33280
|
tag: "blockquote",
|
|
32959
33281
|
value: block.content ?? "",
|
|
32960
33282
|
readOnly,
|
|
32961
|
-
placeholder: placeholder ?? "
|
|
32962
|
-
ariaLabel: "
|
|
33283
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33284
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32963
33285
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32964
33286
|
onValueChange: setContent
|
|
32965
33287
|
}
|
|
@@ -32967,13 +33289,13 @@ function BlockRow({
|
|
|
32967
33289
|
case "code":
|
|
32968
33290
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32969
33291
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32970
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
33292
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32971
33293
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32972
33294
|
Input,
|
|
32973
33295
|
{
|
|
32974
33296
|
inputType: "text",
|
|
32975
33297
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32976
|
-
"aria-label": "
|
|
33298
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32977
33299
|
className: cn(
|
|
32978
33300
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32979
33301
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32989,8 +33311,8 @@ function BlockRow({
|
|
|
32989
33311
|
tag: "pre",
|
|
32990
33312
|
value: block.content ?? "",
|
|
32991
33313
|
readOnly,
|
|
32992
|
-
placeholder: placeholder ?? "
|
|
32993
|
-
ariaLabel: "
|
|
33314
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33315
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32994
33316
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32995
33317
|
onValueChange: setContent
|
|
32996
33318
|
}
|
|
@@ -33003,7 +33325,7 @@ function BlockRow({
|
|
|
33003
33325
|
const caption = String(block.metadata?.caption ?? "");
|
|
33004
33326
|
const imgProps = {
|
|
33005
33327
|
src: url,
|
|
33006
|
-
alt: caption || "
|
|
33328
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
33007
33329
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
33008
33330
|
};
|
|
33009
33331
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -33017,7 +33339,8 @@ function BlockRow({
|
|
|
33017
33339
|
),
|
|
33018
33340
|
children: [
|
|
33019
33341
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
33020
|
-
"
|
|
33342
|
+
" ",
|
|
33343
|
+
t("richBlockEditor.noImageUrl")
|
|
33021
33344
|
]
|
|
33022
33345
|
}
|
|
33023
33346
|
),
|
|
@@ -33028,7 +33351,7 @@ function BlockRow({
|
|
|
33028
33351
|
inputType: "url",
|
|
33029
33352
|
value: url,
|
|
33030
33353
|
placeholder: "https://example.com/image.png",
|
|
33031
|
-
"aria-label": "
|
|
33354
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
33032
33355
|
className: cn(
|
|
33033
33356
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33034
33357
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33041,8 +33364,8 @@ function BlockRow({
|
|
|
33041
33364
|
{
|
|
33042
33365
|
inputType: "text",
|
|
33043
33366
|
value: caption,
|
|
33044
|
-
placeholder: "
|
|
33045
|
-
"aria-label": "
|
|
33367
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33368
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
33046
33369
|
className: cn(
|
|
33047
33370
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33048
33371
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33073,8 +33396,8 @@ function BlockRow({
|
|
|
33073
33396
|
tag: "span",
|
|
33074
33397
|
value: child.content ?? "",
|
|
33075
33398
|
readOnly,
|
|
33076
|
-
placeholder: "
|
|
33077
|
-
ariaLabel: "
|
|
33399
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33400
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
33078
33401
|
className: "inline-block min-w-[1ch] flex-1",
|
|
33079
33402
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
33080
33403
|
}
|
|
@@ -33084,7 +33407,7 @@ function BlockRow({
|
|
|
33084
33407
|
{
|
|
33085
33408
|
type: "button",
|
|
33086
33409
|
variant: "ghost",
|
|
33087
|
-
"aria-label": "
|
|
33410
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
33088
33411
|
className: cn(
|
|
33089
33412
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
33090
33413
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -33106,7 +33429,8 @@ function BlockRow({
|
|
|
33106
33429
|
onClick: addListItem,
|
|
33107
33430
|
children: [
|
|
33108
33431
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
33109
|
-
"
|
|
33432
|
+
" ",
|
|
33433
|
+
t("richBlockEditor.addItem")
|
|
33110
33434
|
]
|
|
33111
33435
|
}
|
|
33112
33436
|
) })
|
|
@@ -33122,8 +33446,8 @@ function BlockRow({
|
|
|
33122
33446
|
tag: "p",
|
|
33123
33447
|
value: block.content ?? "",
|
|
33124
33448
|
readOnly,
|
|
33125
|
-
placeholder: placeholder ?? "
|
|
33126
|
-
ariaLabel: "
|
|
33449
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33450
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
33127
33451
|
className: "leading-7",
|
|
33128
33452
|
onValueChange: setContent
|
|
33129
33453
|
}
|
|
@@ -33146,7 +33470,7 @@ function BlockRow({
|
|
|
33146
33470
|
{
|
|
33147
33471
|
type: "button",
|
|
33148
33472
|
variant: "ghost",
|
|
33149
|
-
"aria-label": "
|
|
33473
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
33150
33474
|
className: cn(
|
|
33151
33475
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
33152
33476
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -33173,7 +33497,7 @@ function BlockRow({
|
|
|
33173
33497
|
}
|
|
33174
33498
|
);
|
|
33175
33499
|
}
|
|
33176
|
-
var TOOLBAR_ENTRIES,
|
|
33500
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
33177
33501
|
var init_RichBlockEditor = __esm({
|
|
33178
33502
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
33179
33503
|
"use client";
|
|
@@ -33186,29 +33510,30 @@ var init_RichBlockEditor = __esm({
|
|
|
33186
33510
|
init_Input();
|
|
33187
33511
|
init_Icon();
|
|
33188
33512
|
init_useEventBus();
|
|
33513
|
+
init_useTranslate();
|
|
33189
33514
|
TOOLBAR_ENTRIES = [
|
|
33190
|
-
{ type: "paragraph",
|
|
33191
|
-
{ type: "heading-1",
|
|
33192
|
-
{ type: "heading-2",
|
|
33193
|
-
{ type: "heading-3",
|
|
33194
|
-
{ type: "bullet-list",
|
|
33195
|
-
{ type: "numbered-list",
|
|
33196
|
-
{ type: "quote",
|
|
33197
|
-
{ type: "code",
|
|
33198
|
-
{ type: "divider",
|
|
33199
|
-
{ type: "image",
|
|
33515
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33516
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
33517
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: LucideIcons2.Heading2 },
|
|
33518
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: LucideIcons2.Heading3 },
|
|
33519
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: LucideIcons2.List },
|
|
33520
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: LucideIcons2.ListOrdered },
|
|
33521
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: LucideIcons2.Quote },
|
|
33522
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: LucideIcons2.Code },
|
|
33523
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: LucideIcons2.Minus },
|
|
33524
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: LucideIcons2.Image }
|
|
33200
33525
|
];
|
|
33201
|
-
|
|
33202
|
-
paragraph: "
|
|
33203
|
-
"heading-1": "
|
|
33204
|
-
"heading-2": "
|
|
33205
|
-
"heading-3": "
|
|
33206
|
-
"bullet-list": "
|
|
33207
|
-
"numbered-list": "
|
|
33208
|
-
quote: "
|
|
33209
|
-
code: "
|
|
33210
|
-
divider: "
|
|
33211
|
-
image: "
|
|
33526
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33527
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33528
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33529
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33530
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33531
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33532
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33533
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33534
|
+
code: "richBlockEditor.blockType.code",
|
|
33535
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33536
|
+
image: "richBlockEditor.blockType.image"
|
|
33212
33537
|
};
|
|
33213
33538
|
CHANGEABLE_TYPES = [
|
|
33214
33539
|
"paragraph",
|
|
@@ -33242,6 +33567,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33242
33567
|
showToolbar = true,
|
|
33243
33568
|
className
|
|
33244
33569
|
}) => {
|
|
33570
|
+
const { t } = useTranslate();
|
|
33245
33571
|
const [blocks, setBlocks] = React84.useState(
|
|
33246
33572
|
() => normalizeBlocks(initialBlocks)
|
|
33247
33573
|
);
|
|
@@ -33313,25 +33639,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33313
33639
|
Box,
|
|
33314
33640
|
{
|
|
33315
33641
|
role: "toolbar",
|
|
33316
|
-
"aria-label": "
|
|
33642
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33317
33643
|
className: cn(
|
|
33318
33644
|
"flex flex-wrap items-center gap-1",
|
|
33319
33645
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33320
33646
|
),
|
|
33321
33647
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33322
33648
|
const Icon3 = entry.icon;
|
|
33649
|
+
const entryLabel = t(entry.labelKey);
|
|
33323
33650
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33324
33651
|
Button,
|
|
33325
33652
|
{
|
|
33326
33653
|
type: "button",
|
|
33327
33654
|
variant: "ghost",
|
|
33328
33655
|
size: "sm",
|
|
33329
|
-
"aria-label":
|
|
33330
|
-
title:
|
|
33656
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33657
|
+
title: entryLabel,
|
|
33331
33658
|
onClick: () => handleAppend(entry.type),
|
|
33332
33659
|
children: [
|
|
33333
33660
|
/* @__PURE__ */ jsxRuntime.jsx(Icon3, { size: 14 }),
|
|
33334
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33661
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33335
33662
|
]
|
|
33336
33663
|
},
|
|
33337
33664
|
entry.type
|
|
@@ -33374,6 +33701,7 @@ var init_ReplyTree = __esm({
|
|
|
33374
33701
|
"use client";
|
|
33375
33702
|
init_cn();
|
|
33376
33703
|
init_useEventBus();
|
|
33704
|
+
init_useTranslate();
|
|
33377
33705
|
init_atoms2();
|
|
33378
33706
|
init_VoteStack();
|
|
33379
33707
|
ReplyTreeNode = ({
|
|
@@ -33393,6 +33721,7 @@ var init_ReplyTree = __esm({
|
|
|
33393
33721
|
showActions
|
|
33394
33722
|
}) => {
|
|
33395
33723
|
const eventBus = useEventBus();
|
|
33724
|
+
const { t } = useTranslate();
|
|
33396
33725
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33397
33726
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33398
33727
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33439,7 +33768,7 @@ var init_ReplyTree = __esm({
|
|
|
33439
33768
|
variant: "ghost",
|
|
33440
33769
|
size: "sm",
|
|
33441
33770
|
onClick: handleToggle,
|
|
33442
|
-
"aria-label": isCollapsed ? "
|
|
33771
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33443
33772
|
"aria-expanded": !isCollapsed,
|
|
33444
33773
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33445
33774
|
className: cn(
|
|
@@ -33480,7 +33809,7 @@ var init_ReplyTree = __esm({
|
|
|
33480
33809
|
onVote: handleVote,
|
|
33481
33810
|
size: "sm",
|
|
33482
33811
|
variant: "horizontal",
|
|
33483
|
-
label:
|
|
33812
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33484
33813
|
}
|
|
33485
33814
|
),
|
|
33486
33815
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33490,8 +33819,8 @@ var init_ReplyTree = __esm({
|
|
|
33490
33819
|
size: "sm",
|
|
33491
33820
|
leftIcon: "message-square",
|
|
33492
33821
|
onClick: handleReply,
|
|
33493
|
-
"aria-label":
|
|
33494
|
-
children: "
|
|
33822
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33823
|
+
children: t("replyTree.reply")
|
|
33495
33824
|
}
|
|
33496
33825
|
),
|
|
33497
33826
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33501,8 +33830,8 @@ var init_ReplyTree = __esm({
|
|
|
33501
33830
|
size: "sm",
|
|
33502
33831
|
leftIcon: "flag",
|
|
33503
33832
|
onClick: handleFlag,
|
|
33504
|
-
"aria-label":
|
|
33505
|
-
children: "
|
|
33833
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33834
|
+
children: t("replyTree.flag")
|
|
33506
33835
|
}
|
|
33507
33836
|
)
|
|
33508
33837
|
] }),
|
|
@@ -33513,9 +33842,9 @@ var init_ReplyTree = __esm({
|
|
|
33513
33842
|
inputType: "textarea",
|
|
33514
33843
|
rows: 2,
|
|
33515
33844
|
value: draft,
|
|
33516
|
-
placeholder:
|
|
33845
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33517
33846
|
onChange: (e) => setDraft(e.target.value),
|
|
33518
|
-
"aria-label":
|
|
33847
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33519
33848
|
}
|
|
33520
33849
|
),
|
|
33521
33850
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33527,10 +33856,10 @@ var init_ReplyTree = __esm({
|
|
|
33527
33856
|
leftIcon: "send",
|
|
33528
33857
|
onClick: handleSubmitReply,
|
|
33529
33858
|
disabled: !draft.trim(),
|
|
33530
|
-
children: "
|
|
33859
|
+
children: t("replyTree.send")
|
|
33531
33860
|
}
|
|
33532
33861
|
),
|
|
33533
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33862
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33534
33863
|
] })
|
|
33535
33864
|
] }),
|
|
33536
33865
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33544,7 +33873,7 @@ var init_ReplyTree = __esm({
|
|
|
33544
33873
|
"self-start gap-1 px-0 h-auto",
|
|
33545
33874
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33546
33875
|
),
|
|
33547
|
-
children: "
|
|
33876
|
+
children: t("replyTree.continueThread")
|
|
33548
33877
|
}
|
|
33549
33878
|
) : /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33550
33879
|
ReplyTreeNode,
|
|
@@ -33583,6 +33912,7 @@ var init_ReplyTree = __esm({
|
|
|
33583
33912
|
showActions = true,
|
|
33584
33913
|
className
|
|
33585
33914
|
}) => {
|
|
33915
|
+
const { t } = useTranslate();
|
|
33586
33916
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33587
33917
|
const [collapsedSet, setCollapsedSet] = React84.useState(() => {
|
|
33588
33918
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33601,7 +33931,7 @@ var init_ReplyTree = __esm({
|
|
|
33601
33931
|
});
|
|
33602
33932
|
}, []);
|
|
33603
33933
|
if (nodeList.length === 0) {
|
|
33604
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33605
33935
|
}
|
|
33606
33936
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33607
33937
|
ReplyTreeNode,
|
|
@@ -33679,6 +34009,7 @@ var init_VersionDiff = __esm({
|
|
|
33679
34009
|
"use client";
|
|
33680
34010
|
init_cn();
|
|
33681
34011
|
init_useEventBus();
|
|
34012
|
+
init_useTranslate();
|
|
33682
34013
|
init_atoms2();
|
|
33683
34014
|
init_Stack();
|
|
33684
34015
|
INLINE_STYLES = {
|
|
@@ -33701,6 +34032,7 @@ var init_VersionDiff = __esm({
|
|
|
33701
34032
|
language,
|
|
33702
34033
|
className
|
|
33703
34034
|
}) => {
|
|
34035
|
+
const { t } = useTranslate();
|
|
33704
34036
|
const eventBus = useEventBus();
|
|
33705
34037
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33706
34038
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33782,24 +34114,24 @@ var init_VersionDiff = __esm({
|
|
|
33782
34114
|
children: [
|
|
33783
34115
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33784
34116
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33785
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
34117
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33786
34118
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33787
34119
|
Select,
|
|
33788
34120
|
{
|
|
33789
34121
|
options,
|
|
33790
34122
|
value: activeBeforeId,
|
|
33791
34123
|
onChange: handleBeforeChange,
|
|
33792
|
-
"aria-label": "
|
|
34124
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33793
34125
|
}
|
|
33794
34126
|
) }),
|
|
33795
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
34127
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33796
34128
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33797
34129
|
Select,
|
|
33798
34130
|
{
|
|
33799
34131
|
options,
|
|
33800
34132
|
value: activeAfterId,
|
|
33801
34133
|
onChange: handleAfterChange,
|
|
33802
|
-
"aria-label": "
|
|
34134
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33803
34135
|
}
|
|
33804
34136
|
) }),
|
|
33805
34137
|
language && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", children: language }),
|
|
@@ -33820,7 +34152,7 @@ var init_VersionDiff = __esm({
|
|
|
33820
34152
|
size: "sm",
|
|
33821
34153
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33822
34154
|
onClick: handleViewToggle,
|
|
33823
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
34155
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33824
34156
|
}
|
|
33825
34157
|
),
|
|
33826
34158
|
(onRevert || revertEvent) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33830,7 +34162,7 @@ var init_VersionDiff = __esm({
|
|
|
33830
34162
|
size: "sm",
|
|
33831
34163
|
icon: "rotate-ccw",
|
|
33832
34164
|
onClick: handleRevert,
|
|
33833
|
-
children: "
|
|
34165
|
+
children: t("versionDiff.revert")
|
|
33834
34166
|
}
|
|
33835
34167
|
)
|
|
33836
34168
|
] })
|
|
@@ -33847,12 +34179,12 @@ var init_VersionDiff = __esm({
|
|
|
33847
34179
|
children: [
|
|
33848
34180
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33849
34181
|
beforeRev?.label,
|
|
33850
|
-
beforeRev?.author ?
|
|
34182
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33851
34183
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33852
34184
|
] }),
|
|
33853
34185
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33854
34186
|
afterRev?.label,
|
|
33855
|
-
afterRev?.author ?
|
|
34187
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33856
34188
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33857
34189
|
] })
|
|
33858
34190
|
]
|
|
@@ -34245,10 +34577,12 @@ var init_DocPagination = __esm({
|
|
|
34245
34577
|
}
|
|
34246
34578
|
});
|
|
34247
34579
|
function DocSearch({
|
|
34248
|
-
placeholder
|
|
34580
|
+
placeholder,
|
|
34249
34581
|
onSearch,
|
|
34250
34582
|
className
|
|
34251
34583
|
}) {
|
|
34584
|
+
const { t } = useTranslate();
|
|
34585
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34252
34586
|
const [query, setQuery] = React84.useState("");
|
|
34253
34587
|
const [results, setResults] = React84.useState([]);
|
|
34254
34588
|
const [isOpen, setIsOpen] = React84.useState(false);
|
|
@@ -34355,7 +34689,7 @@ function DocSearch({
|
|
|
34355
34689
|
Input,
|
|
34356
34690
|
{
|
|
34357
34691
|
inputType: "search",
|
|
34358
|
-
placeholder,
|
|
34692
|
+
placeholder: resolvedPlaceholder,
|
|
34359
34693
|
value: query,
|
|
34360
34694
|
onChange: handleChange,
|
|
34361
34695
|
onFocus: handleFocus,
|
|
@@ -34420,6 +34754,7 @@ var init_DocSearch = __esm({
|
|
|
34420
34754
|
init_Typography();
|
|
34421
34755
|
init_Icon();
|
|
34422
34756
|
init_Input();
|
|
34757
|
+
init_useTranslate();
|
|
34423
34758
|
}
|
|
34424
34759
|
});
|
|
34425
34760
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36424,8 +36759,8 @@ var init_SignaturePad = __esm({
|
|
|
36424
36759
|
init_useEventBus();
|
|
36425
36760
|
init_useTranslate();
|
|
36426
36761
|
SignaturePad = ({
|
|
36427
|
-
label
|
|
36428
|
-
helperText
|
|
36762
|
+
label,
|
|
36763
|
+
helperText,
|
|
36429
36764
|
strokeColor,
|
|
36430
36765
|
strokeWidth = 2,
|
|
36431
36766
|
height = 200,
|
|
@@ -36441,6 +36776,8 @@ var init_SignaturePad = __esm({
|
|
|
36441
36776
|
}) => {
|
|
36442
36777
|
const eventBus = useEventBus();
|
|
36443
36778
|
const { t } = useTranslate();
|
|
36779
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36780
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36444
36781
|
const canvasRef = React84.useRef(null);
|
|
36445
36782
|
const [isDrawing, setIsDrawing] = React84.useState(false);
|
|
36446
36783
|
const [hasSignature, setHasSignature] = React84.useState(!!value);
|
|
@@ -36543,7 +36880,7 @@ var init_SignaturePad = __esm({
|
|
|
36543
36880
|
);
|
|
36544
36881
|
}
|
|
36545
36882
|
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
|
|
36546
|
-
|
|
36883
|
+
resolvedLabel && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36547
36884
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36548
36885
|
Box,
|
|
36549
36886
|
{
|
|
@@ -36572,7 +36909,7 @@ var init_SignaturePad = __esm({
|
|
|
36572
36909
|
)
|
|
36573
36910
|
}
|
|
36574
36911
|
),
|
|
36575
|
-
|
|
36912
|
+
resolvedHelperText && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36576
36913
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36577
36914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36578
36915
|
Button,
|
|
@@ -36582,7 +36919,7 @@ var init_SignaturePad = __esm({
|
|
|
36582
36919
|
icon: LucideIcons2.Eraser,
|
|
36583
36920
|
onClick: clearSignature,
|
|
36584
36921
|
disabled: !hasSignature,
|
|
36585
|
-
children: "
|
|
36922
|
+
children: t("signaturePad.clear")
|
|
36586
36923
|
}
|
|
36587
36924
|
),
|
|
36588
36925
|
signEvent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -36593,7 +36930,7 @@ var init_SignaturePad = __esm({
|
|
|
36593
36930
|
icon: LucideIcons2.Check,
|
|
36594
36931
|
onClick: confirmSignature,
|
|
36595
36932
|
disabled: !hasSignature,
|
|
36596
|
-
children: "
|
|
36933
|
+
children: t("signaturePad.confirm")
|
|
36597
36934
|
}
|
|
36598
36935
|
)
|
|
36599
36936
|
] })
|
|
@@ -41038,6 +41375,7 @@ function MasterDetail({
|
|
|
41038
41375
|
className,
|
|
41039
41376
|
...rest
|
|
41040
41377
|
}) {
|
|
41378
|
+
const { t } = useTranslate();
|
|
41041
41379
|
const loading = externalLoading ?? false;
|
|
41042
41380
|
const isLoading = externalIsLoading ?? false;
|
|
41043
41381
|
const error = externalError ?? null;
|
|
@@ -41050,8 +41388,8 @@ function MasterDetail({
|
|
|
41050
41388
|
isLoading: loading || isLoading,
|
|
41051
41389
|
error,
|
|
41052
41390
|
className,
|
|
41053
|
-
emptyTitle: "
|
|
41054
|
-
emptyDescription: "
|
|
41391
|
+
emptyTitle: t("table.empty.title"),
|
|
41392
|
+
emptyDescription: t("empty.createFirst"),
|
|
41055
41393
|
...rest
|
|
41056
41394
|
}
|
|
41057
41395
|
);
|
|
@@ -41060,6 +41398,7 @@ var init_MasterDetail = __esm({
|
|
|
41060
41398
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41061
41399
|
"use client";
|
|
41062
41400
|
init_DataTable();
|
|
41401
|
+
init_useTranslate();
|
|
41063
41402
|
MasterDetail.displayName = "MasterDetail";
|
|
41064
41403
|
}
|
|
41065
41404
|
});
|
|
@@ -41068,14 +41407,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41068
41407
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41069
41408
|
init_cn();
|
|
41070
41409
|
init_Typography();
|
|
41071
|
-
|
|
41072
|
-
|
|
41073
|
-
{
|
|
41074
|
-
|
|
41075
|
-
|
|
41076
|
-
|
|
41077
|
-
|
|
41078
|
-
|
|
41410
|
+
init_useTranslate();
|
|
41411
|
+
DefaultEmptyDetail = () => {
|
|
41412
|
+
const { t } = useTranslate();
|
|
41413
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41414
|
+
Typography,
|
|
41415
|
+
{
|
|
41416
|
+
variant: "body2",
|
|
41417
|
+
className: "text-muted-foreground",
|
|
41418
|
+
children: t("masterDetail.selectItem")
|
|
41419
|
+
}
|
|
41420
|
+
) });
|
|
41421
|
+
};
|
|
41079
41422
|
MasterDetailLayout = ({
|
|
41080
41423
|
master,
|
|
41081
41424
|
detail,
|
|
@@ -41202,7 +41545,7 @@ var init_MediaGallery = __esm({
|
|
|
41202
41545
|
{
|
|
41203
41546
|
icon: LucideIcons2.Image,
|
|
41204
41547
|
title: t("display.noMedia"),
|
|
41205
|
-
description: "
|
|
41548
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41206
41549
|
className
|
|
41207
41550
|
}
|
|
41208
41551
|
);
|
|
@@ -41219,7 +41562,7 @@ var init_MediaGallery = __esm({
|
|
|
41219
41562
|
size: "sm",
|
|
41220
41563
|
icon: LucideIcons2.Upload,
|
|
41221
41564
|
action: "MEDIA_UPLOAD",
|
|
41222
|
-
children: "
|
|
41565
|
+
children: t("mediaGallery.upload")
|
|
41223
41566
|
}
|
|
41224
41567
|
),
|
|
41225
41568
|
actions?.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -41233,10 +41576,7 @@ var init_MediaGallery = __esm({
|
|
|
41233
41576
|
))
|
|
41234
41577
|
] })
|
|
41235
41578
|
] }),
|
|
41236
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsxRuntime.
|
|
41237
|
-
selectedItems.length,
|
|
41238
|
-
" selected"
|
|
41239
|
-
] }) }),
|
|
41579
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
41240
41580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41241
41581
|
Box,
|
|
41242
41582
|
{
|
|
@@ -42110,7 +42450,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42110
42450
|
EmptyState,
|
|
42111
42451
|
{
|
|
42112
42452
|
title: t("debug.noActiveTraits"),
|
|
42113
|
-
description: "
|
|
42453
|
+
description: t("debug.traitsMountHint"),
|
|
42114
42454
|
className: "py-8"
|
|
42115
42455
|
}
|
|
42116
42456
|
);
|
|
@@ -42120,14 +42460,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42120
42460
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42121
42461
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42122
42462
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42123
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42124
|
-
trait.transitionCount,
|
|
42125
|
-
" transitions"
|
|
42126
|
-
] })
|
|
42463
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42127
42464
|
] }),
|
|
42128
42465
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
42129
42466
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42130
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42467
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42131
42468
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
42132
42469
|
Badge,
|
|
42133
42470
|
{
|
|
@@ -42139,7 +42476,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42139
42476
|
)) })
|
|
42140
42477
|
] }),
|
|
42141
42478
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42142
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42479
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42143
42480
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42144
42481
|
t2.from,
|
|
42145
42482
|
" \u2192 ",
|
|
@@ -42158,7 +42495,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42158
42495
|
] }, i)) })
|
|
42159
42496
|
] }),
|
|
42160
42497
|
trait.guards.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42161
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42498
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42162
42499
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42163
42500
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: g.name }),
|
|
42164
42501
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42264,7 +42601,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42264
42601
|
EmptyState,
|
|
42265
42602
|
{
|
|
42266
42603
|
title: t("debug.noEntityData"),
|
|
42267
|
-
description: "
|
|
42604
|
+
description: t("debug.debugModeHint"),
|
|
42268
42605
|
className: "py-8"
|
|
42269
42606
|
}
|
|
42270
42607
|
);
|
|
@@ -42277,7 +42614,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42277
42614
|
EmptyState,
|
|
42278
42615
|
{
|
|
42279
42616
|
title: t("debug.noEntities"),
|
|
42280
|
-
description: "
|
|
42617
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42281
42618
|
className: "py-8"
|
|
42282
42619
|
}
|
|
42283
42620
|
);
|
|
@@ -42285,7 +42622,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42285
42622
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42286
42623
|
id: `singleton-${name}`,
|
|
42287
42624
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42288
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42625
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42289
42626
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42290
42627
|
] }),
|
|
42291
42628
|
content: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
@@ -42303,31 +42640,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42303
42640
|
}));
|
|
42304
42641
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42305
42642
|
singletonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42306
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42307
|
-
"Singletons (",
|
|
42308
|
-
singletonItems.length,
|
|
42309
|
-
")"
|
|
42310
|
-
] }),
|
|
42643
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42311
42644
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42312
42645
|
] }),
|
|
42313
42646
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
42314
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42315
|
-
"Runtime (",
|
|
42316
|
-
runtimeEntities.length,
|
|
42317
|
-
")"
|
|
42318
|
-
] }),
|
|
42647
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42319
42648
|
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42320
|
-
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.
|
|
42321
|
-
"+",
|
|
42322
|
-
runtimeEntities.length - 20,
|
|
42323
|
-
" more entities"
|
|
42324
|
-
] })
|
|
42649
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42325
42650
|
] }),
|
|
42326
42651
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42327
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42652
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42328
42653
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42329
42654
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: type }),
|
|
42330
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42655
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42331
42656
|
] }, type)) })
|
|
42332
42657
|
] })
|
|
42333
42658
|
] });
|
|
@@ -42371,7 +42696,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42371
42696
|
EmptyState,
|
|
42372
42697
|
{
|
|
42373
42698
|
title: t("debug.noEventsYet"),
|
|
42374
|
-
description: "
|
|
42699
|
+
description: t("debug.eventsExecuteHint"),
|
|
42375
42700
|
className: "py-8"
|
|
42376
42701
|
}
|
|
42377
42702
|
);
|
|
@@ -42382,17 +42707,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42382
42707
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42383
42708
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42384
42709
|
/* @__PURE__ */ jsxRuntime.jsxs(ButtonGroup, { children: [
|
|
42385
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42710
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42386
42711
|
Button,
|
|
42387
42712
|
{
|
|
42388
42713
|
size: "sm",
|
|
42389
42714
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42390
42715
|
onClick: () => setFilter("all"),
|
|
42391
|
-
children:
|
|
42392
|
-
"All (",
|
|
42393
|
-
events2.length,
|
|
42394
|
-
")"
|
|
42395
|
-
]
|
|
42716
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42396
42717
|
}
|
|
42397
42718
|
),
|
|
42398
42719
|
eventTypes.map((type) => {
|
|
@@ -42422,7 +42743,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42422
42743
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42423
42744
|
}
|
|
42424
42745
|
),
|
|
42425
|
-
"
|
|
42746
|
+
t("debug.autoScroll")
|
|
42426
42747
|
] })
|
|
42427
42748
|
] }),
|
|
42428
42749
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42480,7 +42801,7 @@ function GuardsPanel({ guards }) {
|
|
|
42480
42801
|
EmptyState,
|
|
42481
42802
|
{
|
|
42482
42803
|
title: t("debug.noGuardEvaluations"),
|
|
42483
|
-
description: "
|
|
42804
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42484
42805
|
className: "py-8"
|
|
42485
42806
|
}
|
|
42486
42807
|
);
|
|
@@ -42511,15 +42832,15 @@ function GuardsPanel({ guards }) {
|
|
|
42511
42832
|
] }),
|
|
42512
42833
|
content: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "sm", children: [
|
|
42513
42834
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42514
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42835
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42515
42836
|
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
|
|
42516
42837
|
] }),
|
|
42517
42838
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42518
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42839
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42519
42840
|
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
42520
42841
|
] }),
|
|
42521
42842
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
42522
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42843
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42523
42844
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42524
42845
|
] })
|
|
42525
42846
|
] })
|
|
@@ -42537,9 +42858,9 @@ function GuardsPanel({ guards }) {
|
|
|
42537
42858
|
] })
|
|
42538
42859
|
] }),
|
|
42539
42860
|
/* @__PURE__ */ jsxRuntime.jsxs(ButtonGroup, { children: [
|
|
42540
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42541
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42542
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
42861
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
42862
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
42863
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42543
42864
|
] })
|
|
42544
42865
|
] }),
|
|
42545
42866
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Accordion, { items: accordionItems }) })
|
|
@@ -42665,7 +42986,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42665
42986
|
EmptyState,
|
|
42666
42987
|
{
|
|
42667
42988
|
title: t("debug.noTransitionsRecorded"),
|
|
42668
|
-
description: "
|
|
42989
|
+
description: t("debug.transitionsProcessHint"),
|
|
42669
42990
|
className: "py-8"
|
|
42670
42991
|
}
|
|
42671
42992
|
);
|
|
@@ -42682,10 +43003,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42682
43003
|
const sorted = [...transitions].reverse();
|
|
42683
43004
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42684
43005
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42685
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42686
|
-
transitions.length,
|
|
42687
|
-
" transitions recorded"
|
|
42688
|
-
] }),
|
|
43006
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42689
43007
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42690
43008
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42691
43009
|
Checkbox,
|
|
@@ -42694,7 +43012,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42694
43012
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42695
43013
|
}
|
|
42696
43014
|
),
|
|
42697
|
-
"
|
|
43015
|
+
t("debug.autoScroll")
|
|
42698
43016
|
] })
|
|
42699
43017
|
] }),
|
|
42700
43018
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42737,15 +43055,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42737
43055
|
variant: trace.guardResult ? "success" : "danger",
|
|
42738
43056
|
size: "sm",
|
|
42739
43057
|
children: [
|
|
42740
|
-
"
|
|
43058
|
+
t("debug.guardLabel"),
|
|
43059
|
+
" ",
|
|
42741
43060
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42742
43061
|
]
|
|
42743
43062
|
}
|
|
42744
43063
|
),
|
|
42745
|
-
/* @__PURE__ */ jsxRuntime.
|
|
42746
|
-
trace.effects.length,
|
|
42747
|
-
" effects"
|
|
42748
|
-
] })
|
|
43064
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42749
43065
|
] }),
|
|
42750
43066
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42751
43067
|
/* @__PURE__ */ jsxRuntime.jsx(EffectBadge, { effect }),
|
|
@@ -42794,13 +43110,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42794
43110
|
EmptyState,
|
|
42795
43111
|
{
|
|
42796
43112
|
title: t("debug.noBridgeData"),
|
|
42797
|
-
description: "
|
|
43113
|
+
description: t("debug.bridgeInitHint"),
|
|
42798
43114
|
className: "py-8"
|
|
42799
43115
|
}
|
|
42800
43116
|
);
|
|
42801
43117
|
}
|
|
42802
43118
|
const formatTime4 = (ts) => {
|
|
42803
|
-
if (ts === 0) return "
|
|
43119
|
+
if (ts === 0) return t("debug.never");
|
|
42804
43120
|
const d = new Date(ts);
|
|
42805
43121
|
return d.toLocaleTimeString("en-US", {
|
|
42806
43122
|
hour12: false,
|
|
@@ -42813,14 +43129,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42813
43129
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3", children: [
|
|
42814
43130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42815
43131
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
42816
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43132
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42817
43133
|
] }),
|
|
42818
43134
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "xs", children: [
|
|
42819
43135
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42820
43136
|
StatRow,
|
|
42821
43137
|
{
|
|
42822
43138
|
label: t("debug.status"),
|
|
42823
|
-
value: bridge.connected ? "
|
|
43139
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
42824
43140
|
variant: bridge.connected ? "success" : "danger"
|
|
42825
43141
|
}
|
|
42826
43142
|
),
|
|
@@ -42848,13 +43164,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42848
43164
|
] })
|
|
42849
43165
|
] }),
|
|
42850
43166
|
bridge.lastError && /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
42851
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43167
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
42852
43168
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
42853
43169
|
] }),
|
|
42854
|
-
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.
|
|
42855
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
42856
|
-
" total events processed"
|
|
42857
|
-
] }) })
|
|
43170
|
+
bridge.connected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
42858
43171
|
] }) });
|
|
42859
43172
|
}
|
|
42860
43173
|
var init_ServerBridgeTab = __esm({
|
|
@@ -42964,7 +43277,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42964
43277
|
EmptyState,
|
|
42965
43278
|
{
|
|
42966
43279
|
title: t("debug.noActiveTraits"),
|
|
42967
|
-
description: "
|
|
43280
|
+
description: t("debug.traitsInitHint"),
|
|
42968
43281
|
className: "py-8"
|
|
42969
43282
|
}
|
|
42970
43283
|
);
|
|
@@ -42981,7 +43294,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42981
43294
|
};
|
|
42982
43295
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
42983
43296
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
42984
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43297
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
42985
43298
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42986
43299
|
trait.name,
|
|
42987
43300
|
": ",
|
|
@@ -42989,8 +43302,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42989
43302
|
] }, trait.id)) })
|
|
42990
43303
|
] }),
|
|
42991
43304
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
42992
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
42993
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43305
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43306
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42994
43307
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42995
43308
|
Button,
|
|
42996
43309
|
{
|
|
@@ -43002,15 +43315,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43002
43315
|
}
|
|
43003
43316
|
),
|
|
43004
43317
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43005
|
-
transitions.some((
|
|
43318
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43006
43319
|
] }, event)) })
|
|
43007
43320
|
] }),
|
|
43008
43321
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
|
|
43009
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43322
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43010
43323
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
43011
43324
|
] }),
|
|
43012
43325
|
log12.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
43013
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43326
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43014
43327
|
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43015
43328
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43016
43329
|
" ",
|
|
@@ -43041,21 +43354,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43041
43354
|
}
|
|
43042
43355
|
});
|
|
43043
43356
|
function ServerResponseRow({ sr }) {
|
|
43357
|
+
const { t } = useTranslate();
|
|
43044
43358
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43045
43359
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43046
43360
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43047
43361
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43048
43362
|
sr.success ? "\u2713" : "\u2717",
|
|
43049
|
-
"
|
|
43363
|
+
" ",
|
|
43364
|
+
t("debug.server")
|
|
43050
43365
|
] }),
|
|
43051
43366
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43052
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43053
|
-
sr.clientEffects,
|
|
43054
|
-
" clientEffect",
|
|
43055
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43056
|
-
] }),
|
|
43367
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
43057
43368
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43058
|
-
"
|
|
43369
|
+
t("debug.emitLabel"),
|
|
43370
|
+
" ",
|
|
43059
43371
|
sr.emittedEvents.join(", ")
|
|
43060
43372
|
] }),
|
|
43061
43373
|
sr.error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -43063,13 +43375,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43063
43375
|
entityEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
43064
43376
|
name,
|
|
43065
43377
|
": ",
|
|
43066
|
-
count
|
|
43067
|
-
" row",
|
|
43068
|
-
count !== 1 ? "s" : ""
|
|
43378
|
+
t("debug.rowsCount", { count })
|
|
43069
43379
|
] }, name)) })
|
|
43070
43380
|
] });
|
|
43071
43381
|
}
|
|
43072
43382
|
function TransitionRow({ trace }) {
|
|
43383
|
+
const { t } = useTranslate();
|
|
43073
43384
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43074
43385
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43075
43386
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43077,7 +43388,7 @@ function TransitionRow({ trace }) {
|
|
|
43077
43388
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43078
43389
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43079
43390
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43080
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43391
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43081
43392
|
] }),
|
|
43082
43393
|
/* @__PURE__ */ jsxRuntime.jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43083
43394
|
] });
|
|
@@ -43118,6 +43429,7 @@ function VerifyModePanel({
|
|
|
43118
43429
|
serverCount,
|
|
43119
43430
|
localCount
|
|
43120
43431
|
}) {
|
|
43432
|
+
const { t } = useTranslate();
|
|
43121
43433
|
const [expanded, setExpanded] = React84__namespace.useState(true);
|
|
43122
43434
|
const scrollRef = React84__namespace.useRef(null);
|
|
43123
43435
|
const prevCountRef = React84__namespace.useRef(0);
|
|
@@ -43148,30 +43460,20 @@ function VerifyModePanel({
|
|
|
43148
43460
|
onClick: () => setExpanded((v) => !v),
|
|
43149
43461
|
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",
|
|
43150
43462
|
"aria-expanded": expanded,
|
|
43151
|
-
"aria-label": expanded ? "
|
|
43463
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43152
43464
|
"data-testid": "debugger-verify-toggle",
|
|
43153
43465
|
children: [
|
|
43154
43466
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43155
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43156
|
-
/* @__PURE__ */ jsxRuntime.
|
|
43157
|
-
|
|
43158
|
-
" local"
|
|
43159
|
-
] }),
|
|
43160
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43161
|
-
serverCount,
|
|
43162
|
-
" server"
|
|
43163
|
-
] }),
|
|
43467
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43468
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43469
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43164
43470
|
traitStates && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43165
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.
|
|
43166
|
-
transitions.length,
|
|
43167
|
-
" transition",
|
|
43168
|
-
transitions.length !== 1 ? "s" : ""
|
|
43169
|
-
] })
|
|
43471
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43170
43472
|
]
|
|
43171
43473
|
}
|
|
43172
43474
|
),
|
|
43173
43475
|
expanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43174
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
43476
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsxRuntime.jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
43175
43477
|
/* @__PURE__ */ jsxRuntime.jsx(WalkMinimap, {})
|
|
43176
43478
|
] })
|
|
43177
43479
|
]
|
|
@@ -43187,6 +43489,7 @@ function RuntimeDebugger({
|
|
|
43187
43489
|
defaultTab,
|
|
43188
43490
|
schema
|
|
43189
43491
|
}) {
|
|
43492
|
+
const { t } = useTranslate();
|
|
43190
43493
|
const [isCollapsed, setIsCollapsed] = React84__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43191
43494
|
const [isVisible, setIsVisible] = React84__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43192
43495
|
const debugData = useDebugData();
|
|
@@ -43225,55 +43528,55 @@ function RuntimeDebugger({
|
|
|
43225
43528
|
const tabItems = [
|
|
43226
43529
|
{
|
|
43227
43530
|
id: "dispatch",
|
|
43228
|
-
label: "
|
|
43531
|
+
label: t("debug.tabDispatch"),
|
|
43229
43532
|
badge: debugData.traits.length || void 0,
|
|
43230
43533
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43231
43534
|
},
|
|
43232
43535
|
{
|
|
43233
43536
|
id: "verify",
|
|
43234
|
-
label: failedChecks > 0 ? "
|
|
43537
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43235
43538
|
badge: verification.summary.totalChecks || void 0,
|
|
43236
43539
|
content: /* @__PURE__ */ jsxRuntime.jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43237
43540
|
},
|
|
43238
43541
|
{
|
|
43239
43542
|
id: "timeline",
|
|
43240
|
-
label: "
|
|
43543
|
+
label: t("debug.tabTimeline"),
|
|
43241
43544
|
badge: verification.transitions.length || void 0,
|
|
43242
43545
|
content: /* @__PURE__ */ jsxRuntime.jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43243
43546
|
},
|
|
43244
43547
|
{
|
|
43245
43548
|
id: "bridge",
|
|
43246
|
-
label: "
|
|
43549
|
+
label: t("debug.tabBridge"),
|
|
43247
43550
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43248
43551
|
content: /* @__PURE__ */ jsxRuntime.jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43249
43552
|
},
|
|
43250
43553
|
{
|
|
43251
43554
|
id: "traits",
|
|
43252
|
-
label: "
|
|
43555
|
+
label: t("debug.tabTraits"),
|
|
43253
43556
|
badge: debugData.traits.length || void 0,
|
|
43254
43557
|
content: /* @__PURE__ */ jsxRuntime.jsx(TraitsTab, { traits: debugData.traits })
|
|
43255
43558
|
},
|
|
43256
43559
|
{
|
|
43257
43560
|
id: "ticks",
|
|
43258
|
-
label: "
|
|
43259
|
-
badge: debugData.ticks.filter((
|
|
43561
|
+
label: t("debug.tabTicks"),
|
|
43562
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43260
43563
|
content: /* @__PURE__ */ jsxRuntime.jsx(TicksTab, { ticks: debugData.ticks })
|
|
43261
43564
|
},
|
|
43262
43565
|
{
|
|
43263
43566
|
id: "entities",
|
|
43264
|
-
label: "
|
|
43567
|
+
label: t("debug.tabEntities"),
|
|
43265
43568
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43266
43569
|
content: /* @__PURE__ */ jsxRuntime.jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43267
43570
|
},
|
|
43268
43571
|
{
|
|
43269
43572
|
id: "events",
|
|
43270
|
-
label: "
|
|
43573
|
+
label: t("debug.tabEvents"),
|
|
43271
43574
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43272
43575
|
content: /* @__PURE__ */ jsxRuntime.jsx(EventFlowTab, { events: debugData.events })
|
|
43273
43576
|
},
|
|
43274
43577
|
{
|
|
43275
43578
|
id: "guards",
|
|
43276
|
-
label: "
|
|
43579
|
+
label: t("debug.tabGuards"),
|
|
43277
43580
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43278
43581
|
content: /* @__PURE__ */ jsxRuntime.jsx(GuardsPanel, { guards: debugData.guards })
|
|
43279
43582
|
}
|
|
@@ -43301,15 +43604,10 @@ function RuntimeDebugger({
|
|
|
43301
43604
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43302
43605
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43303
43606
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43304
|
-
"
|
|
43607
|
+
" ",
|
|
43608
|
+
t("debug.debugger")
|
|
43305
43609
|
] }),
|
|
43306
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43307
|
-
failedChecks,
|
|
43308
|
-
" failed"
|
|
43309
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43310
|
-
debugData.traits.length,
|
|
43311
|
-
" traits"
|
|
43312
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43610
|
+
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
43313
43611
|
] })
|
|
43314
43612
|
}
|
|
43315
43613
|
),
|
|
@@ -43327,9 +43625,9 @@ function RuntimeDebugger({
|
|
|
43327
43625
|
);
|
|
43328
43626
|
}
|
|
43329
43627
|
if (mode === "verify") {
|
|
43330
|
-
const traitStates = debugData.traits.map((
|
|
43331
|
-
const serverEntries = verification.transitions.filter((
|
|
43332
|
-
const localEntries = verification.transitions.filter((
|
|
43628
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43629
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43630
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43333
43631
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43334
43632
|
VerifyModePanel,
|
|
43335
43633
|
{
|
|
@@ -43361,7 +43659,7 @@ function RuntimeDebugger({
|
|
|
43361
43659
|
variant: "secondary",
|
|
43362
43660
|
size: "sm",
|
|
43363
43661
|
className: "runtime-debugger__toggle",
|
|
43364
|
-
title: "
|
|
43662
|
+
title: t("debug.openDebugger"),
|
|
43365
43663
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
43366
43664
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "V" }),
|
|
43367
43665
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43371,11 +43669,8 @@ function RuntimeDebugger({
|
|
|
43371
43669
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43372
43670
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43373
43671
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg", children: "V" }),
|
|
43374
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: "
|
|
43375
|
-
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
43376
|
-
failedChecks,
|
|
43377
|
-
" failed"
|
|
43378
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43672
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43673
|
+
failedChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
43379
43674
|
] }),
|
|
43380
43675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43381
43676
|
Button,
|
|
@@ -43383,7 +43678,7 @@ function RuntimeDebugger({
|
|
|
43383
43678
|
onClick: () => setIsCollapsed(true),
|
|
43384
43679
|
variant: "ghost",
|
|
43385
43680
|
size: "sm",
|
|
43386
|
-
title: "
|
|
43681
|
+
title: t("debug.close"),
|
|
43387
43682
|
children: "x"
|
|
43388
43683
|
}
|
|
43389
43684
|
)
|
|
@@ -43397,7 +43692,7 @@ function RuntimeDebugger({
|
|
|
43397
43692
|
className: "runtime-debugger__tabs"
|
|
43398
43693
|
}
|
|
43399
43694
|
) }),
|
|
43400
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43695
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43401
43696
|
] })
|
|
43402
43697
|
}
|
|
43403
43698
|
);
|
|
@@ -43423,6 +43718,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43423
43718
|
init_TransitionTimeline();
|
|
43424
43719
|
init_ServerBridgeTab();
|
|
43425
43720
|
init_EventDispatcherTab();
|
|
43721
|
+
init_useTranslate();
|
|
43426
43722
|
init_RuntimeDebugger();
|
|
43427
43723
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43428
43724
|
}
|
|
@@ -44711,7 +45007,7 @@ var init_StatCard = __esm({
|
|
|
44711
45007
|
}
|
|
44712
45008
|
);
|
|
44713
45009
|
}
|
|
44714
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45010
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
44715
45011
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
44716
45012
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
44717
45013
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -44754,7 +45050,7 @@ var init_StatCard = __esm({
|
|
|
44754
45050
|
]
|
|
44755
45051
|
}
|
|
44756
45052
|
),
|
|
44757
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45053
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
44758
45054
|
] }),
|
|
44759
45055
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
44760
45056
|
] }),
|