@almadar/ui 5.21.8 → 5.21.10
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 +964 -651
- package/dist/avl/index.js +964 -651
- package/dist/components/game/organisms/three/index.cjs +490 -1
- package/dist/components/game/organisms/three/index.js +490 -1
- package/dist/components/index.cjs +669 -371
- package/dist/components/index.js +669 -371
- package/dist/docs/index.cjs +301 -5
- package/dist/docs/index.js +301 -5
- package/dist/hooks/index.cjs +297 -3
- package/dist/hooks/index.js +297 -3
- package/dist/locales/index.cjs +899 -9
- package/dist/locales/index.js +899 -9
- package/dist/providers/index.cjs +669 -371
- package/dist/providers/index.js +669 -371
- package/dist/runtime/index.cjs +669 -371
- package/dist/runtime/index.js +669 -371
- package/locales/ar.json +301 -31
- package/locales/en.json +297 -31
- package/locales/sl.json +301 -31
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -298,7 +298,10 @@ var en_default;
|
|
|
298
298
|
var init_en = __esm({
|
|
299
299
|
"locales/en.json"() {
|
|
300
300
|
en_default = {
|
|
301
|
-
$meta: {
|
|
301
|
+
$meta: {
|
|
302
|
+
locale: "en",
|
|
303
|
+
direction: "ltr"
|
|
304
|
+
},
|
|
302
305
|
"common.save": "Save",
|
|
303
306
|
"common.cancel": "Cancel",
|
|
304
307
|
"common.delete": "Delete",
|
|
@@ -440,7 +443,6 @@ var init_en = __esm({
|
|
|
440
443
|
"error.somethingWentWrong": "Something went wrong",
|
|
441
444
|
"error.loadingItems": "Loading items...",
|
|
442
445
|
"error.noItemsFound": "No items found",
|
|
443
|
-
"error.notFound": "Not found",
|
|
444
446
|
"debug.noEntityData": "No entity data",
|
|
445
447
|
"debug.noEntities": "No entities",
|
|
446
448
|
"debug.noTicks": "No ticks registered",
|
|
@@ -472,7 +474,299 @@ var init_en = __esm({
|
|
|
472
474
|
"template.showcase": "Showcase",
|
|
473
475
|
"template.faq": "Frequently Asked Questions",
|
|
474
476
|
"template.ourTeam": "Our Team",
|
|
475
|
-
"template.caseStudies": "Case Studies"
|
|
477
|
+
"template.caseStudies": "Case Studies",
|
|
478
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
479
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
480
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
481
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
482
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
483
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
484
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
485
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
486
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
487
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
488
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
489
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
490
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
491
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
492
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
493
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
494
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
495
|
+
"richBlockEditor.blockType.code": "Code",
|
|
496
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
497
|
+
"richBlockEditor.blockType.image": "Image",
|
|
498
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
499
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
500
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
501
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
502
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
503
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
504
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
505
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
506
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
507
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
508
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
509
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
510
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
511
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
512
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
513
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
514
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
515
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
516
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
517
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
518
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
519
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
520
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
521
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
522
|
+
"richBlockEditor.addItem": "Add item",
|
|
523
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
524
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
525
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
526
|
+
"versionDiff.compare": "Compare",
|
|
527
|
+
"versionDiff.to": "to",
|
|
528
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
529
|
+
"versionDiff.afterRevision": "After revision",
|
|
530
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
531
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
532
|
+
"versionDiff.revert": "Revert",
|
|
533
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
534
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
535
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
536
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
537
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
538
|
+
"violationAlert.adminLabel": "Admin:",
|
|
539
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
540
|
+
"violationAlert.goToField": "Go to field",
|
|
541
|
+
"branchingLogic.title": "Branching logic",
|
|
542
|
+
"branchingLogic.if": "If",
|
|
543
|
+
"branchingLogic.goTo": "go to",
|
|
544
|
+
"branchingLogic.rules": "Rules",
|
|
545
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
546
|
+
"branchingLogic.addRule": "Add rule",
|
|
547
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
548
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
549
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
550
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
551
|
+
"branchingLogic.selectTarget": "Select target",
|
|
552
|
+
"branchingLogic.selectValue": "Select value",
|
|
553
|
+
"branchingLogic.addValue": "Add value",
|
|
554
|
+
"branchingLogic.value": "Value",
|
|
555
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
556
|
+
"branchingLogic.operatorEquals": "equals",
|
|
557
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
558
|
+
"branchingLogic.operatorContains": "contains",
|
|
559
|
+
"branchingLogic.operatorIn": "is one of",
|
|
560
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
561
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
562
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
563
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
564
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
565
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
566
|
+
"filterGroup.filters": "Filters",
|
|
567
|
+
"filterGroup.all": "All",
|
|
568
|
+
"filterGroup.clear": "Clear",
|
|
569
|
+
"filterGroup.clearAll": "Clear all",
|
|
570
|
+
"filterGroup.from": "From",
|
|
571
|
+
"filterGroup.to": "To",
|
|
572
|
+
"filterGroup.allOf": "All {{label}}",
|
|
573
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
574
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
575
|
+
"debug.expression": "Expression",
|
|
576
|
+
"debug.inputs": "Inputs",
|
|
577
|
+
"debug.trait": "Trait",
|
|
578
|
+
"debug.filterAll": "All",
|
|
579
|
+
"debug.filterPassed": "Passed",
|
|
580
|
+
"debug.filterFailed": "Failed",
|
|
581
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
582
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
583
|
+
"debug.activeStates": "Active States",
|
|
584
|
+
"debug.availableEvents": "Available Events",
|
|
585
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
586
|
+
"debug.guarded": "guarded",
|
|
587
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
588
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
589
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
590
|
+
"debug.states": "States",
|
|
591
|
+
"debug.transitions": "Transitions",
|
|
592
|
+
"debug.guards": "Guards",
|
|
593
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
594
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
595
|
+
"debug.singleton": "Singleton",
|
|
596
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
597
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
598
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
599
|
+
"debug.persistent": "Persistent",
|
|
600
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
601
|
+
"debug.notLoaded": "not loaded",
|
|
602
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
603
|
+
"debug.allCount": "All ({{count}})",
|
|
604
|
+
"debug.autoScroll": "Auto-scroll",
|
|
605
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
606
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
607
|
+
"debug.guardLabel": "guard:",
|
|
608
|
+
"debug.effectsCount": "{{count}} effects",
|
|
609
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
610
|
+
"debug.never": "Never",
|
|
611
|
+
"debug.connected": "Connected",
|
|
612
|
+
"debug.disconnected": "Disconnected",
|
|
613
|
+
"debug.lastError": "Last Error",
|
|
614
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
615
|
+
"debug.server": "server",
|
|
616
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
617
|
+
"debug.emitLabel": "emit:",
|
|
618
|
+
"debug.rowsCount": "{{count}} rows",
|
|
619
|
+
"debug.serverResponse": "server response",
|
|
620
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
621
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
622
|
+
"debug.failCount": "{{count}} fail",
|
|
623
|
+
"debug.ok": "OK",
|
|
624
|
+
"debug.localCount": "{{count}} local",
|
|
625
|
+
"debug.serverCount": "{{count}} server",
|
|
626
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
627
|
+
"debug.tabDispatch": "Dispatch",
|
|
628
|
+
"debug.tabVerify": "Verify",
|
|
629
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
630
|
+
"debug.tabTimeline": "Timeline",
|
|
631
|
+
"debug.tabBridge": "Bridge",
|
|
632
|
+
"debug.tabTraits": "Traits",
|
|
633
|
+
"debug.tabTicks": "Ticks",
|
|
634
|
+
"debug.tabEntities": "Entities",
|
|
635
|
+
"debug.tabEvents": "Events",
|
|
636
|
+
"debug.tabGuards": "Guards",
|
|
637
|
+
"debug.debugger": "Debugger",
|
|
638
|
+
"debug.failedCount": "{{count}} failed",
|
|
639
|
+
"debug.traitsCount": "{{count}} traits",
|
|
640
|
+
"debug.idle": "Idle",
|
|
641
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
642
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
643
|
+
"debug.allPassing": "All passing",
|
|
644
|
+
"debug.runtime": "Runtime",
|
|
645
|
+
"debug.close": "Close (`)",
|
|
646
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
647
|
+
"replyTree.expandReplies": "Expand replies",
|
|
648
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
649
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
650
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
651
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
652
|
+
"replyTree.reply": "Reply",
|
|
653
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
654
|
+
"replyTree.flag": "Flag",
|
|
655
|
+
"replyTree.send": "Send",
|
|
656
|
+
"replyTree.continueThread": "Continue thread",
|
|
657
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
658
|
+
"signaturePad.label": "Signature",
|
|
659
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
660
|
+
"signaturePad.clear": "Clear",
|
|
661
|
+
"signaturePad.confirm": "Confirm",
|
|
662
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
663
|
+
"qrScanner.paused": "Paused",
|
|
664
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
665
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
666
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
667
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
668
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
669
|
+
"docSearch.placeholder": "Search documentation...",
|
|
670
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
671
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
672
|
+
"avl.trigger": "Trigger",
|
|
673
|
+
"avl.guard": "Guard",
|
|
674
|
+
"avl.effects": "Effects",
|
|
675
|
+
"avl.props": "Props",
|
|
676
|
+
"avl.entity": "Entity",
|
|
677
|
+
"avl.traits": "Traits",
|
|
678
|
+
"avl.transition": "Transition",
|
|
679
|
+
"avl.onEntity": "on {{entity}}",
|
|
680
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
681
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
682
|
+
"avl.zoomIn": "Zoom in",
|
|
683
|
+
"avl.zoomOut": "Zoom out",
|
|
684
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
685
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
686
|
+
"avl.noTraitData": "No trait data",
|
|
687
|
+
"avl.computingLayout": "Computing layout...",
|
|
688
|
+
"avl.noStateMachine": "No state machine",
|
|
689
|
+
"avl.listensFor": "listens for {{event}}",
|
|
690
|
+
"avl.emits": "emits {{event}}",
|
|
691
|
+
"avl.pageLayout": "Page Layout",
|
|
692
|
+
"avl.overlaySuffix": "(overlay)",
|
|
693
|
+
"orbPreview.previewBadge": "Preview",
|
|
694
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
695
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
696
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
697
|
+
"orbPreview.noPreview": "No preview available",
|
|
698
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
699
|
+
"detailView.noTransitionData": "No transition data",
|
|
700
|
+
"orbInspector.required": "req",
|
|
701
|
+
"orbInspector.addField": "Add Field",
|
|
702
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
703
|
+
"orbInspector.standalone": "Standalone",
|
|
704
|
+
"orbInspector.embedded": "Embedded",
|
|
705
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
706
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
707
|
+
"orbInspector.addEffect": "Add Effect",
|
|
708
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
709
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
710
|
+
"orbInspector.tokens": "Tokens",
|
|
711
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
712
|
+
"orbInspector.variant": "Variant",
|
|
713
|
+
"orbInspector.size": "Size",
|
|
714
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
715
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
716
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
717
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
718
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
719
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
720
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
721
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
722
|
+
"orbInspector.tab.styles": "Styles",
|
|
723
|
+
"orbInspector.tab.code": "Code",
|
|
724
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
725
|
+
"canvas.overview": "Overview",
|
|
726
|
+
"canvas.expanded": "Expanded",
|
|
727
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
728
|
+
"canvas.screensCount": "{{count}} screens",
|
|
729
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
730
|
+
"lawReference.viewFullText": "View full law text",
|
|
731
|
+
"statCard.defaultLabel": "Stat",
|
|
732
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
733
|
+
"mediaGallery.upload": "Upload",
|
|
734
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
735
|
+
"pagination.jumpPlaceholder": "Page",
|
|
736
|
+
"table.selectRow": "Select row {{id}}",
|
|
737
|
+
"card.selectItem": "Select {{item}}",
|
|
738
|
+
"card.itemFallback": "item",
|
|
739
|
+
"fileTree.noFiles": "No files",
|
|
740
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
741
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
742
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
743
|
+
"upload.dropFilesHere": "Drop files here",
|
|
744
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
745
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
746
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
747
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
748
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
749
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
750
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
751
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
752
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
753
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
754
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
755
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
756
|
+
"optionConstraint.optional": "Optional",
|
|
757
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
758
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
759
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
760
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
761
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
762
|
+
"stateMachine.pinned": "Pinned",
|
|
763
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
764
|
+
"stateMachine.externalEffects": "External Effects",
|
|
765
|
+
"stateMachine.legend.initial": "Initial",
|
|
766
|
+
"stateMachine.legend.final": "Final",
|
|
767
|
+
"stateMachine.legend.state": "State",
|
|
768
|
+
"stateMachine.legend.multiEvent": "Multi-event",
|
|
769
|
+
"relationSelect.selectPlaceholder": "Select..."
|
|
476
770
|
};
|
|
477
771
|
}
|
|
478
772
|
});
|
|
@@ -5455,6 +5749,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5455
5749
|
init_Typography();
|
|
5456
5750
|
init_Divider();
|
|
5457
5751
|
init_cn();
|
|
5752
|
+
init_useTranslate();
|
|
5458
5753
|
positionStyles2 = {
|
|
5459
5754
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5460
5755
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5473,6 +5768,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5473
5768
|
position = "top",
|
|
5474
5769
|
className
|
|
5475
5770
|
}) => {
|
|
5771
|
+
const { t } = useTranslate();
|
|
5476
5772
|
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
5477
5773
|
const timeoutRef = React84__default.useRef(null);
|
|
5478
5774
|
const handleMouseEnter = () => {
|
|
@@ -5556,7 +5852,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5556
5852
|
target: "_blank",
|
|
5557
5853
|
rel: "noopener noreferrer",
|
|
5558
5854
|
onClick: (e) => e.stopPropagation(),
|
|
5559
|
-
children: "
|
|
5855
|
+
children: t("lawReference.viewFullText")
|
|
5560
5856
|
}
|
|
5561
5857
|
)
|
|
5562
5858
|
] }),
|
|
@@ -13458,6 +13754,7 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13458
13754
|
var init_BehaviorView = __esm({
|
|
13459
13755
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13460
13756
|
"use client";
|
|
13757
|
+
init_useTranslate();
|
|
13461
13758
|
init_AvlState();
|
|
13462
13759
|
init_AvlTransitionLane();
|
|
13463
13760
|
init_AvlSwimLane();
|
|
@@ -13467,6 +13764,7 @@ var init_BehaviorView = __esm({
|
|
|
13467
13764
|
SWIM_GUTTER = 120;
|
|
13468
13765
|
CENTER_W = 360;
|
|
13469
13766
|
BehaviorView = ({ data }) => {
|
|
13767
|
+
const { t } = useTranslate();
|
|
13470
13768
|
const [layout, setLayout] = useState(null);
|
|
13471
13769
|
const traitName = data.traits[0]?.name;
|
|
13472
13770
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13476,10 +13774,10 @@ var init_BehaviorView = __esm({
|
|
|
13476
13774
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
13477
13775
|
}, [dataKey]);
|
|
13478
13776
|
if (!traitData) {
|
|
13479
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13777
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
13480
13778
|
}
|
|
13481
13779
|
if (!layout) {
|
|
13482
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
13780
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.computingLayout") });
|
|
13483
13781
|
}
|
|
13484
13782
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
13485
13783
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -13495,10 +13793,7 @@ var init_BehaviorView = __esm({
|
|
|
13495
13793
|
const machineHeight = scaledH + 100;
|
|
13496
13794
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
13497
13795
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
13498
|
-
/* @__PURE__ */
|
|
13499
|
-
"on ",
|
|
13500
|
-
traitData.linkedEntity
|
|
13501
|
-
] }),
|
|
13796
|
+
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 36, textAnchor: "middle", fill: "var(--color-muted-foreground)", fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.onEntity", { entity: traitData.linkedEntity }) }),
|
|
13502
13797
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
13503
13798
|
/* @__PURE__ */ jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
13504
13799
|
/* @__PURE__ */ jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -13806,7 +14101,7 @@ var init_CodeBlock = __esm({
|
|
|
13806
14101
|
const isLolo = language === "lolo";
|
|
13807
14102
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
13808
14103
|
const eventBus = useEventBus();
|
|
13809
|
-
const { t
|
|
14104
|
+
const { t } = useTranslate();
|
|
13810
14105
|
const scrollRef = useRef(null);
|
|
13811
14106
|
const codeRef = useRef(null);
|
|
13812
14107
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -14061,7 +14356,7 @@ var init_CodeBlock = __esm({
|
|
|
14061
14356
|
size: "sm",
|
|
14062
14357
|
onClick: handleCopy,
|
|
14063
14358
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
14064
|
-
"aria-label": "
|
|
14359
|
+
"aria-label": t("common.copy"),
|
|
14065
14360
|
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
14066
14361
|
}
|
|
14067
14362
|
)
|
|
@@ -14666,7 +14961,7 @@ var init_StateMachineView = __esm({
|
|
|
14666
14961
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14667
14962
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14668
14963
|
const isSingle2 = bundle.labels.length === 1;
|
|
14669
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
14964
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14670
14965
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
14671
14966
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
14672
14967
|
const cx = fromState.x;
|
|
@@ -14792,7 +15087,7 @@ var init_StateMachineView = __esm({
|
|
|
14792
15087
|
const controlX = midX + perpX;
|
|
14793
15088
|
const controlY = midY + perpY;
|
|
14794
15089
|
const isSingle = bundle.labels.length === 1;
|
|
14795
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
15090
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14796
15091
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
14797
15092
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
14798
15093
|
const curveMidpoint = {
|
|
@@ -14947,7 +15242,7 @@ var init_StateMachineView = __esm({
|
|
|
14947
15242
|
{
|
|
14948
15243
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
14949
15244
|
style: { backgroundColor: "var(--color-success)" },
|
|
14950
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
15245
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
14951
15246
|
}
|
|
14952
15247
|
),
|
|
14953
15248
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -14969,10 +15264,7 @@ var init_StateMachineView = __esm({
|
|
|
14969
15264
|
{
|
|
14970
15265
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
14971
15266
|
style: { backgroundColor: "var(--color-accent)" },
|
|
14972
|
-
children: /* @__PURE__ */
|
|
14973
|
-
bundle.labels.length,
|
|
14974
|
-
" events"
|
|
14975
|
-
] })
|
|
15267
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
14976
15268
|
}
|
|
14977
15269
|
)
|
|
14978
15270
|
]
|
|
@@ -15117,7 +15409,7 @@ var init_StateMachineView = __esm({
|
|
|
15117
15409
|
align: "center",
|
|
15118
15410
|
className: "mb-2",
|
|
15119
15411
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
15120
|
-
children: "
|
|
15412
|
+
children: t("stateMachine.externalEffects")
|
|
15121
15413
|
}
|
|
15122
15414
|
),
|
|
15123
15415
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -15137,10 +15429,10 @@ var init_StateMachineView = __esm({
|
|
|
15137
15429
|
Legend = ({ config, y }) => {
|
|
15138
15430
|
const { t } = useTranslate();
|
|
15139
15431
|
const items = [
|
|
15140
|
-
{ label: "
|
|
15141
|
-
{ label: "
|
|
15142
|
-
{ label: "
|
|
15143
|
-
{ label: "
|
|
15432
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15433
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
15434
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
15435
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
15144
15436
|
];
|
|
15145
15437
|
return /* @__PURE__ */ jsx(
|
|
15146
15438
|
HStack,
|
|
@@ -15155,8 +15447,8 @@ var init_StateMachineView = __esm({
|
|
|
15155
15447
|
{
|
|
15156
15448
|
className: "w-3 h-3 rounded-full",
|
|
15157
15449
|
style: {
|
|
15158
|
-
backgroundColor: item.
|
|
15159
|
-
border: item.
|
|
15450
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
15451
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
15160
15452
|
}
|
|
15161
15453
|
}
|
|
15162
15454
|
),
|
|
@@ -15168,7 +15460,7 @@ var init_StateMachineView = __esm({
|
|
|
15168
15460
|
children: item.label
|
|
15169
15461
|
}
|
|
15170
15462
|
)
|
|
15171
|
-
] }, item.
|
|
15463
|
+
] }, item.key))
|
|
15172
15464
|
}
|
|
15173
15465
|
);
|
|
15174
15466
|
};
|
|
@@ -15962,13 +16254,13 @@ var init_JazariStateMachine = __esm({
|
|
|
15962
16254
|
);
|
|
15963
16255
|
}, [resolvedTrait, entityFields]);
|
|
15964
16256
|
if (isLoading) {
|
|
15965
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
16257
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
15966
16258
|
}
|
|
15967
16259
|
if (error) {
|
|
15968
16260
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
15969
16261
|
}
|
|
15970
16262
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
15971
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
16263
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
15972
16264
|
}
|
|
15973
16265
|
return /* @__PURE__ */ jsx(
|
|
15974
16266
|
StateMachineView,
|
|
@@ -17012,13 +17304,13 @@ var init_LayoutPatterns = __esm({
|
|
|
17012
17304
|
function generateRuleId() {
|
|
17013
17305
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
17014
17306
|
}
|
|
17015
|
-
function questionsToOptions(questions,
|
|
17307
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
17016
17308
|
const opts = questions.map((q) => ({
|
|
17017
17309
|
value: q.id,
|
|
17018
17310
|
label: q.label
|
|
17019
17311
|
}));
|
|
17020
|
-
if (
|
|
17021
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
17312
|
+
if (endOfSurveyLabel !== null) {
|
|
17313
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
17022
17314
|
}
|
|
17023
17315
|
return opts;
|
|
17024
17316
|
}
|
|
@@ -17027,7 +17319,7 @@ function isRuleBroken(rule, questions) {
|
|
|
17027
17319
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
17028
17320
|
return !sourceExists || !targetExists;
|
|
17029
17321
|
}
|
|
17030
|
-
var END_OF_SURVEY,
|
|
17322
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
17031
17323
|
var init_BranchingLogicBuilder = __esm({
|
|
17032
17324
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
17033
17325
|
"use client";
|
|
@@ -17040,14 +17332,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17040
17332
|
init_FilterPill();
|
|
17041
17333
|
init_Box();
|
|
17042
17334
|
init_useEventBus();
|
|
17335
|
+
init_useTranslate();
|
|
17043
17336
|
init_cn();
|
|
17044
17337
|
END_OF_SURVEY = "end-of-survey";
|
|
17045
|
-
OPERATOR_OPTIONS = [
|
|
17046
|
-
{ value: "equals", label: "equals" },
|
|
17047
|
-
{ value: "not-equals", label: "does not equal" },
|
|
17048
|
-
{ value: "contains", label: "contains" },
|
|
17049
|
-
{ value: "in", label: "is one of" }
|
|
17050
|
-
];
|
|
17051
17338
|
RuleRow = ({
|
|
17052
17339
|
rule,
|
|
17053
17340
|
questions,
|
|
@@ -17056,8 +17343,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17056
17343
|
onChange,
|
|
17057
17344
|
onDelete
|
|
17058
17345
|
}) => {
|
|
17059
|
-
const
|
|
17060
|
-
const
|
|
17346
|
+
const { t } = useTranslate();
|
|
17347
|
+
const operatorOptions = useMemo(
|
|
17348
|
+
() => [
|
|
17349
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
17350
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
17351
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
17352
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
17353
|
+
],
|
|
17354
|
+
[t]
|
|
17355
|
+
);
|
|
17356
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
17357
|
+
const targetOptions = useMemo(
|
|
17358
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
17359
|
+
[questions, t]
|
|
17360
|
+
);
|
|
17061
17361
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
17062
17362
|
const valueOptions = useMemo(() => {
|
|
17063
17363
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -17102,22 +17402,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17102
17402
|
),
|
|
17103
17403
|
children: [
|
|
17104
17404
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
17105
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
17405
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
17106
17406
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17107
17407
|
Select,
|
|
17108
17408
|
{
|
|
17109
17409
|
options: sourceOptions,
|
|
17110
17410
|
value: rule.sourceQuestionId,
|
|
17111
|
-
placeholder: "
|
|
17411
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
17112
17412
|
onChange: handleSource,
|
|
17113
17413
|
disabled: readOnly,
|
|
17114
|
-
error: broken ? "
|
|
17414
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
17115
17415
|
}
|
|
17116
17416
|
) }),
|
|
17117
17417
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
17118
17418
|
Select,
|
|
17119
17419
|
{
|
|
17120
|
-
options:
|
|
17420
|
+
options: operatorOptions,
|
|
17121
17421
|
value: rule.operator,
|
|
17122
17422
|
onChange: handleOperator,
|
|
17123
17423
|
disabled: readOnly
|
|
@@ -17140,7 +17440,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17140
17440
|
{
|
|
17141
17441
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
17142
17442
|
value: "",
|
|
17143
|
-
placeholder: "
|
|
17443
|
+
placeholder: t("branchingLogic.addValue"),
|
|
17144
17444
|
onChange: handleAddChip,
|
|
17145
17445
|
disabled: readOnly
|
|
17146
17446
|
}
|
|
@@ -17148,7 +17448,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17148
17448
|
Input,
|
|
17149
17449
|
{
|
|
17150
17450
|
inputType: "text",
|
|
17151
|
-
placeholder: "
|
|
17451
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
17152
17452
|
value: "",
|
|
17153
17453
|
onKeyDown: (e) => {
|
|
17154
17454
|
if (e.key !== "Enter") return;
|
|
@@ -17166,7 +17466,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17166
17466
|
{
|
|
17167
17467
|
options: valueOptions,
|
|
17168
17468
|
value: scalarValue,
|
|
17169
|
-
placeholder: "
|
|
17469
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
17170
17470
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
17171
17471
|
disabled: readOnly
|
|
17172
17472
|
}
|
|
@@ -17174,7 +17474,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17174
17474
|
Input,
|
|
17175
17475
|
{
|
|
17176
17476
|
inputType: "text",
|
|
17177
|
-
placeholder: "
|
|
17477
|
+
placeholder: t("branchingLogic.value"),
|
|
17178
17478
|
value: scalarValue,
|
|
17179
17479
|
onChange: handleScalarValue,
|
|
17180
17480
|
disabled: readOnly
|
|
@@ -17182,17 +17482,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17182
17482
|
) }),
|
|
17183
17483
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
17184
17484
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
17185
|
-
"
|
|
17485
|
+
t("branchingLogic.goTo")
|
|
17186
17486
|
] }),
|
|
17187
17487
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17188
17488
|
Select,
|
|
17189
17489
|
{
|
|
17190
17490
|
options: targetOptions,
|
|
17191
17491
|
value: rule.targetQuestionId,
|
|
17192
|
-
placeholder: "
|
|
17492
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
17193
17493
|
onChange: handleTarget,
|
|
17194
17494
|
disabled: readOnly,
|
|
17195
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
17495
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
17196
17496
|
}
|
|
17197
17497
|
) }),
|
|
17198
17498
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -17204,11 +17504,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17204
17504
|
action: "DELETE_RULE",
|
|
17205
17505
|
actionPayload: { ruleId: rule.id },
|
|
17206
17506
|
onClick: onDelete,
|
|
17207
|
-
"aria-label": "
|
|
17507
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
17208
17508
|
}
|
|
17209
17509
|
)
|
|
17210
17510
|
] }),
|
|
17211
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
17511
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
17212
17512
|
]
|
|
17213
17513
|
}
|
|
17214
17514
|
);
|
|
@@ -17218,10 +17518,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17218
17518
|
NODE_GAP_Y = 80;
|
|
17219
17519
|
PADDING = 32;
|
|
17220
17520
|
LogicGraph = ({ questions, rules }) => {
|
|
17521
|
+
const { t } = useTranslate();
|
|
17522
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17221
17523
|
const layout = useMemo(() => {
|
|
17222
17524
|
const items = [
|
|
17223
17525
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
17224
|
-
{ id: END_OF_SURVEY, label:
|
|
17526
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
17225
17527
|
];
|
|
17226
17528
|
const positions = {};
|
|
17227
17529
|
items.forEach((item, i) => {
|
|
@@ -17233,14 +17535,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17233
17535
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
17234
17536
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
17235
17537
|
return { items, positions, width, height };
|
|
17236
|
-
}, [questions]);
|
|
17538
|
+
}, [questions, endOfSurveyLabel]);
|
|
17237
17539
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
17238
17540
|
"svg",
|
|
17239
17541
|
{
|
|
17240
17542
|
width: layout.width,
|
|
17241
17543
|
height: layout.height,
|
|
17242
17544
|
role: "img",
|
|
17243
|
-
"aria-label": "
|
|
17545
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
17244
17546
|
style: { display: "block" },
|
|
17245
17547
|
children: [
|
|
17246
17548
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -17348,6 +17650,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17348
17650
|
readOnly = false,
|
|
17349
17651
|
className
|
|
17350
17652
|
}) => {
|
|
17653
|
+
const { t } = useTranslate();
|
|
17351
17654
|
const eventBus = useEventBus();
|
|
17352
17655
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17353
17656
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17400,16 +17703,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17400
17703
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
17401
17704
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
17402
17705
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
17403
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
17706
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
17404
17707
|
/* @__PURE__ */ jsx(
|
|
17405
17708
|
Badge,
|
|
17406
17709
|
{
|
|
17407
17710
|
variant: "neutral",
|
|
17408
17711
|
size: "sm",
|
|
17409
|
-
label:
|
|
17712
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
17410
17713
|
}
|
|
17411
17714
|
),
|
|
17412
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17715
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17716
|
+
Badge,
|
|
17717
|
+
{
|
|
17718
|
+
variant: "error",
|
|
17719
|
+
size: "sm",
|
|
17720
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
17721
|
+
}
|
|
17722
|
+
)
|
|
17413
17723
|
] }),
|
|
17414
17724
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
17415
17725
|
/* @__PURE__ */ jsx(
|
|
@@ -17420,7 +17730,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17420
17730
|
leftIcon: Pencil,
|
|
17421
17731
|
action: "VIEW_EDIT",
|
|
17422
17732
|
onClick: () => setView("edit"),
|
|
17423
|
-
children: "
|
|
17733
|
+
children: t("branchingLogic.rules")
|
|
17424
17734
|
}
|
|
17425
17735
|
),
|
|
17426
17736
|
/* @__PURE__ */ jsx(
|
|
@@ -17431,13 +17741,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17431
17741
|
leftIcon: Eye,
|
|
17432
17742
|
action: "VIEW_GRAPH",
|
|
17433
17743
|
onClick: () => setView("graph"),
|
|
17434
|
-
children: "
|
|
17744
|
+
children: t("branchingLogic.logicGraph")
|
|
17435
17745
|
}
|
|
17436
17746
|
)
|
|
17437
17747
|
] })
|
|
17438
17748
|
] }),
|
|
17439
17749
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
17440
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
17750
|
+
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsx(
|
|
17441
17751
|
RuleRow,
|
|
17442
17752
|
{
|
|
17443
17753
|
rule,
|
|
@@ -17458,7 +17768,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17458
17768
|
action: "ADD_RULE",
|
|
17459
17769
|
onClick: handleAddRule,
|
|
17460
17770
|
disabled: noQuestions,
|
|
17461
|
-
children: "
|
|
17771
|
+
children: t("branchingLogic.addRule")
|
|
17462
17772
|
}
|
|
17463
17773
|
) })
|
|
17464
17774
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -18018,7 +18328,7 @@ function CalendarGrid({
|
|
|
18018
18328
|
onClick: stepPrev,
|
|
18019
18329
|
"aria-disabled": !canPrev || void 0,
|
|
18020
18330
|
"aria-label": t("aria.previousDays"),
|
|
18021
|
-
children: "
|
|
18331
|
+
children: t("nav.previous")
|
|
18022
18332
|
}
|
|
18023
18333
|
),
|
|
18024
18334
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -18031,7 +18341,7 @@ function CalendarGrid({
|
|
|
18031
18341
|
onClick: stepNext,
|
|
18032
18342
|
"aria-disabled": !canNext || void 0,
|
|
18033
18343
|
"aria-label": t("aria.nextDays"),
|
|
18034
|
-
children: "
|
|
18344
|
+
children: t("nav.next")
|
|
18035
18345
|
}
|
|
18036
18346
|
)
|
|
18037
18347
|
] }),
|
|
@@ -19581,7 +19891,7 @@ var init_Pagination = __esm({
|
|
|
19581
19891
|
type: "number",
|
|
19582
19892
|
value: jumpToPage,
|
|
19583
19893
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
19584
|
-
placeholder: "
|
|
19894
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
19585
19895
|
className: "w-20",
|
|
19586
19896
|
onKeyDown: (e) => {
|
|
19587
19897
|
if (e.key === "Enter") {
|
|
@@ -19719,13 +20029,10 @@ var init_CardGrid = __esm({
|
|
|
19719
20029
|
return children;
|
|
19720
20030
|
}
|
|
19721
20031
|
if (isLoading) {
|
|
19722
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
20032
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
19723
20033
|
}
|
|
19724
20034
|
if (error) {
|
|
19725
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
19726
|
-
"Error loading items: ",
|
|
19727
|
-
error.message
|
|
19728
|
-
] }) });
|
|
20035
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
19729
20036
|
}
|
|
19730
20037
|
if (normalizedData.length === 0) {
|
|
19731
20038
|
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -23577,7 +23884,7 @@ function DataGrid({
|
|
|
23577
23884
|
onChange: () => toggleSelection(id),
|
|
23578
23885
|
onClick: (e) => e.stopPropagation(),
|
|
23579
23886
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
23580
|
-
"aria-label":
|
|
23887
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
23581
23888
|
}
|
|
23582
23889
|
),
|
|
23583
23890
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -23775,7 +24082,7 @@ function formatDate3(value) {
|
|
|
23775
24082
|
if (isNaN(d.getTime())) return String(value);
|
|
23776
24083
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
23777
24084
|
}
|
|
23778
|
-
function formatValue2(value, format) {
|
|
24085
|
+
function formatValue2(value, format, boolLabels) {
|
|
23779
24086
|
if (value === void 0 || value === null) return "";
|
|
23780
24087
|
switch (format) {
|
|
23781
24088
|
case "date":
|
|
@@ -23787,7 +24094,7 @@ function formatValue2(value, format) {
|
|
|
23787
24094
|
case "percent":
|
|
23788
24095
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
23789
24096
|
case "boolean":
|
|
23790
|
-
return value ? "Yes" : "No";
|
|
24097
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
23791
24098
|
default:
|
|
23792
24099
|
return String(value);
|
|
23793
24100
|
}
|
|
@@ -24083,7 +24390,7 @@ function DataList({
|
|
|
24083
24390
|
field.label ?? fieldLabel3(field.name),
|
|
24084
24391
|
":"
|
|
24085
24392
|
] }),
|
|
24086
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
24393
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
24087
24394
|
] }, field.name);
|
|
24088
24395
|
}) }),
|
|
24089
24396
|
progressFields.map((field) => {
|
|
@@ -24213,6 +24520,7 @@ var init_FileTree = __esm({
|
|
|
24213
24520
|
init_Box();
|
|
24214
24521
|
init_Typography();
|
|
24215
24522
|
init_Icon();
|
|
24523
|
+
init_useTranslate();
|
|
24216
24524
|
TreeNodeItem = ({
|
|
24217
24525
|
node,
|
|
24218
24526
|
depth,
|
|
@@ -24298,8 +24606,9 @@ var init_FileTree = __esm({
|
|
|
24298
24606
|
className,
|
|
24299
24607
|
indent = 16
|
|
24300
24608
|
}) => {
|
|
24609
|
+
const { t } = useTranslate();
|
|
24301
24610
|
if (tree.length === 0) {
|
|
24302
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
24611
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24303
24612
|
}
|
|
24304
24613
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
24305
24614
|
TreeNodeItem,
|
|
@@ -24354,6 +24663,7 @@ var init_FilterGroup = __esm({
|
|
|
24354
24663
|
init_Icon();
|
|
24355
24664
|
init_useEventBus();
|
|
24356
24665
|
init_useQuerySingleton();
|
|
24666
|
+
init_useTranslate();
|
|
24357
24667
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24358
24668
|
lookStyles6 = {
|
|
24359
24669
|
toolbar: "",
|
|
@@ -24374,6 +24684,7 @@ var init_FilterGroup = __esm({
|
|
|
24374
24684
|
isLoading,
|
|
24375
24685
|
look = "toolbar"
|
|
24376
24686
|
}) => {
|
|
24687
|
+
const { t } = useTranslate();
|
|
24377
24688
|
const eventBus = useEventBus();
|
|
24378
24689
|
const queryState = useQuerySingleton(query);
|
|
24379
24690
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -24455,7 +24766,7 @@ var init_FilterGroup = __esm({
|
|
|
24455
24766
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
24456
24767
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24457
24768
|
),
|
|
24458
|
-
children: "
|
|
24769
|
+
children: t("filterGroup.all")
|
|
24459
24770
|
}
|
|
24460
24771
|
),
|
|
24461
24772
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -24483,7 +24794,7 @@ var init_FilterGroup = __esm({
|
|
|
24483
24794
|
size: "sm",
|
|
24484
24795
|
onClick: handleClearAll,
|
|
24485
24796
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24486
|
-
children: "
|
|
24797
|
+
children: t("filterGroup.clear")
|
|
24487
24798
|
}
|
|
24488
24799
|
)
|
|
24489
24800
|
]
|
|
@@ -24494,7 +24805,7 @@ var init_FilterGroup = __esm({
|
|
|
24494
24805
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
24495
24806
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
24496
24807
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24497
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24808
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24498
24809
|
] }),
|
|
24499
24810
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
24500
24811
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -24517,7 +24828,7 @@ var init_FilterGroup = __esm({
|
|
|
24517
24828
|
`${filter.field}_from`,
|
|
24518
24829
|
e.target.value || null
|
|
24519
24830
|
),
|
|
24520
|
-
placeholder: "
|
|
24831
|
+
placeholder: t("filterGroup.from"),
|
|
24521
24832
|
clearable: true,
|
|
24522
24833
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
24523
24834
|
}
|
|
@@ -24531,7 +24842,7 @@ var init_FilterGroup = __esm({
|
|
|
24531
24842
|
`${filter.field}_to`,
|
|
24532
24843
|
e.target.value || null
|
|
24533
24844
|
),
|
|
24534
|
-
placeholder: "
|
|
24845
|
+
placeholder: t("filterGroup.to"),
|
|
24535
24846
|
clearable: true,
|
|
24536
24847
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
24537
24848
|
}
|
|
@@ -24551,7 +24862,7 @@ var init_FilterGroup = __esm({
|
|
|
24551
24862
|
value: selectedValues[filter.field] || "all",
|
|
24552
24863
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24553
24864
|
options: [
|
|
24554
|
-
{ value: "all", label: "
|
|
24865
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24555
24866
|
...filter.options?.map((opt) => ({
|
|
24556
24867
|
value: opt,
|
|
24557
24868
|
label: opt
|
|
@@ -24568,7 +24879,7 @@ var init_FilterGroup = __esm({
|
|
|
24568
24879
|
onClick: handleClearAll,
|
|
24569
24880
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24570
24881
|
className: "self-start",
|
|
24571
|
-
children: "
|
|
24882
|
+
children: t("filterGroup.clearAll")
|
|
24572
24883
|
}
|
|
24573
24884
|
)
|
|
24574
24885
|
] });
|
|
@@ -24634,7 +24945,7 @@ var init_FilterGroup = __esm({
|
|
|
24634
24945
|
value: selectedValues[filter.field] || "all",
|
|
24635
24946
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24636
24947
|
options: [
|
|
24637
|
-
{ value: "all", label:
|
|
24948
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
24638
24949
|
...filter.options?.map((opt) => ({
|
|
24639
24950
|
value: opt,
|
|
24640
24951
|
label: opt
|
|
@@ -24663,7 +24974,7 @@ var init_FilterGroup = __esm({
|
|
|
24663
24974
|
field
|
|
24664
24975
|
);
|
|
24665
24976
|
}),
|
|
24666
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
24977
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
24667
24978
|
] })
|
|
24668
24979
|
]
|
|
24669
24980
|
}
|
|
@@ -24688,7 +24999,7 @@ var init_FilterGroup = __esm({
|
|
|
24688
24999
|
className: "text-muted-foreground",
|
|
24689
25000
|
children: [
|
|
24690
25001
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24691
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
25002
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24692
25003
|
]
|
|
24693
25004
|
}
|
|
24694
25005
|
),
|
|
@@ -24714,7 +25025,7 @@ var init_FilterGroup = __esm({
|
|
|
24714
25025
|
`${filter.field}_from`,
|
|
24715
25026
|
e.target.value || null
|
|
24716
25027
|
),
|
|
24717
|
-
placeholder: "
|
|
25028
|
+
placeholder: t("filterGroup.from"),
|
|
24718
25029
|
clearable: true,
|
|
24719
25030
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
24720
25031
|
className: "min-w-[130px]"
|
|
@@ -24730,7 +25041,7 @@ var init_FilterGroup = __esm({
|
|
|
24730
25041
|
`${filter.field}_to`,
|
|
24731
25042
|
e.target.value || null
|
|
24732
25043
|
),
|
|
24733
|
-
placeholder: "
|
|
25044
|
+
placeholder: t("filterGroup.to"),
|
|
24734
25045
|
clearable: true,
|
|
24735
25046
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
24736
25047
|
className: "min-w-[130px]"
|
|
@@ -24752,7 +25063,7 @@ var init_FilterGroup = __esm({
|
|
|
24752
25063
|
value: selectedValues[filter.field] || "all",
|
|
24753
25064
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24754
25065
|
options: [
|
|
24755
|
-
{ value: "all", label: "
|
|
25066
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24756
25067
|
...filter.options?.map((opt) => ({
|
|
24757
25068
|
value: opt,
|
|
24758
25069
|
label: opt
|
|
@@ -24763,10 +25074,7 @@ var init_FilterGroup = __esm({
|
|
|
24763
25074
|
)
|
|
24764
25075
|
] }, filter.field)),
|
|
24765
25076
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
24766
|
-
/* @__PURE__ */
|
|
24767
|
-
activeFilterCount,
|
|
24768
|
-
" active"
|
|
24769
|
-
] }),
|
|
25077
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
24770
25078
|
/* @__PURE__ */ jsx(
|
|
24771
25079
|
Button,
|
|
24772
25080
|
{
|
|
@@ -24774,7 +25082,7 @@ var init_FilterGroup = __esm({
|
|
|
24774
25082
|
size: "sm",
|
|
24775
25083
|
onClick: handleClearAll,
|
|
24776
25084
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24777
|
-
children: "
|
|
25085
|
+
children: t("filterGroup.clearAll")
|
|
24778
25086
|
}
|
|
24779
25087
|
)
|
|
24780
25088
|
] })
|
|
@@ -25003,7 +25311,7 @@ var init_RelationSelect = __esm({
|
|
|
25003
25311
|
value,
|
|
25004
25312
|
onChange,
|
|
25005
25313
|
options = [],
|
|
25006
|
-
placeholder
|
|
25314
|
+
placeholder,
|
|
25007
25315
|
required = false,
|
|
25008
25316
|
disabled = false,
|
|
25009
25317
|
isLoading = false,
|
|
@@ -25015,6 +25323,7 @@ var init_RelationSelect = __esm({
|
|
|
25015
25323
|
emptyMessage
|
|
25016
25324
|
}) => {
|
|
25017
25325
|
const { t } = useTranslate();
|
|
25326
|
+
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
25018
25327
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
25019
25328
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
25020
25329
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -25124,7 +25433,7 @@ var init_RelationSelect = __esm({
|
|
|
25124
25433
|
children: isLoading ? /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
25125
25434
|
/* @__PURE__ */ jsx(Spinner, { size: "sm" }),
|
|
25126
25435
|
/* @__PURE__ */ jsx(Typography, { as: "span", children: t("common.loading") })
|
|
25127
|
-
] }) : selectedOption ? selectedOption.label :
|
|
25436
|
+
] }) : selectedOption ? selectedOption.label : resolvedPlaceholder
|
|
25128
25437
|
}
|
|
25129
25438
|
),
|
|
25130
25439
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
@@ -25718,19 +26027,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25718
26027
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25719
26028
|
}
|
|
25720
26029
|
});
|
|
25721
|
-
var
|
|
26030
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
25722
26031
|
var init_ViolationAlert = __esm({
|
|
25723
26032
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25724
26033
|
init_cn();
|
|
26034
|
+
init_useTranslate();
|
|
25725
26035
|
init_Box();
|
|
25726
26036
|
init_Stack();
|
|
25727
26037
|
init_Typography();
|
|
25728
26038
|
init_Button();
|
|
25729
26039
|
init_Icon();
|
|
25730
|
-
|
|
25731
|
-
measure: "
|
|
25732
|
-
admin: "
|
|
25733
|
-
penalty: "
|
|
26040
|
+
actionTypeLabelKeys = {
|
|
26041
|
+
measure: "violationAlert.actionType.measure",
|
|
26042
|
+
admin: "violationAlert.actionType.admin",
|
|
26043
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25734
26044
|
};
|
|
25735
26045
|
actionTypeIcons = {
|
|
25736
26046
|
measure: "alert-triangle",
|
|
@@ -25747,10 +26057,11 @@ var init_ViolationAlert = __esm({
|
|
|
25747
26057
|
className,
|
|
25748
26058
|
...flatProps
|
|
25749
26059
|
}) => {
|
|
26060
|
+
const { t } = useTranslate();
|
|
25750
26061
|
const resolvedViolation = violation ?? {
|
|
25751
26062
|
law: "",
|
|
25752
26063
|
article: "",
|
|
25753
|
-
message: flatProps.message ?? "
|
|
26064
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25754
26065
|
actionType: "measure"
|
|
25755
26066
|
};
|
|
25756
26067
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25835,7 +26146,7 @@ var init_ViolationAlert = __esm({
|
|
|
25835
26146
|
{
|
|
25836
26147
|
variant: "caption",
|
|
25837
26148
|
className: cn(textColor, "opacity-75"),
|
|
25838
|
-
children:
|
|
26149
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25839
26150
|
}
|
|
25840
26151
|
)
|
|
25841
26152
|
] })
|
|
@@ -25866,7 +26177,7 @@ var init_ViolationAlert = __esm({
|
|
|
25866
26177
|
{
|
|
25867
26178
|
variant: "caption",
|
|
25868
26179
|
className: cn(textColor, "opacity-75"),
|
|
25869
|
-
children: "
|
|
26180
|
+
children: t("violationAlert.adminLabel")
|
|
25870
26181
|
}
|
|
25871
26182
|
),
|
|
25872
26183
|
/* @__PURE__ */ jsx(
|
|
@@ -25885,7 +26196,7 @@ var init_ViolationAlert = __esm({
|
|
|
25885
26196
|
{
|
|
25886
26197
|
variant: "caption",
|
|
25887
26198
|
className: cn(textColor, "opacity-75"),
|
|
25888
|
-
children: "
|
|
26199
|
+
children: t("violationAlert.penaltyLabel")
|
|
25889
26200
|
}
|
|
25890
26201
|
),
|
|
25891
26202
|
/* @__PURE__ */ jsx(
|
|
@@ -25910,7 +26221,7 @@ var init_ViolationAlert = __esm({
|
|
|
25910
26221
|
className: cn(textColor, "self-start"),
|
|
25911
26222
|
children: [
|
|
25912
26223
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25913
|
-
"
|
|
26224
|
+
t("violationAlert.goToField")
|
|
25914
26225
|
]
|
|
25915
26226
|
}
|
|
25916
26227
|
)
|
|
@@ -26226,6 +26537,7 @@ var init_LineChart = __esm({
|
|
|
26226
26537
|
"use client";
|
|
26227
26538
|
init_cn();
|
|
26228
26539
|
init_atoms2();
|
|
26540
|
+
init_useTranslate();
|
|
26229
26541
|
LineChart2 = ({
|
|
26230
26542
|
data,
|
|
26231
26543
|
width = 400,
|
|
@@ -26237,6 +26549,7 @@ var init_LineChart = __esm({
|
|
|
26237
26549
|
areaColor = "var(--color-primary)",
|
|
26238
26550
|
className
|
|
26239
26551
|
}) => {
|
|
26552
|
+
const { t } = useTranslate();
|
|
26240
26553
|
const gradientId = useId();
|
|
26241
26554
|
const safeData = data ?? [];
|
|
26242
26555
|
const sortedData = useMemo(() => {
|
|
@@ -26273,7 +26586,7 @@ var init_LineChart = __esm({
|
|
|
26273
26586
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
26274
26587
|
}, [linePath, points, height, showArea]);
|
|
26275
26588
|
if (safeData.length === 0) {
|
|
26276
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
26589
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
26277
26590
|
}
|
|
26278
26591
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
26279
26592
|
"svg",
|
|
@@ -28180,6 +28493,7 @@ var init_GraphView = __esm({
|
|
|
28180
28493
|
"use client";
|
|
28181
28494
|
init_cn();
|
|
28182
28495
|
init_atoms2();
|
|
28496
|
+
init_useTranslate();
|
|
28183
28497
|
GROUP_COLORS = [
|
|
28184
28498
|
"#3b82f6",
|
|
28185
28499
|
// blue-500
|
|
@@ -28212,6 +28526,7 @@ var init_GraphView = __esm({
|
|
|
28212
28526
|
showLabels = true,
|
|
28213
28527
|
zoomToFit = true
|
|
28214
28528
|
}) => {
|
|
28529
|
+
const { t } = useTranslate();
|
|
28215
28530
|
const containerRef = useRef(null);
|
|
28216
28531
|
const animRef = useRef(0);
|
|
28217
28532
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -28389,7 +28704,7 @@ var init_GraphView = __esm({
|
|
|
28389
28704
|
[onNodeClick]
|
|
28390
28705
|
);
|
|
28391
28706
|
if (nodes.length === 0) {
|
|
28392
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: "
|
|
28707
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
28393
28708
|
}
|
|
28394
28709
|
return /* @__PURE__ */ jsx(
|
|
28395
28710
|
Box,
|
|
@@ -28845,11 +29160,12 @@ var init_UploadDropZone = __esm({
|
|
|
28845
29160
|
init_Icon();
|
|
28846
29161
|
init_Typography();
|
|
28847
29162
|
init_useEventBus();
|
|
29163
|
+
init_useTranslate();
|
|
28848
29164
|
UploadDropZone = ({
|
|
28849
29165
|
accept,
|
|
28850
29166
|
maxSize,
|
|
28851
29167
|
maxFiles = 1,
|
|
28852
|
-
label
|
|
29168
|
+
label,
|
|
28853
29169
|
description,
|
|
28854
29170
|
disabled = false,
|
|
28855
29171
|
action,
|
|
@@ -28857,22 +29173,24 @@ var init_UploadDropZone = __esm({
|
|
|
28857
29173
|
onFiles,
|
|
28858
29174
|
className
|
|
28859
29175
|
}) => {
|
|
29176
|
+
const { t } = useTranslate();
|
|
29177
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28860
29178
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
28861
29179
|
const [error, setError] = useState(null);
|
|
28862
29180
|
const inputRef = useRef(null);
|
|
28863
29181
|
const eventBus = useSafeEventBus7();
|
|
28864
29182
|
const defaultDescription = [
|
|
28865
|
-
accept ?
|
|
28866
|
-
maxSize ?
|
|
28867
|
-
maxFiles > 1 ?
|
|
29183
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
29184
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
29185
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28868
29186
|
].filter(Boolean).join(". ");
|
|
28869
29187
|
const validateFiles = useCallback(
|
|
28870
29188
|
(files) => {
|
|
28871
29189
|
if (files.length > maxFiles) {
|
|
28872
|
-
return { valid: [], error:
|
|
29190
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28873
29191
|
}
|
|
28874
29192
|
if (accept) {
|
|
28875
|
-
const acceptedTypes = accept.split(",").map((
|
|
29193
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28876
29194
|
const invalid = files.filter((file) => {
|
|
28877
29195
|
return !acceptedTypes.some((type) => {
|
|
28878
29196
|
if (type.endsWith("/*")) {
|
|
@@ -28882,7 +29200,7 @@ var init_UploadDropZone = __esm({
|
|
|
28882
29200
|
});
|
|
28883
29201
|
});
|
|
28884
29202
|
if (invalid.length > 0) {
|
|
28885
|
-
return { valid: [], error:
|
|
29203
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28886
29204
|
}
|
|
28887
29205
|
}
|
|
28888
29206
|
if (maxSize) {
|
|
@@ -28890,13 +29208,13 @@ var init_UploadDropZone = __esm({
|
|
|
28890
29208
|
if (tooLarge.length > 0) {
|
|
28891
29209
|
return {
|
|
28892
29210
|
valid: [],
|
|
28893
|
-
error:
|
|
29211
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28894
29212
|
};
|
|
28895
29213
|
}
|
|
28896
29214
|
}
|
|
28897
29215
|
return { valid: files, error: null };
|
|
28898
29216
|
},
|
|
28899
|
-
[accept, maxSize, maxFiles]
|
|
29217
|
+
[accept, maxSize, maxFiles, t]
|
|
28900
29218
|
);
|
|
28901
29219
|
const handleFiles = useCallback(
|
|
28902
29220
|
(files) => {
|
|
@@ -28967,7 +29285,7 @@ var init_UploadDropZone = __esm({
|
|
|
28967
29285
|
handleClick();
|
|
28968
29286
|
}
|
|
28969
29287
|
},
|
|
28970
|
-
"aria-label":
|
|
29288
|
+
"aria-label": resolvedLabel,
|
|
28971
29289
|
children: [
|
|
28972
29290
|
/* @__PURE__ */ jsx(
|
|
28973
29291
|
"input",
|
|
@@ -28983,7 +29301,7 @@ var init_UploadDropZone = __esm({
|
|
|
28983
29301
|
}
|
|
28984
29302
|
),
|
|
28985
29303
|
error ? /* @__PURE__ */ jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
28986
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
29304
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
28987
29305
|
error ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
28988
29306
|
]
|
|
28989
29307
|
}
|
|
@@ -29405,7 +29723,7 @@ function TableView({
|
|
|
29405
29723
|
{
|
|
29406
29724
|
checked: selected.has(id),
|
|
29407
29725
|
onChange: () => toggleRow(id),
|
|
29408
|
-
"aria-label":
|
|
29726
|
+
"aria-label": t("table.selectRow", { id })
|
|
29409
29727
|
}
|
|
29410
29728
|
) }),
|
|
29411
29729
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -32114,7 +32432,7 @@ var init_QrScanner = __esm({
|
|
|
32114
32432
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
32115
32433
|
children: [
|
|
32116
32434
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
32117
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32435
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
32118
32436
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
32119
32437
|
]
|
|
32120
32438
|
}
|
|
@@ -32125,7 +32443,7 @@ var init_QrScanner = __esm({
|
|
|
32125
32443
|
position: "absolute",
|
|
32126
32444
|
display: "flex",
|
|
32127
32445
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
32128
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32446
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
32129
32447
|
}
|
|
32130
32448
|
),
|
|
32131
32449
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -32144,7 +32462,7 @@ var init_QrScanner = __esm({
|
|
|
32144
32462
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32145
32463
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32146
32464
|
),
|
|
32147
|
-
"aria-label": isPaused ? "
|
|
32465
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
32148
32466
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
32149
32467
|
}
|
|
32150
32468
|
),
|
|
@@ -32157,7 +32475,7 @@ var init_QrScanner = __esm({
|
|
|
32157
32475
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32158
32476
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32159
32477
|
),
|
|
32160
|
-
"aria-label":
|
|
32478
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
32161
32479
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
32162
32480
|
}
|
|
32163
32481
|
),
|
|
@@ -32171,7 +32489,7 @@ var init_QrScanner = __esm({
|
|
|
32171
32489
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32172
32490
|
),
|
|
32173
32491
|
"aria-label": t("aria.mockScanDev"),
|
|
32174
|
-
children: "
|
|
32492
|
+
children: t("qrScanner.mockScan")
|
|
32175
32493
|
}
|
|
32176
32494
|
)
|
|
32177
32495
|
]
|
|
@@ -32189,6 +32507,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32189
32507
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32190
32508
|
init_cn();
|
|
32191
32509
|
init_useEventBus();
|
|
32510
|
+
init_useTranslate();
|
|
32192
32511
|
init_Typography();
|
|
32193
32512
|
init_Box();
|
|
32194
32513
|
init_Label();
|
|
@@ -32198,36 +32517,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32198
32517
|
const sign = delta >= 0 ? "+" : "-";
|
|
32199
32518
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
32200
32519
|
};
|
|
32201
|
-
constraintHint = (constraint) => {
|
|
32520
|
+
constraintHint = (constraint, t) => {
|
|
32202
32521
|
if (constraint.type === "single") {
|
|
32203
|
-
return constraint.required ? "
|
|
32522
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
32204
32523
|
}
|
|
32205
32524
|
const { min, max } = constraint;
|
|
32206
32525
|
if (min && max) {
|
|
32207
|
-
return min === max ?
|
|
32526
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
32208
32527
|
}
|
|
32209
|
-
if (min) return
|
|
32210
|
-
if (max) return
|
|
32211
|
-
return "
|
|
32528
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32529
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32530
|
+
return t("optionConstraint.optional");
|
|
32212
32531
|
};
|
|
32213
|
-
validateSelection = (selected, constraint) => {
|
|
32532
|
+
validateSelection = (selected, constraint, t) => {
|
|
32214
32533
|
if (constraint.type === "single") {
|
|
32215
32534
|
if (constraint.required && selected.length === 0) {
|
|
32216
|
-
return "
|
|
32535
|
+
return t("optionConstraint.error.pickOne");
|
|
32217
32536
|
}
|
|
32218
32537
|
if (selected.length > 1) {
|
|
32219
|
-
return "
|
|
32538
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32220
32539
|
}
|
|
32221
32540
|
return void 0;
|
|
32222
32541
|
}
|
|
32223
32542
|
const { min, max } = constraint;
|
|
32224
32543
|
if (min !== void 0 && selected.length < min) {
|
|
32225
32544
|
const remaining = min - selected.length;
|
|
32226
|
-
return
|
|
32545
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32227
32546
|
}
|
|
32228
32547
|
if (max !== void 0 && selected.length > max) {
|
|
32229
32548
|
const excess = selected.length - max;
|
|
32230
|
-
return
|
|
32549
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32231
32550
|
}
|
|
32232
32551
|
return void 0;
|
|
32233
32552
|
};
|
|
@@ -32244,8 +32563,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32244
32563
|
className
|
|
32245
32564
|
}) => {
|
|
32246
32565
|
const eventBus = useEventBus();
|
|
32247
|
-
const
|
|
32248
|
-
const
|
|
32566
|
+
const { t } = useTranslate();
|
|
32567
|
+
const hint = constraintHint(constraint, t);
|
|
32568
|
+
const error = validateSelection(selected, constraint, t);
|
|
32249
32569
|
const inputName = `option-${groupId}`;
|
|
32250
32570
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32251
32571
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32345,7 +32665,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32345
32665
|
variant: "caption",
|
|
32346
32666
|
color: "warning",
|
|
32347
32667
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32348
|
-
children: "
|
|
32668
|
+
children: t("optionConstraint.outOfStock")
|
|
32349
32669
|
}
|
|
32350
32670
|
)
|
|
32351
32671
|
]
|
|
@@ -32667,6 +32987,7 @@ function changeBlockType(block, type) {
|
|
|
32667
32987
|
return { id: block.id, type, content: seed };
|
|
32668
32988
|
}
|
|
32669
32989
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32990
|
+
const { t } = useTranslate();
|
|
32670
32991
|
const [open, setOpen] = useState(false);
|
|
32671
32992
|
const ref = useRef(null);
|
|
32672
32993
|
useEffect(() => {
|
|
@@ -32686,7 +33007,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32686
33007
|
{
|
|
32687
33008
|
type: "button",
|
|
32688
33009
|
variant: "ghost",
|
|
32689
|
-
"aria-label": "
|
|
33010
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32690
33011
|
className: cn(
|
|
32691
33012
|
"inline-flex items-center justify-center",
|
|
32692
33013
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32708,7 +33029,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32708
33029
|
"py-1 text-sm"
|
|
32709
33030
|
),
|
|
32710
33031
|
children: [
|
|
32711
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
33032
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32712
33033
|
/* @__PURE__ */ jsxs(
|
|
32713
33034
|
Button,
|
|
32714
33035
|
{
|
|
@@ -32722,7 +33043,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32722
33043
|
},
|
|
32723
33044
|
children: [
|
|
32724
33045
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32725
|
-
"
|
|
33046
|
+
" ",
|
|
33047
|
+
t("richBlockEditor.duplicate")
|
|
32726
33048
|
]
|
|
32727
33049
|
}
|
|
32728
33050
|
),
|
|
@@ -32739,14 +33061,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32739
33061
|
},
|
|
32740
33062
|
children: [
|
|
32741
33063
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32742
|
-
"
|
|
33064
|
+
" ",
|
|
33065
|
+
t("common.delete")
|
|
32743
33066
|
]
|
|
32744
33067
|
}
|
|
32745
33068
|
),
|
|
32746
33069
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32747
33070
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
32748
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32749
|
-
CHANGEABLE_TYPES.filter((
|
|
33071
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
33072
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
32750
33073
|
Button,
|
|
32751
33074
|
{
|
|
32752
33075
|
type: "button",
|
|
@@ -32754,12 +33077,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32754
33077
|
role: "menuitem",
|
|
32755
33078
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32756
33079
|
onClick: () => {
|
|
32757
|
-
onChangeType(
|
|
33080
|
+
onChangeType(bt);
|
|
32758
33081
|
setOpen(false);
|
|
32759
33082
|
},
|
|
32760
|
-
children:
|
|
33083
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32761
33084
|
},
|
|
32762
|
-
|
|
33085
|
+
bt
|
|
32763
33086
|
))
|
|
32764
33087
|
] })
|
|
32765
33088
|
]
|
|
@@ -32821,6 +33144,7 @@ function BlockRow({
|
|
|
32821
33144
|
onInsertAfter,
|
|
32822
33145
|
onChangeType
|
|
32823
33146
|
}) {
|
|
33147
|
+
const { t } = useTranslate();
|
|
32824
33148
|
const setContent = useCallback(
|
|
32825
33149
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32826
33150
|
[onUpdate]
|
|
@@ -32870,8 +33194,8 @@ function BlockRow({
|
|
|
32870
33194
|
tag: "h1",
|
|
32871
33195
|
value: block.content ?? "",
|
|
32872
33196
|
readOnly,
|
|
32873
|
-
placeholder: placeholder ?? "
|
|
32874
|
-
ariaLabel: "
|
|
33197
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
33198
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32875
33199
|
className: "text-3xl font-bold leading-tight",
|
|
32876
33200
|
onValueChange: setContent
|
|
32877
33201
|
}
|
|
@@ -32883,8 +33207,8 @@ function BlockRow({
|
|
|
32883
33207
|
tag: "h2",
|
|
32884
33208
|
value: block.content ?? "",
|
|
32885
33209
|
readOnly,
|
|
32886
|
-
placeholder: placeholder ?? "
|
|
32887
|
-
ariaLabel: "
|
|
33210
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
33211
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32888
33212
|
className: "text-2xl font-semibold leading-tight",
|
|
32889
33213
|
onValueChange: setContent
|
|
32890
33214
|
}
|
|
@@ -32896,8 +33220,8 @@ function BlockRow({
|
|
|
32896
33220
|
tag: "h3",
|
|
32897
33221
|
value: block.content ?? "",
|
|
32898
33222
|
readOnly,
|
|
32899
|
-
placeholder: placeholder ?? "
|
|
32900
|
-
ariaLabel: "
|
|
33223
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33224
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32901
33225
|
className: "text-xl font-semibold leading-tight",
|
|
32902
33226
|
onValueChange: setContent
|
|
32903
33227
|
}
|
|
@@ -32909,8 +33233,8 @@ function BlockRow({
|
|
|
32909
33233
|
tag: "blockquote",
|
|
32910
33234
|
value: block.content ?? "",
|
|
32911
33235
|
readOnly,
|
|
32912
|
-
placeholder: placeholder ?? "
|
|
32913
|
-
ariaLabel: "
|
|
33236
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33237
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32914
33238
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32915
33239
|
onValueChange: setContent
|
|
32916
33240
|
}
|
|
@@ -32918,13 +33242,13 @@ function BlockRow({
|
|
|
32918
33242
|
case "code":
|
|
32919
33243
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32920
33244
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32921
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
33245
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32922
33246
|
!readOnly && /* @__PURE__ */ jsx(
|
|
32923
33247
|
Input,
|
|
32924
33248
|
{
|
|
32925
33249
|
inputType: "text",
|
|
32926
33250
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32927
|
-
"aria-label": "
|
|
33251
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32928
33252
|
className: cn(
|
|
32929
33253
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32930
33254
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32940,8 +33264,8 @@ function BlockRow({
|
|
|
32940
33264
|
tag: "pre",
|
|
32941
33265
|
value: block.content ?? "",
|
|
32942
33266
|
readOnly,
|
|
32943
|
-
placeholder: placeholder ?? "
|
|
32944
|
-
ariaLabel: "
|
|
33267
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33268
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32945
33269
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32946
33270
|
onValueChange: setContent
|
|
32947
33271
|
}
|
|
@@ -32954,7 +33278,7 @@ function BlockRow({
|
|
|
32954
33278
|
const caption = String(block.metadata?.caption ?? "");
|
|
32955
33279
|
const imgProps = {
|
|
32956
33280
|
src: url,
|
|
32957
|
-
alt: caption || "
|
|
33281
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32958
33282
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32959
33283
|
};
|
|
32960
33284
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -32968,7 +33292,8 @@ function BlockRow({
|
|
|
32968
33292
|
),
|
|
32969
33293
|
children: [
|
|
32970
33294
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32971
|
-
"
|
|
33295
|
+
" ",
|
|
33296
|
+
t("richBlockEditor.noImageUrl")
|
|
32972
33297
|
]
|
|
32973
33298
|
}
|
|
32974
33299
|
),
|
|
@@ -32979,7 +33304,7 @@ function BlockRow({
|
|
|
32979
33304
|
inputType: "url",
|
|
32980
33305
|
value: url,
|
|
32981
33306
|
placeholder: "https://example.com/image.png",
|
|
32982
|
-
"aria-label": "
|
|
33307
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32983
33308
|
className: cn(
|
|
32984
33309
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32985
33310
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32992,8 +33317,8 @@ function BlockRow({
|
|
|
32992
33317
|
{
|
|
32993
33318
|
inputType: "text",
|
|
32994
33319
|
value: caption,
|
|
32995
|
-
placeholder: "
|
|
32996
|
-
"aria-label": "
|
|
33320
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33321
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32997
33322
|
className: cn(
|
|
32998
33323
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32999
33324
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33024,8 +33349,8 @@ function BlockRow({
|
|
|
33024
33349
|
tag: "span",
|
|
33025
33350
|
value: child.content ?? "",
|
|
33026
33351
|
readOnly,
|
|
33027
|
-
placeholder: "
|
|
33028
|
-
ariaLabel: "
|
|
33352
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33353
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
33029
33354
|
className: "inline-block min-w-[1ch] flex-1",
|
|
33030
33355
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
33031
33356
|
}
|
|
@@ -33035,7 +33360,7 @@ function BlockRow({
|
|
|
33035
33360
|
{
|
|
33036
33361
|
type: "button",
|
|
33037
33362
|
variant: "ghost",
|
|
33038
|
-
"aria-label": "
|
|
33363
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
33039
33364
|
className: cn(
|
|
33040
33365
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
33041
33366
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -33057,7 +33382,8 @@ function BlockRow({
|
|
|
33057
33382
|
onClick: addListItem,
|
|
33058
33383
|
children: [
|
|
33059
33384
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
33060
|
-
"
|
|
33385
|
+
" ",
|
|
33386
|
+
t("richBlockEditor.addItem")
|
|
33061
33387
|
]
|
|
33062
33388
|
}
|
|
33063
33389
|
) })
|
|
@@ -33073,8 +33399,8 @@ function BlockRow({
|
|
|
33073
33399
|
tag: "p",
|
|
33074
33400
|
value: block.content ?? "",
|
|
33075
33401
|
readOnly,
|
|
33076
|
-
placeholder: placeholder ?? "
|
|
33077
|
-
ariaLabel: "
|
|
33402
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33403
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
33078
33404
|
className: "leading-7",
|
|
33079
33405
|
onValueChange: setContent
|
|
33080
33406
|
}
|
|
@@ -33097,7 +33423,7 @@ function BlockRow({
|
|
|
33097
33423
|
{
|
|
33098
33424
|
type: "button",
|
|
33099
33425
|
variant: "ghost",
|
|
33100
|
-
"aria-label": "
|
|
33426
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
33101
33427
|
className: cn(
|
|
33102
33428
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
33103
33429
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -33124,7 +33450,7 @@ function BlockRow({
|
|
|
33124
33450
|
}
|
|
33125
33451
|
);
|
|
33126
33452
|
}
|
|
33127
|
-
var TOOLBAR_ENTRIES,
|
|
33453
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
33128
33454
|
var init_RichBlockEditor = __esm({
|
|
33129
33455
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
33130
33456
|
"use client";
|
|
@@ -33137,29 +33463,30 @@ var init_RichBlockEditor = __esm({
|
|
|
33137
33463
|
init_Input();
|
|
33138
33464
|
init_Icon();
|
|
33139
33465
|
init_useEventBus();
|
|
33466
|
+
init_useTranslate();
|
|
33140
33467
|
TOOLBAR_ENTRIES = [
|
|
33141
|
-
{ type: "paragraph",
|
|
33142
|
-
{ type: "heading-1",
|
|
33143
|
-
{ type: "heading-2",
|
|
33144
|
-
{ type: "heading-3",
|
|
33145
|
-
{ type: "bullet-list",
|
|
33146
|
-
{ type: "numbered-list",
|
|
33147
|
-
{ type: "quote",
|
|
33148
|
-
{ type: "code",
|
|
33149
|
-
{ type: "divider",
|
|
33150
|
-
{ type: "image",
|
|
33468
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33469
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
33470
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
33471
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
33472
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
33473
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
33474
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
33475
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
33476
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
33477
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
33151
33478
|
];
|
|
33152
|
-
|
|
33153
|
-
paragraph: "
|
|
33154
|
-
"heading-1": "
|
|
33155
|
-
"heading-2": "
|
|
33156
|
-
"heading-3": "
|
|
33157
|
-
"bullet-list": "
|
|
33158
|
-
"numbered-list": "
|
|
33159
|
-
quote: "
|
|
33160
|
-
code: "
|
|
33161
|
-
divider: "
|
|
33162
|
-
image: "
|
|
33479
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33480
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33481
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33482
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33483
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33484
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33485
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33486
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33487
|
+
code: "richBlockEditor.blockType.code",
|
|
33488
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33489
|
+
image: "richBlockEditor.blockType.image"
|
|
33163
33490
|
};
|
|
33164
33491
|
CHANGEABLE_TYPES = [
|
|
33165
33492
|
"paragraph",
|
|
@@ -33193,6 +33520,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33193
33520
|
showToolbar = true,
|
|
33194
33521
|
className
|
|
33195
33522
|
}) => {
|
|
33523
|
+
const { t } = useTranslate();
|
|
33196
33524
|
const [blocks, setBlocks] = useState(
|
|
33197
33525
|
() => normalizeBlocks(initialBlocks)
|
|
33198
33526
|
);
|
|
@@ -33264,25 +33592,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33264
33592
|
Box,
|
|
33265
33593
|
{
|
|
33266
33594
|
role: "toolbar",
|
|
33267
|
-
"aria-label": "
|
|
33595
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33268
33596
|
className: cn(
|
|
33269
33597
|
"flex flex-wrap items-center gap-1",
|
|
33270
33598
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33271
33599
|
),
|
|
33272
33600
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33273
33601
|
const Icon3 = entry.icon;
|
|
33602
|
+
const entryLabel = t(entry.labelKey);
|
|
33274
33603
|
return /* @__PURE__ */ jsxs(
|
|
33275
33604
|
Button,
|
|
33276
33605
|
{
|
|
33277
33606
|
type: "button",
|
|
33278
33607
|
variant: "ghost",
|
|
33279
33608
|
size: "sm",
|
|
33280
|
-
"aria-label":
|
|
33281
|
-
title:
|
|
33609
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33610
|
+
title: entryLabel,
|
|
33282
33611
|
onClick: () => handleAppend(entry.type),
|
|
33283
33612
|
children: [
|
|
33284
33613
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33285
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33614
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33286
33615
|
]
|
|
33287
33616
|
},
|
|
33288
33617
|
entry.type
|
|
@@ -33325,6 +33654,7 @@ var init_ReplyTree = __esm({
|
|
|
33325
33654
|
"use client";
|
|
33326
33655
|
init_cn();
|
|
33327
33656
|
init_useEventBus();
|
|
33657
|
+
init_useTranslate();
|
|
33328
33658
|
init_atoms2();
|
|
33329
33659
|
init_VoteStack();
|
|
33330
33660
|
ReplyTreeNode = ({
|
|
@@ -33344,6 +33674,7 @@ var init_ReplyTree = __esm({
|
|
|
33344
33674
|
showActions
|
|
33345
33675
|
}) => {
|
|
33346
33676
|
const eventBus = useEventBus();
|
|
33677
|
+
const { t } = useTranslate();
|
|
33347
33678
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33348
33679
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33349
33680
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33390,7 +33721,7 @@ var init_ReplyTree = __esm({
|
|
|
33390
33721
|
variant: "ghost",
|
|
33391
33722
|
size: "sm",
|
|
33392
33723
|
onClick: handleToggle,
|
|
33393
|
-
"aria-label": isCollapsed ? "
|
|
33724
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33394
33725
|
"aria-expanded": !isCollapsed,
|
|
33395
33726
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33396
33727
|
className: cn(
|
|
@@ -33431,7 +33762,7 @@ var init_ReplyTree = __esm({
|
|
|
33431
33762
|
onVote: handleVote,
|
|
33432
33763
|
size: "sm",
|
|
33433
33764
|
variant: "horizontal",
|
|
33434
|
-
label:
|
|
33765
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33435
33766
|
}
|
|
33436
33767
|
),
|
|
33437
33768
|
/* @__PURE__ */ jsx(
|
|
@@ -33441,8 +33772,8 @@ var init_ReplyTree = __esm({
|
|
|
33441
33772
|
size: "sm",
|
|
33442
33773
|
leftIcon: "message-square",
|
|
33443
33774
|
onClick: handleReply,
|
|
33444
|
-
"aria-label":
|
|
33445
|
-
children: "
|
|
33775
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33776
|
+
children: t("replyTree.reply")
|
|
33446
33777
|
}
|
|
33447
33778
|
),
|
|
33448
33779
|
/* @__PURE__ */ jsx(
|
|
@@ -33452,8 +33783,8 @@ var init_ReplyTree = __esm({
|
|
|
33452
33783
|
size: "sm",
|
|
33453
33784
|
leftIcon: "flag",
|
|
33454
33785
|
onClick: handleFlag,
|
|
33455
|
-
"aria-label":
|
|
33456
|
-
children: "
|
|
33786
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33787
|
+
children: t("replyTree.flag")
|
|
33457
33788
|
}
|
|
33458
33789
|
)
|
|
33459
33790
|
] }),
|
|
@@ -33464,9 +33795,9 @@ var init_ReplyTree = __esm({
|
|
|
33464
33795
|
inputType: "textarea",
|
|
33465
33796
|
rows: 2,
|
|
33466
33797
|
value: draft,
|
|
33467
|
-
placeholder:
|
|
33798
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33468
33799
|
onChange: (e) => setDraft(e.target.value),
|
|
33469
|
-
"aria-label":
|
|
33800
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33470
33801
|
}
|
|
33471
33802
|
),
|
|
33472
33803
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33478,10 +33809,10 @@ var init_ReplyTree = __esm({
|
|
|
33478
33809
|
leftIcon: "send",
|
|
33479
33810
|
onClick: handleSubmitReply,
|
|
33480
33811
|
disabled: !draft.trim(),
|
|
33481
|
-
children: "
|
|
33812
|
+
children: t("replyTree.send")
|
|
33482
33813
|
}
|
|
33483
33814
|
),
|
|
33484
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33815
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33485
33816
|
] })
|
|
33486
33817
|
] }),
|
|
33487
33818
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33495,7 +33826,7 @@ var init_ReplyTree = __esm({
|
|
|
33495
33826
|
"self-start gap-1 px-0 h-auto",
|
|
33496
33827
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33497
33828
|
),
|
|
33498
|
-
children: "
|
|
33829
|
+
children: t("replyTree.continueThread")
|
|
33499
33830
|
}
|
|
33500
33831
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33501
33832
|
ReplyTreeNode,
|
|
@@ -33534,6 +33865,7 @@ var init_ReplyTree = __esm({
|
|
|
33534
33865
|
showActions = true,
|
|
33535
33866
|
className
|
|
33536
33867
|
}) => {
|
|
33868
|
+
const { t } = useTranslate();
|
|
33537
33869
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33538
33870
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33539
33871
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33552,7 +33884,7 @@ var init_ReplyTree = __esm({
|
|
|
33552
33884
|
});
|
|
33553
33885
|
}, []);
|
|
33554
33886
|
if (nodeList.length === 0) {
|
|
33555
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33887
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33556
33888
|
}
|
|
33557
33889
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33558
33890
|
ReplyTreeNode,
|
|
@@ -33630,6 +33962,7 @@ var init_VersionDiff = __esm({
|
|
|
33630
33962
|
"use client";
|
|
33631
33963
|
init_cn();
|
|
33632
33964
|
init_useEventBus();
|
|
33965
|
+
init_useTranslate();
|
|
33633
33966
|
init_atoms2();
|
|
33634
33967
|
init_Stack();
|
|
33635
33968
|
INLINE_STYLES = {
|
|
@@ -33652,6 +33985,7 @@ var init_VersionDiff = __esm({
|
|
|
33652
33985
|
language,
|
|
33653
33986
|
className
|
|
33654
33987
|
}) => {
|
|
33988
|
+
const { t } = useTranslate();
|
|
33655
33989
|
const eventBus = useEventBus();
|
|
33656
33990
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33657
33991
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33733,24 +34067,24 @@ var init_VersionDiff = __esm({
|
|
|
33733
34067
|
children: [
|
|
33734
34068
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33735
34069
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33736
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
34070
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33737
34071
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33738
34072
|
Select,
|
|
33739
34073
|
{
|
|
33740
34074
|
options,
|
|
33741
34075
|
value: activeBeforeId,
|
|
33742
34076
|
onChange: handleBeforeChange,
|
|
33743
|
-
"aria-label": "
|
|
34077
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33744
34078
|
}
|
|
33745
34079
|
) }),
|
|
33746
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
34080
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33747
34081
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33748
34082
|
Select,
|
|
33749
34083
|
{
|
|
33750
34084
|
options,
|
|
33751
34085
|
value: activeAfterId,
|
|
33752
34086
|
onChange: handleAfterChange,
|
|
33753
|
-
"aria-label": "
|
|
34087
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33754
34088
|
}
|
|
33755
34089
|
) }),
|
|
33756
34090
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -33771,7 +34105,7 @@ var init_VersionDiff = __esm({
|
|
|
33771
34105
|
size: "sm",
|
|
33772
34106
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33773
34107
|
onClick: handleViewToggle,
|
|
33774
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
34108
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33775
34109
|
}
|
|
33776
34110
|
),
|
|
33777
34111
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -33781,7 +34115,7 @@ var init_VersionDiff = __esm({
|
|
|
33781
34115
|
size: "sm",
|
|
33782
34116
|
icon: "rotate-ccw",
|
|
33783
34117
|
onClick: handleRevert,
|
|
33784
|
-
children: "
|
|
34118
|
+
children: t("versionDiff.revert")
|
|
33785
34119
|
}
|
|
33786
34120
|
)
|
|
33787
34121
|
] })
|
|
@@ -33798,12 +34132,12 @@ var init_VersionDiff = __esm({
|
|
|
33798
34132
|
children: [
|
|
33799
34133
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33800
34134
|
beforeRev?.label,
|
|
33801
|
-
beforeRev?.author ?
|
|
34135
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33802
34136
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33803
34137
|
] }),
|
|
33804
34138
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33805
34139
|
afterRev?.label,
|
|
33806
|
-
afterRev?.author ?
|
|
34140
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33807
34141
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33808
34142
|
] })
|
|
33809
34143
|
]
|
|
@@ -34196,10 +34530,12 @@ var init_DocPagination = __esm({
|
|
|
34196
34530
|
}
|
|
34197
34531
|
});
|
|
34198
34532
|
function DocSearch({
|
|
34199
|
-
placeholder
|
|
34533
|
+
placeholder,
|
|
34200
34534
|
onSearch,
|
|
34201
34535
|
className
|
|
34202
34536
|
}) {
|
|
34537
|
+
const { t } = useTranslate();
|
|
34538
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34203
34539
|
const [query, setQuery] = useState("");
|
|
34204
34540
|
const [results, setResults] = useState([]);
|
|
34205
34541
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34306,7 +34642,7 @@ function DocSearch({
|
|
|
34306
34642
|
Input,
|
|
34307
34643
|
{
|
|
34308
34644
|
inputType: "search",
|
|
34309
|
-
placeholder,
|
|
34645
|
+
placeholder: resolvedPlaceholder,
|
|
34310
34646
|
value: query,
|
|
34311
34647
|
onChange: handleChange,
|
|
34312
34648
|
onFocus: handleFocus,
|
|
@@ -34371,6 +34707,7 @@ var init_DocSearch = __esm({
|
|
|
34371
34707
|
init_Typography();
|
|
34372
34708
|
init_Icon();
|
|
34373
34709
|
init_Input();
|
|
34710
|
+
init_useTranslate();
|
|
34374
34711
|
}
|
|
34375
34712
|
});
|
|
34376
34713
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36375,8 +36712,8 @@ var init_SignaturePad = __esm({
|
|
|
36375
36712
|
init_useEventBus();
|
|
36376
36713
|
init_useTranslate();
|
|
36377
36714
|
SignaturePad = ({
|
|
36378
|
-
label
|
|
36379
|
-
helperText
|
|
36715
|
+
label,
|
|
36716
|
+
helperText,
|
|
36380
36717
|
strokeColor,
|
|
36381
36718
|
strokeWidth = 2,
|
|
36382
36719
|
height = 200,
|
|
@@ -36392,6 +36729,8 @@ var init_SignaturePad = __esm({
|
|
|
36392
36729
|
}) => {
|
|
36393
36730
|
const eventBus = useEventBus();
|
|
36394
36731
|
const { t } = useTranslate();
|
|
36732
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36733
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36395
36734
|
const canvasRef = useRef(null);
|
|
36396
36735
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36397
36736
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36494,7 +36833,7 @@ var init_SignaturePad = __esm({
|
|
|
36494
36833
|
);
|
|
36495
36834
|
}
|
|
36496
36835
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36497
|
-
|
|
36836
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36498
36837
|
/* @__PURE__ */ jsx(
|
|
36499
36838
|
Box,
|
|
36500
36839
|
{
|
|
@@ -36523,7 +36862,7 @@ var init_SignaturePad = __esm({
|
|
|
36523
36862
|
)
|
|
36524
36863
|
}
|
|
36525
36864
|
),
|
|
36526
|
-
|
|
36865
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36527
36866
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36528
36867
|
/* @__PURE__ */ jsx(
|
|
36529
36868
|
Button,
|
|
@@ -36533,7 +36872,7 @@ var init_SignaturePad = __esm({
|
|
|
36533
36872
|
icon: Eraser,
|
|
36534
36873
|
onClick: clearSignature,
|
|
36535
36874
|
disabled: !hasSignature,
|
|
36536
|
-
children: "
|
|
36875
|
+
children: t("signaturePad.clear")
|
|
36537
36876
|
}
|
|
36538
36877
|
),
|
|
36539
36878
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36544,7 +36883,7 @@ var init_SignaturePad = __esm({
|
|
|
36544
36883
|
icon: Check,
|
|
36545
36884
|
onClick: confirmSignature,
|
|
36546
36885
|
disabled: !hasSignature,
|
|
36547
|
-
children: "
|
|
36886
|
+
children: t("signaturePad.confirm")
|
|
36548
36887
|
}
|
|
36549
36888
|
)
|
|
36550
36889
|
] })
|
|
@@ -40989,6 +41328,7 @@ function MasterDetail({
|
|
|
40989
41328
|
className,
|
|
40990
41329
|
...rest
|
|
40991
41330
|
}) {
|
|
41331
|
+
const { t } = useTranslate();
|
|
40992
41332
|
const loading = externalLoading ?? false;
|
|
40993
41333
|
const isLoading = externalIsLoading ?? false;
|
|
40994
41334
|
const error = externalError ?? null;
|
|
@@ -41001,8 +41341,8 @@ function MasterDetail({
|
|
|
41001
41341
|
isLoading: loading || isLoading,
|
|
41002
41342
|
error,
|
|
41003
41343
|
className,
|
|
41004
|
-
emptyTitle: "
|
|
41005
|
-
emptyDescription: "
|
|
41344
|
+
emptyTitle: t("table.empty.title"),
|
|
41345
|
+
emptyDescription: t("empty.createFirst"),
|
|
41006
41346
|
...rest
|
|
41007
41347
|
}
|
|
41008
41348
|
);
|
|
@@ -41011,6 +41351,7 @@ var init_MasterDetail = __esm({
|
|
|
41011
41351
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41012
41352
|
"use client";
|
|
41013
41353
|
init_DataTable();
|
|
41354
|
+
init_useTranslate();
|
|
41014
41355
|
MasterDetail.displayName = "MasterDetail";
|
|
41015
41356
|
}
|
|
41016
41357
|
});
|
|
@@ -41019,14 +41360,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41019
41360
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41020
41361
|
init_cn();
|
|
41021
41362
|
init_Typography();
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
{
|
|
41025
|
-
|
|
41026
|
-
|
|
41027
|
-
|
|
41028
|
-
|
|
41029
|
-
|
|
41363
|
+
init_useTranslate();
|
|
41364
|
+
DefaultEmptyDetail = () => {
|
|
41365
|
+
const { t } = useTranslate();
|
|
41366
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
41367
|
+
Typography,
|
|
41368
|
+
{
|
|
41369
|
+
variant: "body2",
|
|
41370
|
+
className: "text-muted-foreground",
|
|
41371
|
+
children: t("masterDetail.selectItem")
|
|
41372
|
+
}
|
|
41373
|
+
) });
|
|
41374
|
+
};
|
|
41030
41375
|
MasterDetailLayout = ({
|
|
41031
41376
|
master,
|
|
41032
41377
|
detail,
|
|
@@ -41153,7 +41498,7 @@ var init_MediaGallery = __esm({
|
|
|
41153
41498
|
{
|
|
41154
41499
|
icon: Image$1,
|
|
41155
41500
|
title: t("display.noMedia"),
|
|
41156
|
-
description: "
|
|
41501
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41157
41502
|
className
|
|
41158
41503
|
}
|
|
41159
41504
|
);
|
|
@@ -41170,7 +41515,7 @@ var init_MediaGallery = __esm({
|
|
|
41170
41515
|
size: "sm",
|
|
41171
41516
|
icon: Upload,
|
|
41172
41517
|
action: "MEDIA_UPLOAD",
|
|
41173
|
-
children: "
|
|
41518
|
+
children: t("mediaGallery.upload")
|
|
41174
41519
|
}
|
|
41175
41520
|
),
|
|
41176
41521
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41184,10 +41529,7 @@ var init_MediaGallery = __esm({
|
|
|
41184
41529
|
))
|
|
41185
41530
|
] })
|
|
41186
41531
|
] }),
|
|
41187
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41188
|
-
selectedItems.length,
|
|
41189
|
-
" selected"
|
|
41190
|
-
] }) }),
|
|
41532
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsx(Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
41191
41533
|
/* @__PURE__ */ jsx(
|
|
41192
41534
|
Box,
|
|
41193
41535
|
{
|
|
@@ -42061,7 +42403,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42061
42403
|
EmptyState,
|
|
42062
42404
|
{
|
|
42063
42405
|
title: t("debug.noActiveTraits"),
|
|
42064
|
-
description: "
|
|
42406
|
+
description: t("debug.traitsMountHint"),
|
|
42065
42407
|
className: "py-8"
|
|
42066
42408
|
}
|
|
42067
42409
|
);
|
|
@@ -42071,14 +42413,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42071
42413
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42072
42414
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42073
42415
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42074
|
-
/* @__PURE__ */
|
|
42075
|
-
trait.transitionCount,
|
|
42076
|
-
" transitions"
|
|
42077
|
-
] })
|
|
42416
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42078
42417
|
] }),
|
|
42079
42418
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42080
42419
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42081
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42420
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42082
42421
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42083
42422
|
Badge,
|
|
42084
42423
|
{
|
|
@@ -42090,7 +42429,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42090
42429
|
)) })
|
|
42091
42430
|
] }),
|
|
42092
42431
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42093
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42432
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42094
42433
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42095
42434
|
t2.from,
|
|
42096
42435
|
" \u2192 ",
|
|
@@ -42109,7 +42448,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42109
42448
|
] }, i)) })
|
|
42110
42449
|
] }),
|
|
42111
42450
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42112
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42451
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42113
42452
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42114
42453
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42115
42454
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42215,7 +42554,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42215
42554
|
EmptyState,
|
|
42216
42555
|
{
|
|
42217
42556
|
title: t("debug.noEntityData"),
|
|
42218
|
-
description: "
|
|
42557
|
+
description: t("debug.debugModeHint"),
|
|
42219
42558
|
className: "py-8"
|
|
42220
42559
|
}
|
|
42221
42560
|
);
|
|
@@ -42228,7 +42567,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42228
42567
|
EmptyState,
|
|
42229
42568
|
{
|
|
42230
42569
|
title: t("debug.noEntities"),
|
|
42231
|
-
description: "
|
|
42570
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42232
42571
|
className: "py-8"
|
|
42233
42572
|
}
|
|
42234
42573
|
);
|
|
@@ -42236,7 +42575,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42236
42575
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42237
42576
|
id: `singleton-${name}`,
|
|
42238
42577
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42239
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42578
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42240
42579
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42241
42580
|
] }),
|
|
42242
42581
|
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
@@ -42254,31 +42593,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42254
42593
|
}));
|
|
42255
42594
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42256
42595
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42257
|
-
/* @__PURE__ */
|
|
42258
|
-
"Singletons (",
|
|
42259
|
-
singletonItems.length,
|
|
42260
|
-
")"
|
|
42261
|
-
] }),
|
|
42596
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42262
42597
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42263
42598
|
] }),
|
|
42264
42599
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42265
|
-
/* @__PURE__ */
|
|
42266
|
-
"Runtime (",
|
|
42267
|
-
runtimeEntities.length,
|
|
42268
|
-
")"
|
|
42269
|
-
] }),
|
|
42600
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42270
42601
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42271
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42272
|
-
"+",
|
|
42273
|
-
runtimeEntities.length - 20,
|
|
42274
|
-
" more entities"
|
|
42275
|
-
] })
|
|
42602
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42276
42603
|
] }),
|
|
42277
42604
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42278
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42605
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42279
42606
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42280
42607
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42281
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42608
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42282
42609
|
] }, type)) })
|
|
42283
42610
|
] })
|
|
42284
42611
|
] });
|
|
@@ -42322,7 +42649,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42322
42649
|
EmptyState,
|
|
42323
42650
|
{
|
|
42324
42651
|
title: t("debug.noEventsYet"),
|
|
42325
|
-
description: "
|
|
42652
|
+
description: t("debug.eventsExecuteHint"),
|
|
42326
42653
|
className: "py-8"
|
|
42327
42654
|
}
|
|
42328
42655
|
);
|
|
@@ -42333,17 +42660,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42333
42660
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42334
42661
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42335
42662
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42336
|
-
/* @__PURE__ */
|
|
42663
|
+
/* @__PURE__ */ jsx(
|
|
42337
42664
|
Button,
|
|
42338
42665
|
{
|
|
42339
42666
|
size: "sm",
|
|
42340
42667
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42341
42668
|
onClick: () => setFilter("all"),
|
|
42342
|
-
children:
|
|
42343
|
-
"All (",
|
|
42344
|
-
events2.length,
|
|
42345
|
-
")"
|
|
42346
|
-
]
|
|
42669
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42347
42670
|
}
|
|
42348
42671
|
),
|
|
42349
42672
|
eventTypes.map((type) => {
|
|
@@ -42373,7 +42696,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42373
42696
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42374
42697
|
}
|
|
42375
42698
|
),
|
|
42376
|
-
"
|
|
42699
|
+
t("debug.autoScroll")
|
|
42377
42700
|
] })
|
|
42378
42701
|
] }),
|
|
42379
42702
|
/* @__PURE__ */ jsx(
|
|
@@ -42431,7 +42754,7 @@ function GuardsPanel({ guards }) {
|
|
|
42431
42754
|
EmptyState,
|
|
42432
42755
|
{
|
|
42433
42756
|
title: t("debug.noGuardEvaluations"),
|
|
42434
|
-
description: "
|
|
42757
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42435
42758
|
className: "py-8"
|
|
42436
42759
|
}
|
|
42437
42760
|
);
|
|
@@ -42462,15 +42785,15 @@ function GuardsPanel({ guards }) {
|
|
|
42462
42785
|
] }),
|
|
42463
42786
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42464
42787
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42465
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42788
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42466
42789
|
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
|
|
42467
42790
|
] }),
|
|
42468
42791
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42469
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42792
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42470
42793
|
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
42471
42794
|
] }),
|
|
42472
42795
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42473
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42796
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42474
42797
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42475
42798
|
] })
|
|
42476
42799
|
] })
|
|
@@ -42488,9 +42811,9 @@ function GuardsPanel({ guards }) {
|
|
|
42488
42811
|
] })
|
|
42489
42812
|
] }),
|
|
42490
42813
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42491
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42492
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42493
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
42814
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
42815
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
42816
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42494
42817
|
] })
|
|
42495
42818
|
] }),
|
|
42496
42819
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -42616,7 +42939,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42616
42939
|
EmptyState,
|
|
42617
42940
|
{
|
|
42618
42941
|
title: t("debug.noTransitionsRecorded"),
|
|
42619
|
-
description: "
|
|
42942
|
+
description: t("debug.transitionsProcessHint"),
|
|
42620
42943
|
className: "py-8"
|
|
42621
42944
|
}
|
|
42622
42945
|
);
|
|
@@ -42633,10 +42956,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42633
42956
|
const sorted = [...transitions].reverse();
|
|
42634
42957
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42635
42958
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42636
|
-
/* @__PURE__ */
|
|
42637
|
-
transitions.length,
|
|
42638
|
-
" transitions recorded"
|
|
42639
|
-
] }),
|
|
42959
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42640
42960
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42641
42961
|
/* @__PURE__ */ jsx(
|
|
42642
42962
|
Checkbox,
|
|
@@ -42645,7 +42965,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42645
42965
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42646
42966
|
}
|
|
42647
42967
|
),
|
|
42648
|
-
"
|
|
42968
|
+
t("debug.autoScroll")
|
|
42649
42969
|
] })
|
|
42650
42970
|
] }),
|
|
42651
42971
|
/* @__PURE__ */ jsx(
|
|
@@ -42688,15 +43008,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42688
43008
|
variant: trace.guardResult ? "success" : "danger",
|
|
42689
43009
|
size: "sm",
|
|
42690
43010
|
children: [
|
|
42691
|
-
"
|
|
43011
|
+
t("debug.guardLabel"),
|
|
43012
|
+
" ",
|
|
42692
43013
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42693
43014
|
]
|
|
42694
43015
|
}
|
|
42695
43016
|
),
|
|
42696
|
-
/* @__PURE__ */
|
|
42697
|
-
trace.effects.length,
|
|
42698
|
-
" effects"
|
|
42699
|
-
] })
|
|
43017
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42700
43018
|
] }),
|
|
42701
43019
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
42702
43020
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -42745,13 +43063,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42745
43063
|
EmptyState,
|
|
42746
43064
|
{
|
|
42747
43065
|
title: t("debug.noBridgeData"),
|
|
42748
|
-
description: "
|
|
43066
|
+
description: t("debug.bridgeInitHint"),
|
|
42749
43067
|
className: "py-8"
|
|
42750
43068
|
}
|
|
42751
43069
|
);
|
|
42752
43070
|
}
|
|
42753
43071
|
const formatTime4 = (ts) => {
|
|
42754
|
-
if (ts === 0) return "
|
|
43072
|
+
if (ts === 0) return t("debug.never");
|
|
42755
43073
|
const d = new Date(ts);
|
|
42756
43074
|
return d.toLocaleTimeString("en-US", {
|
|
42757
43075
|
hour12: false,
|
|
@@ -42764,14 +43082,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42764
43082
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42765
43083
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42766
43084
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
42767
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43085
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42768
43086
|
] }),
|
|
42769
43087
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
42770
43088
|
/* @__PURE__ */ jsx(
|
|
42771
43089
|
StatRow,
|
|
42772
43090
|
{
|
|
42773
43091
|
label: t("debug.status"),
|
|
42774
|
-
value: bridge.connected ? "
|
|
43092
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
42775
43093
|
variant: bridge.connected ? "success" : "danger"
|
|
42776
43094
|
}
|
|
42777
43095
|
),
|
|
@@ -42799,13 +43117,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42799
43117
|
] })
|
|
42800
43118
|
] }),
|
|
42801
43119
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
42802
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43120
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
42803
43121
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
42804
43122
|
] }),
|
|
42805
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
42806
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
42807
|
-
" total events processed"
|
|
42808
|
-
] }) })
|
|
43123
|
+
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
42809
43124
|
] }) });
|
|
42810
43125
|
}
|
|
42811
43126
|
var init_ServerBridgeTab = __esm({
|
|
@@ -42915,7 +43230,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42915
43230
|
EmptyState,
|
|
42916
43231
|
{
|
|
42917
43232
|
title: t("debug.noActiveTraits"),
|
|
42918
|
-
description: "
|
|
43233
|
+
description: t("debug.traitsInitHint"),
|
|
42919
43234
|
className: "py-8"
|
|
42920
43235
|
}
|
|
42921
43236
|
);
|
|
@@ -42932,7 +43247,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42932
43247
|
};
|
|
42933
43248
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
42934
43249
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42935
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43250
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
42936
43251
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
42937
43252
|
trait.name,
|
|
42938
43253
|
": ",
|
|
@@ -42940,8 +43255,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42940
43255
|
] }, trait.id)) })
|
|
42941
43256
|
] }),
|
|
42942
43257
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42943
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
42944
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43258
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43259
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42945
43260
|
/* @__PURE__ */ jsx(
|
|
42946
43261
|
Button,
|
|
42947
43262
|
{
|
|
@@ -42953,15 +43268,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
42953
43268
|
}
|
|
42954
43269
|
),
|
|
42955
43270
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
42956
|
-
transitions.some((
|
|
43271
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
42957
43272
|
] }, event)) })
|
|
42958
43273
|
] }),
|
|
42959
43274
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
42960
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43275
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
42961
43276
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
42962
43277
|
] }),
|
|
42963
43278
|
log12.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42964
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43279
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
42965
43280
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
42966
43281
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
42967
43282
|
" ",
|
|
@@ -42992,21 +43307,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
42992
43307
|
}
|
|
42993
43308
|
});
|
|
42994
43309
|
function ServerResponseRow({ sr }) {
|
|
43310
|
+
const { t } = useTranslate();
|
|
42995
43311
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
42996
43312
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
42997
43313
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42998
43314
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
42999
43315
|
sr.success ? "\u2713" : "\u2717",
|
|
43000
|
-
"
|
|
43316
|
+
" ",
|
|
43317
|
+
t("debug.server")
|
|
43001
43318
|
] }),
|
|
43002
43319
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43003
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
43004
|
-
sr.clientEffects,
|
|
43005
|
-
" clientEffect",
|
|
43006
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43007
|
-
] }),
|
|
43320
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
43008
43321
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43009
|
-
"
|
|
43322
|
+
t("debug.emitLabel"),
|
|
43323
|
+
" ",
|
|
43010
43324
|
sr.emittedEvents.join(", ")
|
|
43011
43325
|
] }),
|
|
43012
43326
|
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -43014,13 +43328,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43014
43328
|
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
43015
43329
|
name,
|
|
43016
43330
|
": ",
|
|
43017
|
-
count
|
|
43018
|
-
" row",
|
|
43019
|
-
count !== 1 ? "s" : ""
|
|
43331
|
+
t("debug.rowsCount", { count })
|
|
43020
43332
|
] }, name)) })
|
|
43021
43333
|
] });
|
|
43022
43334
|
}
|
|
43023
43335
|
function TransitionRow({ trace }) {
|
|
43336
|
+
const { t } = useTranslate();
|
|
43024
43337
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43025
43338
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43026
43339
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43028,7 +43341,7 @@ function TransitionRow({ trace }) {
|
|
|
43028
43341
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43029
43342
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43030
43343
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43031
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43344
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43032
43345
|
] }),
|
|
43033
43346
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43034
43347
|
] });
|
|
@@ -43069,6 +43382,7 @@ function VerifyModePanel({
|
|
|
43069
43382
|
serverCount,
|
|
43070
43383
|
localCount
|
|
43071
43384
|
}) {
|
|
43385
|
+
const { t } = useTranslate();
|
|
43072
43386
|
const [expanded, setExpanded] = React84.useState(true);
|
|
43073
43387
|
const scrollRef = React84.useRef(null);
|
|
43074
43388
|
const prevCountRef = React84.useRef(0);
|
|
@@ -43099,30 +43413,20 @@ function VerifyModePanel({
|
|
|
43099
43413
|
onClick: () => setExpanded((v) => !v),
|
|
43100
43414
|
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",
|
|
43101
43415
|
"aria-expanded": expanded,
|
|
43102
|
-
"aria-label": expanded ? "
|
|
43416
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43103
43417
|
"data-testid": "debugger-verify-toggle",
|
|
43104
43418
|
children: [
|
|
43105
43419
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43106
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43107
|
-
/* @__PURE__ */
|
|
43108
|
-
|
|
43109
|
-
" local"
|
|
43110
|
-
] }),
|
|
43111
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43112
|
-
serverCount,
|
|
43113
|
-
" server"
|
|
43114
|
-
] }),
|
|
43420
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43421
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43422
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43115
43423
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43116
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43117
|
-
transitions.length,
|
|
43118
|
-
" transition",
|
|
43119
|
-
transitions.length !== 1 ? "s" : ""
|
|
43120
|
-
] })
|
|
43424
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43121
43425
|
]
|
|
43122
43426
|
}
|
|
43123
43427
|
),
|
|
43124
43428
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43125
|
-
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
43429
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
43126
43430
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43127
43431
|
] })
|
|
43128
43432
|
]
|
|
@@ -43138,6 +43442,7 @@ function RuntimeDebugger({
|
|
|
43138
43442
|
defaultTab,
|
|
43139
43443
|
schema
|
|
43140
43444
|
}) {
|
|
43445
|
+
const { t } = useTranslate();
|
|
43141
43446
|
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43142
43447
|
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43143
43448
|
const debugData = useDebugData();
|
|
@@ -43176,55 +43481,55 @@ function RuntimeDebugger({
|
|
|
43176
43481
|
const tabItems = [
|
|
43177
43482
|
{
|
|
43178
43483
|
id: "dispatch",
|
|
43179
|
-
label: "
|
|
43484
|
+
label: t("debug.tabDispatch"),
|
|
43180
43485
|
badge: debugData.traits.length || void 0,
|
|
43181
43486
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43182
43487
|
},
|
|
43183
43488
|
{
|
|
43184
43489
|
id: "verify",
|
|
43185
|
-
label: failedChecks > 0 ? "
|
|
43490
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43186
43491
|
badge: verification.summary.totalChecks || void 0,
|
|
43187
43492
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43188
43493
|
},
|
|
43189
43494
|
{
|
|
43190
43495
|
id: "timeline",
|
|
43191
|
-
label: "
|
|
43496
|
+
label: t("debug.tabTimeline"),
|
|
43192
43497
|
badge: verification.transitions.length || void 0,
|
|
43193
43498
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43194
43499
|
},
|
|
43195
43500
|
{
|
|
43196
43501
|
id: "bridge",
|
|
43197
|
-
label: "
|
|
43502
|
+
label: t("debug.tabBridge"),
|
|
43198
43503
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43199
43504
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43200
43505
|
},
|
|
43201
43506
|
{
|
|
43202
43507
|
id: "traits",
|
|
43203
|
-
label: "
|
|
43508
|
+
label: t("debug.tabTraits"),
|
|
43204
43509
|
badge: debugData.traits.length || void 0,
|
|
43205
43510
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43206
43511
|
},
|
|
43207
43512
|
{
|
|
43208
43513
|
id: "ticks",
|
|
43209
|
-
label: "
|
|
43210
|
-
badge: debugData.ticks.filter((
|
|
43514
|
+
label: t("debug.tabTicks"),
|
|
43515
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43211
43516
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43212
43517
|
},
|
|
43213
43518
|
{
|
|
43214
43519
|
id: "entities",
|
|
43215
|
-
label: "
|
|
43520
|
+
label: t("debug.tabEntities"),
|
|
43216
43521
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43217
43522
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43218
43523
|
},
|
|
43219
43524
|
{
|
|
43220
43525
|
id: "events",
|
|
43221
|
-
label: "
|
|
43526
|
+
label: t("debug.tabEvents"),
|
|
43222
43527
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43223
43528
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43224
43529
|
},
|
|
43225
43530
|
{
|
|
43226
43531
|
id: "guards",
|
|
43227
|
-
label: "
|
|
43532
|
+
label: t("debug.tabGuards"),
|
|
43228
43533
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43229
43534
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43230
43535
|
}
|
|
@@ -43252,15 +43557,10 @@ function RuntimeDebugger({
|
|
|
43252
43557
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43253
43558
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43254
43559
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43255
|
-
"
|
|
43560
|
+
" ",
|
|
43561
|
+
t("debug.debugger")
|
|
43256
43562
|
] }),
|
|
43257
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43258
|
-
failedChecks,
|
|
43259
|
-
" failed"
|
|
43260
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43261
|
-
debugData.traits.length,
|
|
43262
|
-
" traits"
|
|
43263
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43563
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
43264
43564
|
] })
|
|
43265
43565
|
}
|
|
43266
43566
|
),
|
|
@@ -43278,9 +43578,9 @@ function RuntimeDebugger({
|
|
|
43278
43578
|
);
|
|
43279
43579
|
}
|
|
43280
43580
|
if (mode === "verify") {
|
|
43281
|
-
const traitStates = debugData.traits.map((
|
|
43282
|
-
const serverEntries = verification.transitions.filter((
|
|
43283
|
-
const localEntries = verification.transitions.filter((
|
|
43581
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43582
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43583
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43284
43584
|
return /* @__PURE__ */ jsx(
|
|
43285
43585
|
VerifyModePanel,
|
|
43286
43586
|
{
|
|
@@ -43312,7 +43612,7 @@ function RuntimeDebugger({
|
|
|
43312
43612
|
variant: "secondary",
|
|
43313
43613
|
size: "sm",
|
|
43314
43614
|
className: "runtime-debugger__toggle",
|
|
43315
|
-
title: "
|
|
43615
|
+
title: t("debug.openDebugger"),
|
|
43316
43616
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43317
43617
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43318
43618
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43322,11 +43622,8 @@ function RuntimeDebugger({
|
|
|
43322
43622
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43323
43623
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43324
43624
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43325
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43326
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43327
|
-
failedChecks,
|
|
43328
|
-
" failed"
|
|
43329
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43625
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43626
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
43330
43627
|
] }),
|
|
43331
43628
|
/* @__PURE__ */ jsx(
|
|
43332
43629
|
Button,
|
|
@@ -43334,7 +43631,7 @@ function RuntimeDebugger({
|
|
|
43334
43631
|
onClick: () => setIsCollapsed(true),
|
|
43335
43632
|
variant: "ghost",
|
|
43336
43633
|
size: "sm",
|
|
43337
|
-
title: "
|
|
43634
|
+
title: t("debug.close"),
|
|
43338
43635
|
children: "x"
|
|
43339
43636
|
}
|
|
43340
43637
|
)
|
|
@@ -43348,7 +43645,7 @@ function RuntimeDebugger({
|
|
|
43348
43645
|
className: "runtime-debugger__tabs"
|
|
43349
43646
|
}
|
|
43350
43647
|
) }),
|
|
43351
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43648
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43352
43649
|
] })
|
|
43353
43650
|
}
|
|
43354
43651
|
);
|
|
@@ -43374,6 +43671,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43374
43671
|
init_TransitionTimeline();
|
|
43375
43672
|
init_ServerBridgeTab();
|
|
43376
43673
|
init_EventDispatcherTab();
|
|
43674
|
+
init_useTranslate();
|
|
43377
43675
|
init_RuntimeDebugger();
|
|
43378
43676
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43379
43677
|
}
|
|
@@ -44662,7 +44960,7 @@ var init_StatCard = __esm({
|
|
|
44662
44960
|
}
|
|
44663
44961
|
);
|
|
44664
44962
|
}
|
|
44665
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
44963
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
44666
44964
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
44667
44965
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
44668
44966
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -44705,7 +45003,7 @@ var init_StatCard = __esm({
|
|
|
44705
45003
|
]
|
|
44706
45004
|
}
|
|
44707
45005
|
),
|
|
44708
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45006
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
44709
45007
|
] }),
|
|
44710
45008
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
44711
45009
|
] }),
|