@almadar/ui 5.21.8 → 5.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +960 -649
- package/dist/avl/index.js +960 -649
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +665 -369
- package/dist/components/index.js +665 -369
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +665 -369
- package/dist/providers/index.js +665 -369
- package/dist/runtime/index.cjs +665 -369
- package/dist/runtime/index.js +665 -369
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -2036,7 +2036,10 @@ var en_default;
|
|
|
2036
2036
|
var init_en = __esm({
|
|
2037
2037
|
"locales/en.json"() {
|
|
2038
2038
|
en_default = {
|
|
2039
|
-
$meta: {
|
|
2039
|
+
$meta: {
|
|
2040
|
+
locale: "en",
|
|
2041
|
+
direction: "ltr"
|
|
2042
|
+
},
|
|
2040
2043
|
"common.save": "Save",
|
|
2041
2044
|
"common.cancel": "Cancel",
|
|
2042
2045
|
"common.delete": "Delete",
|
|
@@ -2178,7 +2181,6 @@ var init_en = __esm({
|
|
|
2178
2181
|
"error.somethingWentWrong": "Something went wrong",
|
|
2179
2182
|
"error.loadingItems": "Loading items...",
|
|
2180
2183
|
"error.noItemsFound": "No items found",
|
|
2181
|
-
"error.notFound": "Not found",
|
|
2182
2184
|
"debug.noEntityData": "No entity data",
|
|
2183
2185
|
"debug.noEntities": "No entities",
|
|
2184
2186
|
"debug.noTicks": "No ticks registered",
|
|
@@ -2210,7 +2212,298 @@ var init_en = __esm({
|
|
|
2210
2212
|
"template.showcase": "Showcase",
|
|
2211
2213
|
"template.faq": "Frequently Asked Questions",
|
|
2212
2214
|
"template.ourTeam": "Our Team",
|
|
2213
|
-
"template.caseStudies": "Case Studies"
|
|
2215
|
+
"template.caseStudies": "Case Studies",
|
|
2216
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
2217
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
2218
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
2219
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
2220
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
2221
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
2222
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
2223
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
2224
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
2225
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
2226
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
2227
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
2228
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
2229
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
2230
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
2231
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
2232
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
2233
|
+
"richBlockEditor.blockType.code": "Code",
|
|
2234
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
2235
|
+
"richBlockEditor.blockType.image": "Image",
|
|
2236
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
2237
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
2238
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
2239
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
2240
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
2241
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
2242
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
2243
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
2244
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
2245
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
2246
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
2247
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
2248
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
2249
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
2250
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
2251
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
2252
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
2253
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
2254
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
2255
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
2256
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
2257
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
2258
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
2259
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
2260
|
+
"richBlockEditor.addItem": "Add item",
|
|
2261
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
2262
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
2263
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
2264
|
+
"versionDiff.compare": "Compare",
|
|
2265
|
+
"versionDiff.to": "to",
|
|
2266
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
2267
|
+
"versionDiff.afterRevision": "After revision",
|
|
2268
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
2269
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
2270
|
+
"versionDiff.revert": "Revert",
|
|
2271
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
2272
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
2273
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
2274
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
2275
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
2276
|
+
"violationAlert.adminLabel": "Admin:",
|
|
2277
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
2278
|
+
"violationAlert.goToField": "Go to field",
|
|
2279
|
+
"branchingLogic.title": "Branching logic",
|
|
2280
|
+
"branchingLogic.if": "If",
|
|
2281
|
+
"branchingLogic.goTo": "go to",
|
|
2282
|
+
"branchingLogic.rules": "Rules",
|
|
2283
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
2284
|
+
"branchingLogic.addRule": "Add rule",
|
|
2285
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
2286
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
2287
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
2288
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
2289
|
+
"branchingLogic.selectTarget": "Select target",
|
|
2290
|
+
"branchingLogic.selectValue": "Select value",
|
|
2291
|
+
"branchingLogic.addValue": "Add value",
|
|
2292
|
+
"branchingLogic.value": "Value",
|
|
2293
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
2294
|
+
"branchingLogic.operatorEquals": "equals",
|
|
2295
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
2296
|
+
"branchingLogic.operatorContains": "contains",
|
|
2297
|
+
"branchingLogic.operatorIn": "is one of",
|
|
2298
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
2299
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
2300
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
2301
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
2302
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
2303
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
2304
|
+
"filterGroup.filters": "Filters",
|
|
2305
|
+
"filterGroup.all": "All",
|
|
2306
|
+
"filterGroup.clear": "Clear",
|
|
2307
|
+
"filterGroup.clearAll": "Clear all",
|
|
2308
|
+
"filterGroup.from": "From",
|
|
2309
|
+
"filterGroup.to": "To",
|
|
2310
|
+
"filterGroup.allOf": "All {{label}}",
|
|
2311
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
2312
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
2313
|
+
"debug.expression": "Expression",
|
|
2314
|
+
"debug.inputs": "Inputs",
|
|
2315
|
+
"debug.trait": "Trait",
|
|
2316
|
+
"debug.filterAll": "All",
|
|
2317
|
+
"debug.filterPassed": "Passed",
|
|
2318
|
+
"debug.filterFailed": "Failed",
|
|
2319
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
2320
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
2321
|
+
"debug.activeStates": "Active States",
|
|
2322
|
+
"debug.availableEvents": "Available Events",
|
|
2323
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
2324
|
+
"debug.guarded": "guarded",
|
|
2325
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
2326
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
2327
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
2328
|
+
"debug.states": "States",
|
|
2329
|
+
"debug.transitions": "Transitions",
|
|
2330
|
+
"debug.guards": "Guards",
|
|
2331
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
2332
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
2333
|
+
"debug.singleton": "Singleton",
|
|
2334
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
2335
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
2336
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
2337
|
+
"debug.persistent": "Persistent",
|
|
2338
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
2339
|
+
"debug.notLoaded": "not loaded",
|
|
2340
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
2341
|
+
"debug.allCount": "All ({{count}})",
|
|
2342
|
+
"debug.autoScroll": "Auto-scroll",
|
|
2343
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
2344
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
2345
|
+
"debug.guardLabel": "guard:",
|
|
2346
|
+
"debug.effectsCount": "{{count}} effects",
|
|
2347
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
2348
|
+
"debug.never": "Never",
|
|
2349
|
+
"debug.connected": "Connected",
|
|
2350
|
+
"debug.disconnected": "Disconnected",
|
|
2351
|
+
"debug.lastError": "Last Error",
|
|
2352
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
2353
|
+
"debug.server": "server",
|
|
2354
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
2355
|
+
"debug.emitLabel": "emit:",
|
|
2356
|
+
"debug.rowsCount": "{{count}} rows",
|
|
2357
|
+
"debug.serverResponse": "server response",
|
|
2358
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
2359
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
2360
|
+
"debug.failCount": "{{count}} fail",
|
|
2361
|
+
"debug.ok": "OK",
|
|
2362
|
+
"debug.localCount": "{{count}} local",
|
|
2363
|
+
"debug.serverCount": "{{count}} server",
|
|
2364
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
2365
|
+
"debug.tabDispatch": "Dispatch",
|
|
2366
|
+
"debug.tabVerify": "Verify",
|
|
2367
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
2368
|
+
"debug.tabTimeline": "Timeline",
|
|
2369
|
+
"debug.tabBridge": "Bridge",
|
|
2370
|
+
"debug.tabTraits": "Traits",
|
|
2371
|
+
"debug.tabTicks": "Ticks",
|
|
2372
|
+
"debug.tabEntities": "Entities",
|
|
2373
|
+
"debug.tabEvents": "Events",
|
|
2374
|
+
"debug.tabGuards": "Guards",
|
|
2375
|
+
"debug.debugger": "Debugger",
|
|
2376
|
+
"debug.failedCount": "{{count}} failed",
|
|
2377
|
+
"debug.traitsCount": "{{count}} traits",
|
|
2378
|
+
"debug.idle": "Idle",
|
|
2379
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
2380
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
2381
|
+
"debug.allPassing": "All passing",
|
|
2382
|
+
"debug.runtime": "Runtime",
|
|
2383
|
+
"debug.close": "Close (`)",
|
|
2384
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
2385
|
+
"replyTree.expandReplies": "Expand replies",
|
|
2386
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
2387
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
2388
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
2389
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
2390
|
+
"replyTree.reply": "Reply",
|
|
2391
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
2392
|
+
"replyTree.flag": "Flag",
|
|
2393
|
+
"replyTree.send": "Send",
|
|
2394
|
+
"replyTree.continueThread": "Continue thread",
|
|
2395
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
2396
|
+
"signaturePad.label": "Signature",
|
|
2397
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
2398
|
+
"signaturePad.clear": "Clear",
|
|
2399
|
+
"signaturePad.confirm": "Confirm",
|
|
2400
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
2401
|
+
"qrScanner.paused": "Paused",
|
|
2402
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
2403
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
2404
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
2405
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
2406
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
2407
|
+
"docSearch.placeholder": "Search documentation...",
|
|
2408
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
2409
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
2410
|
+
"avl.trigger": "Trigger",
|
|
2411
|
+
"avl.guard": "Guard",
|
|
2412
|
+
"avl.effects": "Effects",
|
|
2413
|
+
"avl.props": "Props",
|
|
2414
|
+
"avl.entity": "Entity",
|
|
2415
|
+
"avl.traits": "Traits",
|
|
2416
|
+
"avl.transition": "Transition",
|
|
2417
|
+
"avl.onEntity": "on {{entity}}",
|
|
2418
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
2419
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
2420
|
+
"avl.zoomIn": "Zoom in",
|
|
2421
|
+
"avl.zoomOut": "Zoom out",
|
|
2422
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
2423
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
2424
|
+
"avl.noTraitData": "No trait data",
|
|
2425
|
+
"avl.computingLayout": "Computing layout...",
|
|
2426
|
+
"avl.noStateMachine": "No state machine",
|
|
2427
|
+
"avl.listensFor": "listens for {{event}}",
|
|
2428
|
+
"avl.emits": "emits {{event}}",
|
|
2429
|
+
"avl.pageLayout": "Page Layout",
|
|
2430
|
+
"avl.overlaySuffix": "(overlay)",
|
|
2431
|
+
"orbPreview.previewBadge": "Preview",
|
|
2432
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
2433
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
2434
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
2435
|
+
"orbPreview.noPreview": "No preview available",
|
|
2436
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
2437
|
+
"detailView.noTransitionData": "No transition data",
|
|
2438
|
+
"orbInspector.required": "req",
|
|
2439
|
+
"orbInspector.addField": "Add Field",
|
|
2440
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
2441
|
+
"orbInspector.standalone": "Standalone",
|
|
2442
|
+
"orbInspector.embedded": "Embedded",
|
|
2443
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
2444
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
2445
|
+
"orbInspector.addEffect": "Add Effect",
|
|
2446
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
2447
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
2448
|
+
"orbInspector.tokens": "Tokens",
|
|
2449
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
2450
|
+
"orbInspector.variant": "Variant",
|
|
2451
|
+
"orbInspector.size": "Size",
|
|
2452
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
2453
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
2454
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
2455
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
2456
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
2457
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
2458
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
2459
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
2460
|
+
"orbInspector.tab.styles": "Styles",
|
|
2461
|
+
"orbInspector.tab.code": "Code",
|
|
2462
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
2463
|
+
"canvas.overview": "Overview",
|
|
2464
|
+
"canvas.expanded": "Expanded",
|
|
2465
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
2466
|
+
"canvas.screensCount": "{{count}} screens",
|
|
2467
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
2468
|
+
"lawReference.viewFullText": "View full law text",
|
|
2469
|
+
"statCard.defaultLabel": "Stat",
|
|
2470
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
2471
|
+
"mediaGallery.upload": "Upload",
|
|
2472
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
2473
|
+
"pagination.jumpPlaceholder": "Page",
|
|
2474
|
+
"table.selectRow": "Select row {{id}}",
|
|
2475
|
+
"card.selectItem": "Select {{item}}",
|
|
2476
|
+
"card.itemFallback": "item",
|
|
2477
|
+
"fileTree.noFiles": "No files",
|
|
2478
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
2479
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
2480
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
2481
|
+
"upload.dropFilesHere": "Drop files here",
|
|
2482
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
2483
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
2484
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
2485
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
2486
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
2487
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
2488
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
2489
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
2490
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
2491
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
2492
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
2493
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
2494
|
+
"optionConstraint.optional": "Optional",
|
|
2495
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
2496
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
2497
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
2498
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
2499
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
2500
|
+
"stateMachine.pinned": "Pinned",
|
|
2501
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
2502
|
+
"stateMachine.externalEffects": "External Effects",
|
|
2503
|
+
"stateMachine.legend.initial": "Initial",
|
|
2504
|
+
"stateMachine.legend.final": "Final",
|
|
2505
|
+
"stateMachine.legend.state": "State",
|
|
2506
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
2214
2507
|
};
|
|
2215
2508
|
}
|
|
2216
2509
|
});
|
|
@@ -4672,6 +4965,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4672
4965
|
init_Typography();
|
|
4673
4966
|
init_Divider();
|
|
4674
4967
|
init_cn();
|
|
4968
|
+
init_useTranslate();
|
|
4675
4969
|
positionStyles2 = {
|
|
4676
4970
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4677
4971
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -4690,6 +4984,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4690
4984
|
position = "top",
|
|
4691
4985
|
className
|
|
4692
4986
|
}) => {
|
|
4987
|
+
const { t } = useTranslate();
|
|
4693
4988
|
const [isVisible, setIsVisible] = React79__default.useState(false);
|
|
4694
4989
|
const timeoutRef = React79__default.useRef(null);
|
|
4695
4990
|
const handleMouseEnter = () => {
|
|
@@ -4773,7 +5068,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4773
5068
|
target: "_blank",
|
|
4774
5069
|
rel: "noopener noreferrer",
|
|
4775
5070
|
onClick: (e) => e.stopPropagation(),
|
|
4776
|
-
children: "
|
|
5071
|
+
children: t("lawReference.viewFullText")
|
|
4777
5072
|
}
|
|
4778
5073
|
)
|
|
4779
5074
|
] }),
|
|
@@ -12083,6 +12378,7 @@ var log4, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
12083
12378
|
var init_BehaviorView = __esm({
|
|
12084
12379
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12085
12380
|
"use client";
|
|
12381
|
+
init_useTranslate();
|
|
12086
12382
|
init_AvlState();
|
|
12087
12383
|
init_AvlTransitionLane();
|
|
12088
12384
|
init_AvlSwimLane();
|
|
@@ -12092,6 +12388,7 @@ var init_BehaviorView = __esm({
|
|
|
12092
12388
|
SWIM_GUTTER = 120;
|
|
12093
12389
|
CENTER_W = 360;
|
|
12094
12390
|
BehaviorView = ({ data }) => {
|
|
12391
|
+
const { t } = useTranslate();
|
|
12095
12392
|
const [layout, setLayout] = useState(null);
|
|
12096
12393
|
const traitName = data.traits[0]?.name;
|
|
12097
12394
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -12101,10 +12398,10 @@ var init_BehaviorView = __esm({
|
|
|
12101
12398
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log4.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12102
12399
|
}, [dataKey]);
|
|
12103
12400
|
if (!traitData) {
|
|
12104
|
-
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: "
|
|
12401
|
+
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") });
|
|
12105
12402
|
}
|
|
12106
12403
|
if (!layout) {
|
|
12107
|
-
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: "
|
|
12404
|
+
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") });
|
|
12108
12405
|
}
|
|
12109
12406
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
12110
12407
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -12120,10 +12417,7 @@ var init_BehaviorView = __esm({
|
|
|
12120
12417
|
const machineHeight = scaledH + 100;
|
|
12121
12418
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
12122
12419
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
12123
|
-
/* @__PURE__ */
|
|
12124
|
-
"on ",
|
|
12125
|
-
traitData.linkedEntity
|
|
12126
|
-
] }),
|
|
12420
|
+
/* @__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 }) }),
|
|
12127
12421
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
12128
12422
|
/* @__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 }) }),
|
|
12129
12423
|
/* @__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 }) })
|
|
@@ -12431,7 +12725,7 @@ var init_CodeBlock = __esm({
|
|
|
12431
12725
|
const isLolo = language === "lolo";
|
|
12432
12726
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
12433
12727
|
const eventBus = useEventBus();
|
|
12434
|
-
const { t
|
|
12728
|
+
const { t } = useTranslate();
|
|
12435
12729
|
const scrollRef = useRef(null);
|
|
12436
12730
|
const codeRef = useRef(null);
|
|
12437
12731
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -12686,7 +12980,7 @@ var init_CodeBlock = __esm({
|
|
|
12686
12980
|
size: "sm",
|
|
12687
12981
|
onClick: handleCopy,
|
|
12688
12982
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
12689
|
-
"aria-label": "
|
|
12983
|
+
"aria-label": t("common.copy"),
|
|
12690
12984
|
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" })
|
|
12691
12985
|
}
|
|
12692
12986
|
)
|
|
@@ -13341,7 +13635,7 @@ var init_StateMachineView = __esm({
|
|
|
13341
13635
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13342
13636
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
13343
13637
|
const isSingle2 = bundle.labels.length === 1;
|
|
13344
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
13638
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13345
13639
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
13346
13640
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
13347
13641
|
const cx = fromState.x;
|
|
@@ -13467,7 +13761,7 @@ var init_StateMachineView = __esm({
|
|
|
13467
13761
|
const controlX = midX + perpX;
|
|
13468
13762
|
const controlY = midY + perpY;
|
|
13469
13763
|
const isSingle = bundle.labels.length === 1;
|
|
13470
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
13764
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
13471
13765
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
13472
13766
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
13473
13767
|
const curveMidpoint = {
|
|
@@ -13622,7 +13916,7 @@ var init_StateMachineView = __esm({
|
|
|
13622
13916
|
{
|
|
13623
13917
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
13624
13918
|
style: { backgroundColor: "var(--color-success)" },
|
|
13625
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
13919
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
13626
13920
|
}
|
|
13627
13921
|
),
|
|
13628
13922
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -13644,10 +13938,7 @@ var init_StateMachineView = __esm({
|
|
|
13644
13938
|
{
|
|
13645
13939
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
13646
13940
|
style: { backgroundColor: "var(--color-accent)" },
|
|
13647
|
-
children: /* @__PURE__ */
|
|
13648
|
-
bundle.labels.length,
|
|
13649
|
-
" events"
|
|
13650
|
-
] })
|
|
13941
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
13651
13942
|
}
|
|
13652
13943
|
)
|
|
13653
13944
|
]
|
|
@@ -13792,7 +14083,7 @@ var init_StateMachineView = __esm({
|
|
|
13792
14083
|
align: "center",
|
|
13793
14084
|
className: "mb-2",
|
|
13794
14085
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
13795
|
-
children: "
|
|
14086
|
+
children: t("stateMachine.externalEffects")
|
|
13796
14087
|
}
|
|
13797
14088
|
),
|
|
13798
14089
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -13812,10 +14103,10 @@ var init_StateMachineView = __esm({
|
|
|
13812
14103
|
Legend = ({ config, y }) => {
|
|
13813
14104
|
const { t } = useTranslate();
|
|
13814
14105
|
const items = [
|
|
13815
|
-
{ label: "
|
|
13816
|
-
{ label: "
|
|
13817
|
-
{ label: "
|
|
13818
|
-
{ label: "
|
|
14106
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
14107
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
14108
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
14109
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
13819
14110
|
];
|
|
13820
14111
|
return /* @__PURE__ */ jsx(
|
|
13821
14112
|
HStack,
|
|
@@ -13830,8 +14121,8 @@ var init_StateMachineView = __esm({
|
|
|
13830
14121
|
{
|
|
13831
14122
|
className: "w-3 h-3 rounded-full",
|
|
13832
14123
|
style: {
|
|
13833
|
-
backgroundColor: item.
|
|
13834
|
-
border: item.
|
|
14124
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
14125
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
13835
14126
|
}
|
|
13836
14127
|
}
|
|
13837
14128
|
),
|
|
@@ -13843,7 +14134,7 @@ var init_StateMachineView = __esm({
|
|
|
13843
14134
|
children: item.label
|
|
13844
14135
|
}
|
|
13845
14136
|
)
|
|
13846
|
-
] }, item.
|
|
14137
|
+
] }, item.key))
|
|
13847
14138
|
}
|
|
13848
14139
|
);
|
|
13849
14140
|
};
|
|
@@ -14637,13 +14928,13 @@ var init_JazariStateMachine = __esm({
|
|
|
14637
14928
|
);
|
|
14638
14929
|
}, [resolvedTrait, entityFields]);
|
|
14639
14930
|
if (isLoading) {
|
|
14640
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
14931
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
14641
14932
|
}
|
|
14642
14933
|
if (error) {
|
|
14643
14934
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
14644
14935
|
}
|
|
14645
14936
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
14646
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
14937
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
14647
14938
|
}
|
|
14648
14939
|
return /* @__PURE__ */ jsx(
|
|
14649
14940
|
StateMachineView,
|
|
@@ -15687,13 +15978,13 @@ var init_LayoutPatterns = __esm({
|
|
|
15687
15978
|
function generateRuleId() {
|
|
15688
15979
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
15689
15980
|
}
|
|
15690
|
-
function questionsToOptions(questions,
|
|
15981
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
15691
15982
|
const opts = questions.map((q) => ({
|
|
15692
15983
|
value: q.id,
|
|
15693
15984
|
label: q.label
|
|
15694
15985
|
}));
|
|
15695
|
-
if (
|
|
15696
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
15986
|
+
if (endOfSurveyLabel !== null) {
|
|
15987
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
15697
15988
|
}
|
|
15698
15989
|
return opts;
|
|
15699
15990
|
}
|
|
@@ -15702,7 +15993,7 @@ function isRuleBroken(rule, questions) {
|
|
|
15702
15993
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
15703
15994
|
return !sourceExists || !targetExists;
|
|
15704
15995
|
}
|
|
15705
|
-
var END_OF_SURVEY,
|
|
15996
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
15706
15997
|
var init_BranchingLogicBuilder = __esm({
|
|
15707
15998
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
15708
15999
|
"use client";
|
|
@@ -15715,14 +16006,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15715
16006
|
init_FilterPill();
|
|
15716
16007
|
init_Box();
|
|
15717
16008
|
init_useEventBus();
|
|
16009
|
+
init_useTranslate();
|
|
15718
16010
|
init_cn();
|
|
15719
16011
|
END_OF_SURVEY = "end-of-survey";
|
|
15720
|
-
OPERATOR_OPTIONS = [
|
|
15721
|
-
{ value: "equals", label: "equals" },
|
|
15722
|
-
{ value: "not-equals", label: "does not equal" },
|
|
15723
|
-
{ value: "contains", label: "contains" },
|
|
15724
|
-
{ value: "in", label: "is one of" }
|
|
15725
|
-
];
|
|
15726
16012
|
RuleRow = ({
|
|
15727
16013
|
rule,
|
|
15728
16014
|
questions,
|
|
@@ -15731,8 +16017,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15731
16017
|
onChange,
|
|
15732
16018
|
onDelete
|
|
15733
16019
|
}) => {
|
|
15734
|
-
const
|
|
15735
|
-
const
|
|
16020
|
+
const { t } = useTranslate();
|
|
16021
|
+
const operatorOptions = useMemo(
|
|
16022
|
+
() => [
|
|
16023
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
16024
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
16025
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
16026
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
16027
|
+
],
|
|
16028
|
+
[t]
|
|
16029
|
+
);
|
|
16030
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
16031
|
+
const targetOptions = useMemo(
|
|
16032
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
16033
|
+
[questions, t]
|
|
16034
|
+
);
|
|
15736
16035
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
15737
16036
|
const valueOptions = useMemo(() => {
|
|
15738
16037
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -15777,22 +16076,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15777
16076
|
),
|
|
15778
16077
|
children: [
|
|
15779
16078
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
15780
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
16079
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
15781
16080
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
15782
16081
|
Select,
|
|
15783
16082
|
{
|
|
15784
16083
|
options: sourceOptions,
|
|
15785
16084
|
value: rule.sourceQuestionId,
|
|
15786
|
-
placeholder: "
|
|
16085
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
15787
16086
|
onChange: handleSource,
|
|
15788
16087
|
disabled: readOnly,
|
|
15789
|
-
error: broken ? "
|
|
16088
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
15790
16089
|
}
|
|
15791
16090
|
) }),
|
|
15792
16091
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
15793
16092
|
Select,
|
|
15794
16093
|
{
|
|
15795
|
-
options:
|
|
16094
|
+
options: operatorOptions,
|
|
15796
16095
|
value: rule.operator,
|
|
15797
16096
|
onChange: handleOperator,
|
|
15798
16097
|
disabled: readOnly
|
|
@@ -15815,7 +16114,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15815
16114
|
{
|
|
15816
16115
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
15817
16116
|
value: "",
|
|
15818
|
-
placeholder: "
|
|
16117
|
+
placeholder: t("branchingLogic.addValue"),
|
|
15819
16118
|
onChange: handleAddChip,
|
|
15820
16119
|
disabled: readOnly
|
|
15821
16120
|
}
|
|
@@ -15823,7 +16122,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15823
16122
|
Input,
|
|
15824
16123
|
{
|
|
15825
16124
|
inputType: "text",
|
|
15826
|
-
placeholder: "
|
|
16125
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
15827
16126
|
value: "",
|
|
15828
16127
|
onKeyDown: (e) => {
|
|
15829
16128
|
if (e.key !== "Enter") return;
|
|
@@ -15841,7 +16140,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15841
16140
|
{
|
|
15842
16141
|
options: valueOptions,
|
|
15843
16142
|
value: scalarValue,
|
|
15844
|
-
placeholder: "
|
|
16143
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
15845
16144
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
15846
16145
|
disabled: readOnly
|
|
15847
16146
|
}
|
|
@@ -15849,7 +16148,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15849
16148
|
Input,
|
|
15850
16149
|
{
|
|
15851
16150
|
inputType: "text",
|
|
15852
|
-
placeholder: "
|
|
16151
|
+
placeholder: t("branchingLogic.value"),
|
|
15853
16152
|
value: scalarValue,
|
|
15854
16153
|
onChange: handleScalarValue,
|
|
15855
16154
|
disabled: readOnly
|
|
@@ -15857,17 +16156,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15857
16156
|
) }),
|
|
15858
16157
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
15859
16158
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
15860
|
-
"
|
|
16159
|
+
t("branchingLogic.goTo")
|
|
15861
16160
|
] }),
|
|
15862
16161
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
15863
16162
|
Select,
|
|
15864
16163
|
{
|
|
15865
16164
|
options: targetOptions,
|
|
15866
16165
|
value: rule.targetQuestionId,
|
|
15867
|
-
placeholder: "
|
|
16166
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
15868
16167
|
onChange: handleTarget,
|
|
15869
16168
|
disabled: readOnly,
|
|
15870
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
16169
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
15871
16170
|
}
|
|
15872
16171
|
) }),
|
|
15873
16172
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -15879,11 +16178,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15879
16178
|
action: "DELETE_RULE",
|
|
15880
16179
|
actionPayload: { ruleId: rule.id },
|
|
15881
16180
|
onClick: onDelete,
|
|
15882
|
-
"aria-label": "
|
|
16181
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
15883
16182
|
}
|
|
15884
16183
|
)
|
|
15885
16184
|
] }),
|
|
15886
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
16185
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
15887
16186
|
]
|
|
15888
16187
|
}
|
|
15889
16188
|
);
|
|
@@ -15893,10 +16192,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15893
16192
|
NODE_GAP_Y = 80;
|
|
15894
16193
|
PADDING = 32;
|
|
15895
16194
|
LogicGraph = ({ questions, rules }) => {
|
|
16195
|
+
const { t } = useTranslate();
|
|
16196
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
15896
16197
|
const layout = useMemo(() => {
|
|
15897
16198
|
const items = [
|
|
15898
16199
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
15899
|
-
{ id: END_OF_SURVEY, label:
|
|
16200
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
15900
16201
|
];
|
|
15901
16202
|
const positions = {};
|
|
15902
16203
|
items.forEach((item, i) => {
|
|
@@ -15908,14 +16209,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
15908
16209
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
15909
16210
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
15910
16211
|
return { items, positions, width, height };
|
|
15911
|
-
}, [questions]);
|
|
16212
|
+
}, [questions, endOfSurveyLabel]);
|
|
15912
16213
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
15913
16214
|
"svg",
|
|
15914
16215
|
{
|
|
15915
16216
|
width: layout.width,
|
|
15916
16217
|
height: layout.height,
|
|
15917
16218
|
role: "img",
|
|
15918
|
-
"aria-label": "
|
|
16219
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
15919
16220
|
style: { display: "block" },
|
|
15920
16221
|
children: [
|
|
15921
16222
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -16023,6 +16324,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16023
16324
|
readOnly = false,
|
|
16024
16325
|
className
|
|
16025
16326
|
}) => {
|
|
16327
|
+
const { t } = useTranslate();
|
|
16026
16328
|
const eventBus = useEventBus();
|
|
16027
16329
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
16028
16330
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -16075,16 +16377,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16075
16377
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
16076
16378
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
16077
16379
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
16078
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
16380
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
16079
16381
|
/* @__PURE__ */ jsx(
|
|
16080
16382
|
Badge,
|
|
16081
16383
|
{
|
|
16082
16384
|
variant: "neutral",
|
|
16083
16385
|
size: "sm",
|
|
16084
|
-
label:
|
|
16386
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
16085
16387
|
}
|
|
16086
16388
|
),
|
|
16087
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
16389
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
16390
|
+
Badge,
|
|
16391
|
+
{
|
|
16392
|
+
variant: "error",
|
|
16393
|
+
size: "sm",
|
|
16394
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
16395
|
+
}
|
|
16396
|
+
)
|
|
16088
16397
|
] }),
|
|
16089
16398
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
16090
16399
|
/* @__PURE__ */ jsx(
|
|
@@ -16095,7 +16404,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16095
16404
|
leftIcon: Pencil,
|
|
16096
16405
|
action: "VIEW_EDIT",
|
|
16097
16406
|
onClick: () => setView("edit"),
|
|
16098
|
-
children: "
|
|
16407
|
+
children: t("branchingLogic.rules")
|
|
16099
16408
|
}
|
|
16100
16409
|
),
|
|
16101
16410
|
/* @__PURE__ */ jsx(
|
|
@@ -16106,13 +16415,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16106
16415
|
leftIcon: Eye,
|
|
16107
16416
|
action: "VIEW_GRAPH",
|
|
16108
16417
|
onClick: () => setView("graph"),
|
|
16109
|
-
children: "
|
|
16418
|
+
children: t("branchingLogic.logicGraph")
|
|
16110
16419
|
}
|
|
16111
16420
|
)
|
|
16112
16421
|
] })
|
|
16113
16422
|
] }),
|
|
16114
16423
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
16115
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
16424
|
+
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(
|
|
16116
16425
|
RuleRow,
|
|
16117
16426
|
{
|
|
16118
16427
|
rule,
|
|
@@ -16133,7 +16442,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16133
16442
|
action: "ADD_RULE",
|
|
16134
16443
|
onClick: handleAddRule,
|
|
16135
16444
|
disabled: noQuestions,
|
|
16136
|
-
children: "
|
|
16445
|
+
children: t("branchingLogic.addRule")
|
|
16137
16446
|
}
|
|
16138
16447
|
) })
|
|
16139
16448
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -16760,7 +17069,7 @@ function CalendarGrid({
|
|
|
16760
17069
|
onClick: stepPrev,
|
|
16761
17070
|
"aria-disabled": !canPrev || void 0,
|
|
16762
17071
|
"aria-label": t("aria.previousDays"),
|
|
16763
|
-
children: "
|
|
17072
|
+
children: t("nav.previous")
|
|
16764
17073
|
}
|
|
16765
17074
|
),
|
|
16766
17075
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -16773,7 +17082,7 @@ function CalendarGrid({
|
|
|
16773
17082
|
onClick: stepNext,
|
|
16774
17083
|
"aria-disabled": !canNext || void 0,
|
|
16775
17084
|
"aria-label": t("aria.nextDays"),
|
|
16776
|
-
children: "
|
|
17085
|
+
children: t("nav.next")
|
|
16777
17086
|
}
|
|
16778
17087
|
)
|
|
16779
17088
|
] }),
|
|
@@ -18323,7 +18632,7 @@ var init_Pagination = __esm({
|
|
|
18323
18632
|
type: "number",
|
|
18324
18633
|
value: jumpToPage,
|
|
18325
18634
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
18326
|
-
placeholder: "
|
|
18635
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
18327
18636
|
className: "w-20",
|
|
18328
18637
|
onKeyDown: (e) => {
|
|
18329
18638
|
if (e.key === "Enter") {
|
|
@@ -18461,13 +18770,10 @@ var init_CardGrid = __esm({
|
|
|
18461
18770
|
return children;
|
|
18462
18771
|
}
|
|
18463
18772
|
if (isLoading) {
|
|
18464
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
18773
|
+
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") }) });
|
|
18465
18774
|
}
|
|
18466
18775
|
if (error) {
|
|
18467
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
18468
|
-
"Error loading items: ",
|
|
18469
|
-
error.message
|
|
18470
|
-
] }) });
|
|
18776
|
+
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 }) }) });
|
|
18471
18777
|
}
|
|
18472
18778
|
if (normalizedData.length === 0) {
|
|
18473
18779
|
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" }) });
|
|
@@ -22564,7 +22870,7 @@ function DataGrid({
|
|
|
22564
22870
|
onChange: () => toggleSelection(id),
|
|
22565
22871
|
onClick: (e) => e.stopPropagation(),
|
|
22566
22872
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
22567
|
-
"aria-label":
|
|
22873
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
22568
22874
|
}
|
|
22569
22875
|
),
|
|
22570
22876
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -22762,7 +23068,7 @@ function formatDate3(value) {
|
|
|
22762
23068
|
if (isNaN(d.getTime())) return String(value);
|
|
22763
23069
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
22764
23070
|
}
|
|
22765
|
-
function formatValue2(value, format) {
|
|
23071
|
+
function formatValue2(value, format, boolLabels) {
|
|
22766
23072
|
if (value === void 0 || value === null) return "";
|
|
22767
23073
|
switch (format) {
|
|
22768
23074
|
case "date":
|
|
@@ -22774,7 +23080,7 @@ function formatValue2(value, format) {
|
|
|
22774
23080
|
case "percent":
|
|
22775
23081
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
22776
23082
|
case "boolean":
|
|
22777
|
-
return value ? "Yes" : "No";
|
|
23083
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
22778
23084
|
default:
|
|
22779
23085
|
return String(value);
|
|
22780
23086
|
}
|
|
@@ -23070,7 +23376,7 @@ function DataList({
|
|
|
23070
23376
|
field.label ?? fieldLabel3(field.name),
|
|
23071
23377
|
":"
|
|
23072
23378
|
] }),
|
|
23073
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
23379
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
23074
23380
|
] }, field.name);
|
|
23075
23381
|
}) }),
|
|
23076
23382
|
progressFields.map((field) => {
|
|
@@ -23200,6 +23506,7 @@ var init_FileTree = __esm({
|
|
|
23200
23506
|
init_Box();
|
|
23201
23507
|
init_Typography();
|
|
23202
23508
|
init_Icon();
|
|
23509
|
+
init_useTranslate();
|
|
23203
23510
|
TreeNodeItem = ({
|
|
23204
23511
|
node,
|
|
23205
23512
|
depth,
|
|
@@ -23285,8 +23592,9 @@ var init_FileTree = __esm({
|
|
|
23285
23592
|
className,
|
|
23286
23593
|
indent = 16
|
|
23287
23594
|
}) => {
|
|
23595
|
+
const { t } = useTranslate();
|
|
23288
23596
|
if (tree.length === 0) {
|
|
23289
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
23597
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23290
23598
|
}
|
|
23291
23599
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
23292
23600
|
TreeNodeItem,
|
|
@@ -23413,6 +23721,7 @@ var init_FilterGroup = __esm({
|
|
|
23413
23721
|
init_Icon();
|
|
23414
23722
|
init_useEventBus();
|
|
23415
23723
|
init_useQuerySingleton();
|
|
23724
|
+
init_useTranslate();
|
|
23416
23725
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
23417
23726
|
lookStyles6 = {
|
|
23418
23727
|
toolbar: "",
|
|
@@ -23433,6 +23742,7 @@ var init_FilterGroup = __esm({
|
|
|
23433
23742
|
isLoading,
|
|
23434
23743
|
look = "toolbar"
|
|
23435
23744
|
}) => {
|
|
23745
|
+
const { t } = useTranslate();
|
|
23436
23746
|
const eventBus = useEventBus();
|
|
23437
23747
|
const queryState = useQuerySingleton(query);
|
|
23438
23748
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -23514,7 +23824,7 @@ var init_FilterGroup = __esm({
|
|
|
23514
23824
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
23515
23825
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
23516
23826
|
),
|
|
23517
|
-
children: "
|
|
23827
|
+
children: t("filterGroup.all")
|
|
23518
23828
|
}
|
|
23519
23829
|
),
|
|
23520
23830
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -23542,7 +23852,7 @@ var init_FilterGroup = __esm({
|
|
|
23542
23852
|
size: "sm",
|
|
23543
23853
|
onClick: handleClearAll,
|
|
23544
23854
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23545
|
-
children: "
|
|
23855
|
+
children: t("filterGroup.clear")
|
|
23546
23856
|
}
|
|
23547
23857
|
)
|
|
23548
23858
|
]
|
|
@@ -23553,7 +23863,7 @@ var init_FilterGroup = __esm({
|
|
|
23553
23863
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
23554
23864
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23555
23865
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23556
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
23866
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23557
23867
|
] }),
|
|
23558
23868
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
23559
23869
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -23576,7 +23886,7 @@ var init_FilterGroup = __esm({
|
|
|
23576
23886
|
`${filter.field}_from`,
|
|
23577
23887
|
e.target.value || null
|
|
23578
23888
|
),
|
|
23579
|
-
placeholder: "
|
|
23889
|
+
placeholder: t("filterGroup.from"),
|
|
23580
23890
|
clearable: true,
|
|
23581
23891
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
23582
23892
|
}
|
|
@@ -23590,7 +23900,7 @@ var init_FilterGroup = __esm({
|
|
|
23590
23900
|
`${filter.field}_to`,
|
|
23591
23901
|
e.target.value || null
|
|
23592
23902
|
),
|
|
23593
|
-
placeholder: "
|
|
23903
|
+
placeholder: t("filterGroup.to"),
|
|
23594
23904
|
clearable: true,
|
|
23595
23905
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
23596
23906
|
}
|
|
@@ -23610,7 +23920,7 @@ var init_FilterGroup = __esm({
|
|
|
23610
23920
|
value: selectedValues[filter.field] || "all",
|
|
23611
23921
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23612
23922
|
options: [
|
|
23613
|
-
{ value: "all", label: "
|
|
23923
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23614
23924
|
...filter.options?.map((opt) => ({
|
|
23615
23925
|
value: opt,
|
|
23616
23926
|
label: opt
|
|
@@ -23627,7 +23937,7 @@ var init_FilterGroup = __esm({
|
|
|
23627
23937
|
onClick: handleClearAll,
|
|
23628
23938
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23629
23939
|
className: "self-start",
|
|
23630
|
-
children: "
|
|
23940
|
+
children: t("filterGroup.clearAll")
|
|
23631
23941
|
}
|
|
23632
23942
|
)
|
|
23633
23943
|
] });
|
|
@@ -23693,7 +24003,7 @@ var init_FilterGroup = __esm({
|
|
|
23693
24003
|
value: selectedValues[filter.field] || "all",
|
|
23694
24004
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23695
24005
|
options: [
|
|
23696
|
-
{ value: "all", label:
|
|
24006
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23697
24007
|
...filter.options?.map((opt) => ({
|
|
23698
24008
|
value: opt,
|
|
23699
24009
|
label: opt
|
|
@@ -23722,7 +24032,7 @@ var init_FilterGroup = __esm({
|
|
|
23722
24032
|
field
|
|
23723
24033
|
);
|
|
23724
24034
|
}),
|
|
23725
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
24035
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
23726
24036
|
] })
|
|
23727
24037
|
]
|
|
23728
24038
|
}
|
|
@@ -23747,7 +24057,7 @@ var init_FilterGroup = __esm({
|
|
|
23747
24057
|
className: "text-muted-foreground",
|
|
23748
24058
|
children: [
|
|
23749
24059
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23750
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
24060
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
23751
24061
|
]
|
|
23752
24062
|
}
|
|
23753
24063
|
),
|
|
@@ -23773,7 +24083,7 @@ var init_FilterGroup = __esm({
|
|
|
23773
24083
|
`${filter.field}_from`,
|
|
23774
24084
|
e.target.value || null
|
|
23775
24085
|
),
|
|
23776
|
-
placeholder: "
|
|
24086
|
+
placeholder: t("filterGroup.from"),
|
|
23777
24087
|
clearable: true,
|
|
23778
24088
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
23779
24089
|
className: "min-w-[130px]"
|
|
@@ -23789,7 +24099,7 @@ var init_FilterGroup = __esm({
|
|
|
23789
24099
|
`${filter.field}_to`,
|
|
23790
24100
|
e.target.value || null
|
|
23791
24101
|
),
|
|
23792
|
-
placeholder: "
|
|
24102
|
+
placeholder: t("filterGroup.to"),
|
|
23793
24103
|
clearable: true,
|
|
23794
24104
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
23795
24105
|
className: "min-w-[130px]"
|
|
@@ -23811,7 +24121,7 @@ var init_FilterGroup = __esm({
|
|
|
23811
24121
|
value: selectedValues[filter.field] || "all",
|
|
23812
24122
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
23813
24123
|
options: [
|
|
23814
|
-
{ value: "all", label: "
|
|
24124
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
23815
24125
|
...filter.options?.map((opt) => ({
|
|
23816
24126
|
value: opt,
|
|
23817
24127
|
label: opt
|
|
@@ -23822,10 +24132,7 @@ var init_FilterGroup = __esm({
|
|
|
23822
24132
|
)
|
|
23823
24133
|
] }, filter.field)),
|
|
23824
24134
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
23825
|
-
/* @__PURE__ */
|
|
23826
|
-
activeFilterCount,
|
|
23827
|
-
" active"
|
|
23828
|
-
] }),
|
|
24135
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
23829
24136
|
/* @__PURE__ */ jsx(
|
|
23830
24137
|
Button,
|
|
23831
24138
|
{
|
|
@@ -23833,7 +24140,7 @@ var init_FilterGroup = __esm({
|
|
|
23833
24140
|
size: "sm",
|
|
23834
24141
|
onClick: handleClearAll,
|
|
23835
24142
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23836
|
-
children: "
|
|
24143
|
+
children: t("filterGroup.clearAll")
|
|
23837
24144
|
}
|
|
23838
24145
|
)
|
|
23839
24146
|
] })
|
|
@@ -25028,19 +25335,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
25028
25335
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
25029
25336
|
}
|
|
25030
25337
|
});
|
|
25031
|
-
var
|
|
25338
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
25032
25339
|
var init_ViolationAlert = __esm({
|
|
25033
25340
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25034
25341
|
init_cn();
|
|
25342
|
+
init_useTranslate();
|
|
25035
25343
|
init_Box();
|
|
25036
25344
|
init_Stack();
|
|
25037
25345
|
init_Typography();
|
|
25038
25346
|
init_Button();
|
|
25039
25347
|
init_Icon();
|
|
25040
|
-
|
|
25041
|
-
measure: "
|
|
25042
|
-
admin: "
|
|
25043
|
-
penalty: "
|
|
25348
|
+
actionTypeLabelKeys = {
|
|
25349
|
+
measure: "violationAlert.actionType.measure",
|
|
25350
|
+
admin: "violationAlert.actionType.admin",
|
|
25351
|
+
penalty: "violationAlert.actionType.penalty"
|
|
25044
25352
|
};
|
|
25045
25353
|
actionTypeIcons = {
|
|
25046
25354
|
measure: "alert-triangle",
|
|
@@ -25057,10 +25365,11 @@ var init_ViolationAlert = __esm({
|
|
|
25057
25365
|
className,
|
|
25058
25366
|
...flatProps
|
|
25059
25367
|
}) => {
|
|
25368
|
+
const { t } = useTranslate();
|
|
25060
25369
|
const resolvedViolation = violation ?? {
|
|
25061
25370
|
law: "",
|
|
25062
25371
|
article: "",
|
|
25063
|
-
message: flatProps.message ?? "
|
|
25372
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
25064
25373
|
actionType: "measure"
|
|
25065
25374
|
};
|
|
25066
25375
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -25145,7 +25454,7 @@ var init_ViolationAlert = __esm({
|
|
|
25145
25454
|
{
|
|
25146
25455
|
variant: "caption",
|
|
25147
25456
|
className: cn(textColor, "opacity-75"),
|
|
25148
|
-
children:
|
|
25457
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
25149
25458
|
}
|
|
25150
25459
|
)
|
|
25151
25460
|
] })
|
|
@@ -25176,7 +25485,7 @@ var init_ViolationAlert = __esm({
|
|
|
25176
25485
|
{
|
|
25177
25486
|
variant: "caption",
|
|
25178
25487
|
className: cn(textColor, "opacity-75"),
|
|
25179
|
-
children: "
|
|
25488
|
+
children: t("violationAlert.adminLabel")
|
|
25180
25489
|
}
|
|
25181
25490
|
),
|
|
25182
25491
|
/* @__PURE__ */ jsx(
|
|
@@ -25195,7 +25504,7 @@ var init_ViolationAlert = __esm({
|
|
|
25195
25504
|
{
|
|
25196
25505
|
variant: "caption",
|
|
25197
25506
|
className: cn(textColor, "opacity-75"),
|
|
25198
|
-
children: "
|
|
25507
|
+
children: t("violationAlert.penaltyLabel")
|
|
25199
25508
|
}
|
|
25200
25509
|
),
|
|
25201
25510
|
/* @__PURE__ */ jsx(
|
|
@@ -25220,7 +25529,7 @@ var init_ViolationAlert = __esm({
|
|
|
25220
25529
|
className: cn(textColor, "self-start"),
|
|
25221
25530
|
children: [
|
|
25222
25531
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
25223
|
-
"
|
|
25532
|
+
t("violationAlert.goToField")
|
|
25224
25533
|
]
|
|
25225
25534
|
}
|
|
25226
25535
|
)
|
|
@@ -25536,6 +25845,7 @@ var init_LineChart = __esm({
|
|
|
25536
25845
|
"use client";
|
|
25537
25846
|
init_cn();
|
|
25538
25847
|
init_atoms2();
|
|
25848
|
+
init_useTranslate();
|
|
25539
25849
|
LineChart2 = ({
|
|
25540
25850
|
data,
|
|
25541
25851
|
width = 400,
|
|
@@ -25547,6 +25857,7 @@ var init_LineChart = __esm({
|
|
|
25547
25857
|
areaColor = "var(--color-primary)",
|
|
25548
25858
|
className
|
|
25549
25859
|
}) => {
|
|
25860
|
+
const { t } = useTranslate();
|
|
25550
25861
|
const gradientId = useId();
|
|
25551
25862
|
const safeData = data ?? [];
|
|
25552
25863
|
const sortedData = useMemo(() => {
|
|
@@ -25583,7 +25894,7 @@ var init_LineChart = __esm({
|
|
|
25583
25894
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
25584
25895
|
}, [linePath, points, height, showArea]);
|
|
25585
25896
|
if (safeData.length === 0) {
|
|
25586
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
25897
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
25587
25898
|
}
|
|
25588
25899
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
25589
25900
|
"svg",
|
|
@@ -27774,6 +28085,7 @@ var init_GraphView = __esm({
|
|
|
27774
28085
|
"use client";
|
|
27775
28086
|
init_cn();
|
|
27776
28087
|
init_atoms2();
|
|
28088
|
+
init_useTranslate();
|
|
27777
28089
|
GROUP_COLORS = [
|
|
27778
28090
|
"#3b82f6",
|
|
27779
28091
|
// blue-500
|
|
@@ -27806,6 +28118,7 @@ var init_GraphView = __esm({
|
|
|
27806
28118
|
showLabels = true,
|
|
27807
28119
|
zoomToFit = true
|
|
27808
28120
|
}) => {
|
|
28121
|
+
const { t } = useTranslate();
|
|
27809
28122
|
const containerRef = useRef(null);
|
|
27810
28123
|
const animRef = useRef(0);
|
|
27811
28124
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -27983,7 +28296,7 @@ var init_GraphView = __esm({
|
|
|
27983
28296
|
[onNodeClick]
|
|
27984
28297
|
);
|
|
27985
28298
|
if (nodes.length === 0) {
|
|
27986
|
-
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: "
|
|
28299
|
+
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") }) });
|
|
27987
28300
|
}
|
|
27988
28301
|
return /* @__PURE__ */ jsx(
|
|
27989
28302
|
Box,
|
|
@@ -28439,11 +28752,12 @@ var init_UploadDropZone = __esm({
|
|
|
28439
28752
|
init_Icon();
|
|
28440
28753
|
init_Typography();
|
|
28441
28754
|
init_useEventBus();
|
|
28755
|
+
init_useTranslate();
|
|
28442
28756
|
UploadDropZone = ({
|
|
28443
28757
|
accept,
|
|
28444
28758
|
maxSize,
|
|
28445
28759
|
maxFiles = 1,
|
|
28446
|
-
label
|
|
28760
|
+
label,
|
|
28447
28761
|
description,
|
|
28448
28762
|
disabled = false,
|
|
28449
28763
|
action,
|
|
@@ -28451,22 +28765,24 @@ var init_UploadDropZone = __esm({
|
|
|
28451
28765
|
onFiles,
|
|
28452
28766
|
className
|
|
28453
28767
|
}) => {
|
|
28768
|
+
const { t } = useTranslate();
|
|
28769
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28454
28770
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
28455
28771
|
const [error, setError] = useState(null);
|
|
28456
28772
|
const inputRef = useRef(null);
|
|
28457
28773
|
const eventBus = useSafeEventBus7();
|
|
28458
28774
|
const defaultDescription = [
|
|
28459
|
-
accept ?
|
|
28460
|
-
maxSize ?
|
|
28461
|
-
maxFiles > 1 ?
|
|
28775
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
28776
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
28777
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
28462
28778
|
].filter(Boolean).join(". ");
|
|
28463
28779
|
const validateFiles = useCallback(
|
|
28464
28780
|
(files) => {
|
|
28465
28781
|
if (files.length > maxFiles) {
|
|
28466
|
-
return { valid: [], error:
|
|
28782
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
28467
28783
|
}
|
|
28468
28784
|
if (accept) {
|
|
28469
|
-
const acceptedTypes = accept.split(",").map((
|
|
28785
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
28470
28786
|
const invalid = files.filter((file) => {
|
|
28471
28787
|
return !acceptedTypes.some((type) => {
|
|
28472
28788
|
if (type.endsWith("/*")) {
|
|
@@ -28476,7 +28792,7 @@ var init_UploadDropZone = __esm({
|
|
|
28476
28792
|
});
|
|
28477
28793
|
});
|
|
28478
28794
|
if (invalid.length > 0) {
|
|
28479
|
-
return { valid: [], error:
|
|
28795
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
28480
28796
|
}
|
|
28481
28797
|
}
|
|
28482
28798
|
if (maxSize) {
|
|
@@ -28484,13 +28800,13 @@ var init_UploadDropZone = __esm({
|
|
|
28484
28800
|
if (tooLarge.length > 0) {
|
|
28485
28801
|
return {
|
|
28486
28802
|
valid: [],
|
|
28487
|
-
error:
|
|
28803
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
28488
28804
|
};
|
|
28489
28805
|
}
|
|
28490
28806
|
}
|
|
28491
28807
|
return { valid: files, error: null };
|
|
28492
28808
|
},
|
|
28493
|
-
[accept, maxSize, maxFiles]
|
|
28809
|
+
[accept, maxSize, maxFiles, t]
|
|
28494
28810
|
);
|
|
28495
28811
|
const handleFiles = useCallback(
|
|
28496
28812
|
(files) => {
|
|
@@ -28561,7 +28877,7 @@ var init_UploadDropZone = __esm({
|
|
|
28561
28877
|
handleClick();
|
|
28562
28878
|
}
|
|
28563
28879
|
},
|
|
28564
|
-
"aria-label":
|
|
28880
|
+
"aria-label": resolvedLabel,
|
|
28565
28881
|
children: [
|
|
28566
28882
|
/* @__PURE__ */ jsx(
|
|
28567
28883
|
"input",
|
|
@@ -28577,7 +28893,7 @@ var init_UploadDropZone = __esm({
|
|
|
28577
28893
|
}
|
|
28578
28894
|
),
|
|
28579
28895
|
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" }),
|
|
28580
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
28896
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
28581
28897
|
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 })
|
|
28582
28898
|
]
|
|
28583
28899
|
}
|
|
@@ -28999,7 +29315,7 @@ function TableView({
|
|
|
28999
29315
|
{
|
|
29000
29316
|
checked: selected.has(id),
|
|
29001
29317
|
onChange: () => toggleRow(id),
|
|
29002
|
-
"aria-label":
|
|
29318
|
+
"aria-label": t("table.selectRow", { id })
|
|
29003
29319
|
}
|
|
29004
29320
|
) }),
|
|
29005
29321
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -31846,7 +32162,7 @@ var init_QrScanner = __esm({
|
|
|
31846
32162
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
31847
32163
|
children: [
|
|
31848
32164
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
31849
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32165
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
31850
32166
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
31851
32167
|
]
|
|
31852
32168
|
}
|
|
@@ -31857,7 +32173,7 @@ var init_QrScanner = __esm({
|
|
|
31857
32173
|
position: "absolute",
|
|
31858
32174
|
display: "flex",
|
|
31859
32175
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
31860
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32176
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
31861
32177
|
}
|
|
31862
32178
|
),
|
|
31863
32179
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -31876,7 +32192,7 @@ var init_QrScanner = __esm({
|
|
|
31876
32192
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31877
32193
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31878
32194
|
),
|
|
31879
|
-
"aria-label": isPaused ? "
|
|
32195
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
31880
32196
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
31881
32197
|
}
|
|
31882
32198
|
),
|
|
@@ -31889,7 +32205,7 @@ var init_QrScanner = __esm({
|
|
|
31889
32205
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
31890
32206
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31891
32207
|
),
|
|
31892
|
-
"aria-label":
|
|
32208
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
31893
32209
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31894
32210
|
}
|
|
31895
32211
|
),
|
|
@@ -31903,7 +32219,7 @@ var init_QrScanner = __esm({
|
|
|
31903
32219
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31904
32220
|
),
|
|
31905
32221
|
"aria-label": t("aria.mockScanDev"),
|
|
31906
|
-
children: "
|
|
32222
|
+
children: t("qrScanner.mockScan")
|
|
31907
32223
|
}
|
|
31908
32224
|
)
|
|
31909
32225
|
]
|
|
@@ -31921,6 +32237,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31921
32237
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
31922
32238
|
init_cn();
|
|
31923
32239
|
init_useEventBus();
|
|
32240
|
+
init_useTranslate();
|
|
31924
32241
|
init_Typography();
|
|
31925
32242
|
init_Box();
|
|
31926
32243
|
init_Label();
|
|
@@ -31930,36 +32247,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31930
32247
|
const sign = delta >= 0 ? "+" : "-";
|
|
31931
32248
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
31932
32249
|
};
|
|
31933
|
-
constraintHint = (constraint) => {
|
|
32250
|
+
constraintHint = (constraint, t) => {
|
|
31934
32251
|
if (constraint.type === "single") {
|
|
31935
|
-
return constraint.required ? "
|
|
32252
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
31936
32253
|
}
|
|
31937
32254
|
const { min, max } = constraint;
|
|
31938
32255
|
if (min && max) {
|
|
31939
|
-
return min === max ?
|
|
32256
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
31940
32257
|
}
|
|
31941
|
-
if (min) return
|
|
31942
|
-
if (max) return
|
|
31943
|
-
return "
|
|
32258
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32259
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32260
|
+
return t("optionConstraint.optional");
|
|
31944
32261
|
};
|
|
31945
|
-
validateSelection = (selected, constraint) => {
|
|
32262
|
+
validateSelection = (selected, constraint, t) => {
|
|
31946
32263
|
if (constraint.type === "single") {
|
|
31947
32264
|
if (constraint.required && selected.length === 0) {
|
|
31948
|
-
return "
|
|
32265
|
+
return t("optionConstraint.error.pickOne");
|
|
31949
32266
|
}
|
|
31950
32267
|
if (selected.length > 1) {
|
|
31951
|
-
return "
|
|
32268
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
31952
32269
|
}
|
|
31953
32270
|
return void 0;
|
|
31954
32271
|
}
|
|
31955
32272
|
const { min, max } = constraint;
|
|
31956
32273
|
if (min !== void 0 && selected.length < min) {
|
|
31957
32274
|
const remaining = min - selected.length;
|
|
31958
|
-
return
|
|
32275
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
31959
32276
|
}
|
|
31960
32277
|
if (max !== void 0 && selected.length > max) {
|
|
31961
32278
|
const excess = selected.length - max;
|
|
31962
|
-
return
|
|
32279
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
31963
32280
|
}
|
|
31964
32281
|
return void 0;
|
|
31965
32282
|
};
|
|
@@ -31976,8 +32293,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
31976
32293
|
className
|
|
31977
32294
|
}) => {
|
|
31978
32295
|
const eventBus = useEventBus();
|
|
31979
|
-
const
|
|
31980
|
-
const
|
|
32296
|
+
const { t } = useTranslate();
|
|
32297
|
+
const hint = constraintHint(constraint, t);
|
|
32298
|
+
const error = validateSelection(selected, constraint, t);
|
|
31981
32299
|
const inputName = `option-${groupId}`;
|
|
31982
32300
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
31983
32301
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32077,7 +32395,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32077
32395
|
variant: "caption",
|
|
32078
32396
|
color: "warning",
|
|
32079
32397
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32080
|
-
children: "
|
|
32398
|
+
children: t("optionConstraint.outOfStock")
|
|
32081
32399
|
}
|
|
32082
32400
|
)
|
|
32083
32401
|
]
|
|
@@ -32399,6 +32717,7 @@ function changeBlockType(block, type) {
|
|
|
32399
32717
|
return { id: block.id, type, content: seed };
|
|
32400
32718
|
}
|
|
32401
32719
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32720
|
+
const { t } = useTranslate();
|
|
32402
32721
|
const [open, setOpen] = useState(false);
|
|
32403
32722
|
const ref = useRef(null);
|
|
32404
32723
|
useEffect(() => {
|
|
@@ -32418,7 +32737,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32418
32737
|
{
|
|
32419
32738
|
type: "button",
|
|
32420
32739
|
variant: "ghost",
|
|
32421
|
-
"aria-label": "
|
|
32740
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
32422
32741
|
className: cn(
|
|
32423
32742
|
"inline-flex items-center justify-center",
|
|
32424
32743
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -32440,7 +32759,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32440
32759
|
"py-1 text-sm"
|
|
32441
32760
|
),
|
|
32442
32761
|
children: [
|
|
32443
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
32762
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
32444
32763
|
/* @__PURE__ */ jsxs(
|
|
32445
32764
|
Button,
|
|
32446
32765
|
{
|
|
@@ -32454,7 +32773,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32454
32773
|
},
|
|
32455
32774
|
children: [
|
|
32456
32775
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
32457
|
-
"
|
|
32776
|
+
" ",
|
|
32777
|
+
t("richBlockEditor.duplicate")
|
|
32458
32778
|
]
|
|
32459
32779
|
}
|
|
32460
32780
|
),
|
|
@@ -32471,14 +32791,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32471
32791
|
},
|
|
32472
32792
|
children: [
|
|
32473
32793
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
32474
|
-
"
|
|
32794
|
+
" ",
|
|
32795
|
+
t("common.delete")
|
|
32475
32796
|
]
|
|
32476
32797
|
}
|
|
32477
32798
|
),
|
|
32478
32799
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32479
32800
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
32480
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
32481
|
-
CHANGEABLE_TYPES.filter((
|
|
32801
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
32802
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
32482
32803
|
Button,
|
|
32483
32804
|
{
|
|
32484
32805
|
type: "button",
|
|
@@ -32486,12 +32807,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
32486
32807
|
role: "menuitem",
|
|
32487
32808
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
32488
32809
|
onClick: () => {
|
|
32489
|
-
onChangeType(
|
|
32810
|
+
onChangeType(bt);
|
|
32490
32811
|
setOpen(false);
|
|
32491
32812
|
},
|
|
32492
|
-
children:
|
|
32813
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
32493
32814
|
},
|
|
32494
|
-
|
|
32815
|
+
bt
|
|
32495
32816
|
))
|
|
32496
32817
|
] })
|
|
32497
32818
|
]
|
|
@@ -32553,6 +32874,7 @@ function BlockRow({
|
|
|
32553
32874
|
onInsertAfter,
|
|
32554
32875
|
onChangeType
|
|
32555
32876
|
}) {
|
|
32877
|
+
const { t } = useTranslate();
|
|
32556
32878
|
const setContent = useCallback(
|
|
32557
32879
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32558
32880
|
[onUpdate]
|
|
@@ -32602,8 +32924,8 @@ function BlockRow({
|
|
|
32602
32924
|
tag: "h1",
|
|
32603
32925
|
value: block.content ?? "",
|
|
32604
32926
|
readOnly,
|
|
32605
|
-
placeholder: placeholder ?? "
|
|
32606
|
-
ariaLabel: "
|
|
32927
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
32928
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
32607
32929
|
className: "text-3xl font-bold leading-tight",
|
|
32608
32930
|
onValueChange: setContent
|
|
32609
32931
|
}
|
|
@@ -32615,8 +32937,8 @@ function BlockRow({
|
|
|
32615
32937
|
tag: "h2",
|
|
32616
32938
|
value: block.content ?? "",
|
|
32617
32939
|
readOnly,
|
|
32618
|
-
placeholder: placeholder ?? "
|
|
32619
|
-
ariaLabel: "
|
|
32940
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
32941
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
32620
32942
|
className: "text-2xl font-semibold leading-tight",
|
|
32621
32943
|
onValueChange: setContent
|
|
32622
32944
|
}
|
|
@@ -32628,8 +32950,8 @@ function BlockRow({
|
|
|
32628
32950
|
tag: "h3",
|
|
32629
32951
|
value: block.content ?? "",
|
|
32630
32952
|
readOnly,
|
|
32631
|
-
placeholder: placeholder ?? "
|
|
32632
|
-
ariaLabel: "
|
|
32953
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
32954
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
32633
32955
|
className: "text-xl font-semibold leading-tight",
|
|
32634
32956
|
onValueChange: setContent
|
|
32635
32957
|
}
|
|
@@ -32641,8 +32963,8 @@ function BlockRow({
|
|
|
32641
32963
|
tag: "blockquote",
|
|
32642
32964
|
value: block.content ?? "",
|
|
32643
32965
|
readOnly,
|
|
32644
|
-
placeholder: placeholder ?? "
|
|
32645
|
-
ariaLabel: "
|
|
32966
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
32967
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
32646
32968
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
32647
32969
|
onValueChange: setContent
|
|
32648
32970
|
}
|
|
@@ -32650,13 +32972,13 @@ function BlockRow({
|
|
|
32650
32972
|
case "code":
|
|
32651
32973
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
32652
32974
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
32653
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
32975
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
32654
32976
|
!readOnly && /* @__PURE__ */ jsx(
|
|
32655
32977
|
Input,
|
|
32656
32978
|
{
|
|
32657
32979
|
inputType: "text",
|
|
32658
32980
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
32659
|
-
"aria-label": "
|
|
32981
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
32660
32982
|
className: cn(
|
|
32661
32983
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
32662
32984
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32672,8 +32994,8 @@ function BlockRow({
|
|
|
32672
32994
|
tag: "pre",
|
|
32673
32995
|
value: block.content ?? "",
|
|
32674
32996
|
readOnly,
|
|
32675
|
-
placeholder: placeholder ?? "
|
|
32676
|
-
ariaLabel: "
|
|
32997
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
32998
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
32677
32999
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
32678
33000
|
onValueChange: setContent
|
|
32679
33001
|
}
|
|
@@ -32686,7 +33008,7 @@ function BlockRow({
|
|
|
32686
33008
|
const caption = String(block.metadata?.caption ?? "");
|
|
32687
33009
|
const imgProps = {
|
|
32688
33010
|
src: url,
|
|
32689
|
-
alt: caption || "
|
|
33011
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
32690
33012
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
32691
33013
|
};
|
|
32692
33014
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -32700,7 +33022,8 @@ function BlockRow({
|
|
|
32700
33022
|
),
|
|
32701
33023
|
children: [
|
|
32702
33024
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
32703
|
-
"
|
|
33025
|
+
" ",
|
|
33026
|
+
t("richBlockEditor.noImageUrl")
|
|
32704
33027
|
]
|
|
32705
33028
|
}
|
|
32706
33029
|
),
|
|
@@ -32711,7 +33034,7 @@ function BlockRow({
|
|
|
32711
33034
|
inputType: "url",
|
|
32712
33035
|
value: url,
|
|
32713
33036
|
placeholder: "https://example.com/image.png",
|
|
32714
|
-
"aria-label": "
|
|
33037
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
32715
33038
|
className: cn(
|
|
32716
33039
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32717
33040
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32724,8 +33047,8 @@ function BlockRow({
|
|
|
32724
33047
|
{
|
|
32725
33048
|
inputType: "text",
|
|
32726
33049
|
value: caption,
|
|
32727
|
-
placeholder: "
|
|
32728
|
-
"aria-label": "
|
|
33050
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33051
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
32729
33052
|
className: cn(
|
|
32730
33053
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
32731
33054
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -32756,8 +33079,8 @@ function BlockRow({
|
|
|
32756
33079
|
tag: "span",
|
|
32757
33080
|
value: child.content ?? "",
|
|
32758
33081
|
readOnly,
|
|
32759
|
-
placeholder: "
|
|
32760
|
-
ariaLabel: "
|
|
33082
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33083
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
32761
33084
|
className: "inline-block min-w-[1ch] flex-1",
|
|
32762
33085
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
32763
33086
|
}
|
|
@@ -32767,7 +33090,7 @@ function BlockRow({
|
|
|
32767
33090
|
{
|
|
32768
33091
|
type: "button",
|
|
32769
33092
|
variant: "ghost",
|
|
32770
|
-
"aria-label": "
|
|
33093
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
32771
33094
|
className: cn(
|
|
32772
33095
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
32773
33096
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -32789,7 +33112,8 @@ function BlockRow({
|
|
|
32789
33112
|
onClick: addListItem,
|
|
32790
33113
|
children: [
|
|
32791
33114
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
32792
|
-
"
|
|
33115
|
+
" ",
|
|
33116
|
+
t("richBlockEditor.addItem")
|
|
32793
33117
|
]
|
|
32794
33118
|
}
|
|
32795
33119
|
) })
|
|
@@ -32805,8 +33129,8 @@ function BlockRow({
|
|
|
32805
33129
|
tag: "p",
|
|
32806
33130
|
value: block.content ?? "",
|
|
32807
33131
|
readOnly,
|
|
32808
|
-
placeholder: placeholder ?? "
|
|
32809
|
-
ariaLabel: "
|
|
33132
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33133
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
32810
33134
|
className: "leading-7",
|
|
32811
33135
|
onValueChange: setContent
|
|
32812
33136
|
}
|
|
@@ -32829,7 +33153,7 @@ function BlockRow({
|
|
|
32829
33153
|
{
|
|
32830
33154
|
type: "button",
|
|
32831
33155
|
variant: "ghost",
|
|
32832
|
-
"aria-label": "
|
|
33156
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
32833
33157
|
className: cn(
|
|
32834
33158
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
32835
33159
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -32856,7 +33180,7 @@ function BlockRow({
|
|
|
32856
33180
|
}
|
|
32857
33181
|
);
|
|
32858
33182
|
}
|
|
32859
|
-
var TOOLBAR_ENTRIES,
|
|
33183
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
32860
33184
|
var init_RichBlockEditor = __esm({
|
|
32861
33185
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
32862
33186
|
"use client";
|
|
@@ -32869,29 +33193,30 @@ var init_RichBlockEditor = __esm({
|
|
|
32869
33193
|
init_Input();
|
|
32870
33194
|
init_Icon();
|
|
32871
33195
|
init_useEventBus();
|
|
33196
|
+
init_useTranslate();
|
|
32872
33197
|
TOOLBAR_ENTRIES = [
|
|
32873
|
-
{ type: "paragraph",
|
|
32874
|
-
{ type: "heading-1",
|
|
32875
|
-
{ type: "heading-2",
|
|
32876
|
-
{ type: "heading-3",
|
|
32877
|
-
{ type: "bullet-list",
|
|
32878
|
-
{ type: "numbered-list",
|
|
32879
|
-
{ type: "quote",
|
|
32880
|
-
{ type: "code",
|
|
32881
|
-
{ type: "divider",
|
|
32882
|
-
{ type: "image",
|
|
33198
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33199
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
33200
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
33201
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
33202
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
33203
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
33204
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
33205
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
33206
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
33207
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
32883
33208
|
];
|
|
32884
|
-
|
|
32885
|
-
paragraph: "
|
|
32886
|
-
"heading-1": "
|
|
32887
|
-
"heading-2": "
|
|
32888
|
-
"heading-3": "
|
|
32889
|
-
"bullet-list": "
|
|
32890
|
-
"numbered-list": "
|
|
32891
|
-
quote: "
|
|
32892
|
-
code: "
|
|
32893
|
-
divider: "
|
|
32894
|
-
image: "
|
|
33209
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33210
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33211
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33212
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33213
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33214
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33215
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33216
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33217
|
+
code: "richBlockEditor.blockType.code",
|
|
33218
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33219
|
+
image: "richBlockEditor.blockType.image"
|
|
32895
33220
|
};
|
|
32896
33221
|
CHANGEABLE_TYPES = [
|
|
32897
33222
|
"paragraph",
|
|
@@ -32925,6 +33250,7 @@ var init_RichBlockEditor = __esm({
|
|
|
32925
33250
|
showToolbar = true,
|
|
32926
33251
|
className
|
|
32927
33252
|
}) => {
|
|
33253
|
+
const { t } = useTranslate();
|
|
32928
33254
|
const [blocks, setBlocks] = useState(
|
|
32929
33255
|
() => normalizeBlocks(initialBlocks)
|
|
32930
33256
|
);
|
|
@@ -32996,25 +33322,26 @@ var init_RichBlockEditor = __esm({
|
|
|
32996
33322
|
Box,
|
|
32997
33323
|
{
|
|
32998
33324
|
role: "toolbar",
|
|
32999
|
-
"aria-label": "
|
|
33325
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33000
33326
|
className: cn(
|
|
33001
33327
|
"flex flex-wrap items-center gap-1",
|
|
33002
33328
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33003
33329
|
),
|
|
33004
33330
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33005
33331
|
const Icon3 = entry.icon;
|
|
33332
|
+
const entryLabel = t(entry.labelKey);
|
|
33006
33333
|
return /* @__PURE__ */ jsxs(
|
|
33007
33334
|
Button,
|
|
33008
33335
|
{
|
|
33009
33336
|
type: "button",
|
|
33010
33337
|
variant: "ghost",
|
|
33011
33338
|
size: "sm",
|
|
33012
|
-
"aria-label":
|
|
33013
|
-
title:
|
|
33339
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
33340
|
+
title: entryLabel,
|
|
33014
33341
|
onClick: () => handleAppend(entry.type),
|
|
33015
33342
|
children: [
|
|
33016
33343
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33017
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
33344
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33018
33345
|
]
|
|
33019
33346
|
},
|
|
33020
33347
|
entry.type
|
|
@@ -33057,6 +33384,7 @@ var init_ReplyTree = __esm({
|
|
|
33057
33384
|
"use client";
|
|
33058
33385
|
init_cn();
|
|
33059
33386
|
init_useEventBus();
|
|
33387
|
+
init_useTranslate();
|
|
33060
33388
|
init_atoms2();
|
|
33061
33389
|
init_VoteStack();
|
|
33062
33390
|
ReplyTreeNode = ({
|
|
@@ -33076,6 +33404,7 @@ var init_ReplyTree = __esm({
|
|
|
33076
33404
|
showActions
|
|
33077
33405
|
}) => {
|
|
33078
33406
|
const eventBus = useEventBus();
|
|
33407
|
+
const { t } = useTranslate();
|
|
33079
33408
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33080
33409
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33081
33410
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33122,7 +33451,7 @@ var init_ReplyTree = __esm({
|
|
|
33122
33451
|
variant: "ghost",
|
|
33123
33452
|
size: "sm",
|
|
33124
33453
|
onClick: handleToggle,
|
|
33125
|
-
"aria-label": isCollapsed ? "
|
|
33454
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33126
33455
|
"aria-expanded": !isCollapsed,
|
|
33127
33456
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33128
33457
|
className: cn(
|
|
@@ -33163,7 +33492,7 @@ var init_ReplyTree = __esm({
|
|
|
33163
33492
|
onVote: handleVote,
|
|
33164
33493
|
size: "sm",
|
|
33165
33494
|
variant: "horizontal",
|
|
33166
|
-
label:
|
|
33495
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33167
33496
|
}
|
|
33168
33497
|
),
|
|
33169
33498
|
/* @__PURE__ */ jsx(
|
|
@@ -33173,8 +33502,8 @@ var init_ReplyTree = __esm({
|
|
|
33173
33502
|
size: "sm",
|
|
33174
33503
|
leftIcon: "message-square",
|
|
33175
33504
|
onClick: handleReply,
|
|
33176
|
-
"aria-label":
|
|
33177
|
-
children: "
|
|
33505
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
33506
|
+
children: t("replyTree.reply")
|
|
33178
33507
|
}
|
|
33179
33508
|
),
|
|
33180
33509
|
/* @__PURE__ */ jsx(
|
|
@@ -33184,8 +33513,8 @@ var init_ReplyTree = __esm({
|
|
|
33184
33513
|
size: "sm",
|
|
33185
33514
|
leftIcon: "flag",
|
|
33186
33515
|
onClick: handleFlag,
|
|
33187
|
-
"aria-label":
|
|
33188
|
-
children: "
|
|
33516
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
33517
|
+
children: t("replyTree.flag")
|
|
33189
33518
|
}
|
|
33190
33519
|
)
|
|
33191
33520
|
] }),
|
|
@@ -33196,9 +33525,9 @@ var init_ReplyTree = __esm({
|
|
|
33196
33525
|
inputType: "textarea",
|
|
33197
33526
|
rows: 2,
|
|
33198
33527
|
value: draft,
|
|
33199
|
-
placeholder:
|
|
33528
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33200
33529
|
onChange: (e) => setDraft(e.target.value),
|
|
33201
|
-
"aria-label":
|
|
33530
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33202
33531
|
}
|
|
33203
33532
|
),
|
|
33204
33533
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33210,10 +33539,10 @@ var init_ReplyTree = __esm({
|
|
|
33210
33539
|
leftIcon: "send",
|
|
33211
33540
|
onClick: handleSubmitReply,
|
|
33212
33541
|
disabled: !draft.trim(),
|
|
33213
|
-
children: "
|
|
33542
|
+
children: t("replyTree.send")
|
|
33214
33543
|
}
|
|
33215
33544
|
),
|
|
33216
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
33545
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33217
33546
|
] })
|
|
33218
33547
|
] }),
|
|
33219
33548
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33227,7 +33556,7 @@ var init_ReplyTree = __esm({
|
|
|
33227
33556
|
"self-start gap-1 px-0 h-auto",
|
|
33228
33557
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33229
33558
|
),
|
|
33230
|
-
children: "
|
|
33559
|
+
children: t("replyTree.continueThread")
|
|
33231
33560
|
}
|
|
33232
33561
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33233
33562
|
ReplyTreeNode,
|
|
@@ -33266,6 +33595,7 @@ var init_ReplyTree = __esm({
|
|
|
33266
33595
|
showActions = true,
|
|
33267
33596
|
className
|
|
33268
33597
|
}) => {
|
|
33598
|
+
const { t } = useTranslate();
|
|
33269
33599
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33270
33600
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33271
33601
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33284,7 +33614,7 @@ var init_ReplyTree = __esm({
|
|
|
33284
33614
|
});
|
|
33285
33615
|
}, []);
|
|
33286
33616
|
if (nodeList.length === 0) {
|
|
33287
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
33617
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33288
33618
|
}
|
|
33289
33619
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33290
33620
|
ReplyTreeNode,
|
|
@@ -33362,6 +33692,7 @@ var init_VersionDiff = __esm({
|
|
|
33362
33692
|
"use client";
|
|
33363
33693
|
init_cn();
|
|
33364
33694
|
init_useEventBus();
|
|
33695
|
+
init_useTranslate();
|
|
33365
33696
|
init_atoms2();
|
|
33366
33697
|
init_Stack();
|
|
33367
33698
|
INLINE_STYLES = {
|
|
@@ -33384,6 +33715,7 @@ var init_VersionDiff = __esm({
|
|
|
33384
33715
|
language,
|
|
33385
33716
|
className
|
|
33386
33717
|
}) => {
|
|
33718
|
+
const { t } = useTranslate();
|
|
33387
33719
|
const eventBus = useEventBus();
|
|
33388
33720
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33389
33721
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -33465,24 +33797,24 @@ var init_VersionDiff = __esm({
|
|
|
33465
33797
|
children: [
|
|
33466
33798
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
33467
33799
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
33468
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
33800
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
33469
33801
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33470
33802
|
Select,
|
|
33471
33803
|
{
|
|
33472
33804
|
options,
|
|
33473
33805
|
value: activeBeforeId,
|
|
33474
33806
|
onChange: handleBeforeChange,
|
|
33475
|
-
"aria-label": "
|
|
33807
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
33476
33808
|
}
|
|
33477
33809
|
) }),
|
|
33478
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
33810
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
33479
33811
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
33480
33812
|
Select,
|
|
33481
33813
|
{
|
|
33482
33814
|
options,
|
|
33483
33815
|
value: activeAfterId,
|
|
33484
33816
|
onChange: handleAfterChange,
|
|
33485
|
-
"aria-label": "
|
|
33817
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
33486
33818
|
}
|
|
33487
33819
|
) }),
|
|
33488
33820
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -33503,7 +33835,7 @@ var init_VersionDiff = __esm({
|
|
|
33503
33835
|
size: "sm",
|
|
33504
33836
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
33505
33837
|
onClick: handleViewToggle,
|
|
33506
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
33838
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
33507
33839
|
}
|
|
33508
33840
|
),
|
|
33509
33841
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -33513,7 +33845,7 @@ var init_VersionDiff = __esm({
|
|
|
33513
33845
|
size: "sm",
|
|
33514
33846
|
icon: "rotate-ccw",
|
|
33515
33847
|
onClick: handleRevert,
|
|
33516
|
-
children: "
|
|
33848
|
+
children: t("versionDiff.revert")
|
|
33517
33849
|
}
|
|
33518
33850
|
)
|
|
33519
33851
|
] })
|
|
@@ -33530,12 +33862,12 @@ var init_VersionDiff = __esm({
|
|
|
33530
33862
|
children: [
|
|
33531
33863
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33532
33864
|
beforeRev?.label,
|
|
33533
|
-
beforeRev?.author ?
|
|
33865
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
33534
33866
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
33535
33867
|
] }),
|
|
33536
33868
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
33537
33869
|
afterRev?.label,
|
|
33538
|
-
afterRev?.author ?
|
|
33870
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
33539
33871
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
33540
33872
|
] })
|
|
33541
33873
|
]
|
|
@@ -33928,10 +34260,12 @@ var init_DocPagination = __esm({
|
|
|
33928
34260
|
}
|
|
33929
34261
|
});
|
|
33930
34262
|
function DocSearch({
|
|
33931
|
-
placeholder
|
|
34263
|
+
placeholder,
|
|
33932
34264
|
onSearch,
|
|
33933
34265
|
className
|
|
33934
34266
|
}) {
|
|
34267
|
+
const { t } = useTranslate();
|
|
34268
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
33935
34269
|
const [query, setQuery] = useState("");
|
|
33936
34270
|
const [results, setResults] = useState([]);
|
|
33937
34271
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34038,7 +34372,7 @@ function DocSearch({
|
|
|
34038
34372
|
Input,
|
|
34039
34373
|
{
|
|
34040
34374
|
inputType: "search",
|
|
34041
|
-
placeholder,
|
|
34375
|
+
placeholder: resolvedPlaceholder,
|
|
34042
34376
|
value: query,
|
|
34043
34377
|
onChange: handleChange,
|
|
34044
34378
|
onFocus: handleFocus,
|
|
@@ -34103,6 +34437,7 @@ var init_DocSearch = __esm({
|
|
|
34103
34437
|
init_Typography();
|
|
34104
34438
|
init_Icon();
|
|
34105
34439
|
init_Input();
|
|
34440
|
+
init_useTranslate();
|
|
34106
34441
|
}
|
|
34107
34442
|
});
|
|
34108
34443
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36235,8 +36570,8 @@ var init_SignaturePad = __esm({
|
|
|
36235
36570
|
init_useEventBus();
|
|
36236
36571
|
init_useTranslate();
|
|
36237
36572
|
SignaturePad = ({
|
|
36238
|
-
label
|
|
36239
|
-
helperText
|
|
36573
|
+
label,
|
|
36574
|
+
helperText,
|
|
36240
36575
|
strokeColor,
|
|
36241
36576
|
strokeWidth = 2,
|
|
36242
36577
|
height = 200,
|
|
@@ -36252,6 +36587,8 @@ var init_SignaturePad = __esm({
|
|
|
36252
36587
|
}) => {
|
|
36253
36588
|
const eventBus = useEventBus();
|
|
36254
36589
|
const { t } = useTranslate();
|
|
36590
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36591
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36255
36592
|
const canvasRef = useRef(null);
|
|
36256
36593
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36257
36594
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36354,7 +36691,7 @@ var init_SignaturePad = __esm({
|
|
|
36354
36691
|
);
|
|
36355
36692
|
}
|
|
36356
36693
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36357
|
-
|
|
36694
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36358
36695
|
/* @__PURE__ */ jsx(
|
|
36359
36696
|
Box,
|
|
36360
36697
|
{
|
|
@@ -36383,7 +36720,7 @@ var init_SignaturePad = __esm({
|
|
|
36383
36720
|
)
|
|
36384
36721
|
}
|
|
36385
36722
|
),
|
|
36386
|
-
|
|
36723
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36387
36724
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36388
36725
|
/* @__PURE__ */ jsx(
|
|
36389
36726
|
Button,
|
|
@@ -36393,7 +36730,7 @@ var init_SignaturePad = __esm({
|
|
|
36393
36730
|
icon: Eraser,
|
|
36394
36731
|
onClick: clearSignature,
|
|
36395
36732
|
disabled: !hasSignature,
|
|
36396
|
-
children: "
|
|
36733
|
+
children: t("signaturePad.clear")
|
|
36397
36734
|
}
|
|
36398
36735
|
),
|
|
36399
36736
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36404,7 +36741,7 @@ var init_SignaturePad = __esm({
|
|
|
36404
36741
|
icon: Check,
|
|
36405
36742
|
onClick: confirmSignature,
|
|
36406
36743
|
disabled: !hasSignature,
|
|
36407
|
-
children: "
|
|
36744
|
+
children: t("signaturePad.confirm")
|
|
36408
36745
|
}
|
|
36409
36746
|
)
|
|
36410
36747
|
] })
|
|
@@ -41071,6 +41408,7 @@ function MasterDetail({
|
|
|
41071
41408
|
className,
|
|
41072
41409
|
...rest
|
|
41073
41410
|
}) {
|
|
41411
|
+
const { t } = useTranslate();
|
|
41074
41412
|
const loading = externalLoading ?? false;
|
|
41075
41413
|
const isLoading = externalIsLoading ?? false;
|
|
41076
41414
|
const error = externalError ?? null;
|
|
@@ -41083,8 +41421,8 @@ function MasterDetail({
|
|
|
41083
41421
|
isLoading: loading || isLoading,
|
|
41084
41422
|
error,
|
|
41085
41423
|
className,
|
|
41086
|
-
emptyTitle: "
|
|
41087
|
-
emptyDescription: "
|
|
41424
|
+
emptyTitle: t("table.empty.title"),
|
|
41425
|
+
emptyDescription: t("empty.createFirst"),
|
|
41088
41426
|
...rest
|
|
41089
41427
|
}
|
|
41090
41428
|
);
|
|
@@ -41093,6 +41431,7 @@ var init_MasterDetail = __esm({
|
|
|
41093
41431
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41094
41432
|
"use client";
|
|
41095
41433
|
init_DataTable();
|
|
41434
|
+
init_useTranslate();
|
|
41096
41435
|
MasterDetail.displayName = "MasterDetail";
|
|
41097
41436
|
}
|
|
41098
41437
|
});
|
|
@@ -41101,14 +41440,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41101
41440
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41102
41441
|
init_cn();
|
|
41103
41442
|
init_Typography();
|
|
41104
|
-
|
|
41105
|
-
|
|
41106
|
-
{
|
|
41107
|
-
|
|
41108
|
-
|
|
41109
|
-
|
|
41110
|
-
|
|
41111
|
-
|
|
41443
|
+
init_useTranslate();
|
|
41444
|
+
DefaultEmptyDetail = () => {
|
|
41445
|
+
const { t } = useTranslate();
|
|
41446
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
41447
|
+
Typography,
|
|
41448
|
+
{
|
|
41449
|
+
variant: "body2",
|
|
41450
|
+
className: "text-muted-foreground",
|
|
41451
|
+
children: t("masterDetail.selectItem")
|
|
41452
|
+
}
|
|
41453
|
+
) });
|
|
41454
|
+
};
|
|
41112
41455
|
MasterDetailLayout = ({
|
|
41113
41456
|
master,
|
|
41114
41457
|
detail,
|
|
@@ -41235,7 +41578,7 @@ var init_MediaGallery = __esm({
|
|
|
41235
41578
|
{
|
|
41236
41579
|
icon: Image$1,
|
|
41237
41580
|
title: t("display.noMedia"),
|
|
41238
|
-
description: "
|
|
41581
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41239
41582
|
className
|
|
41240
41583
|
}
|
|
41241
41584
|
);
|
|
@@ -41252,7 +41595,7 @@ var init_MediaGallery = __esm({
|
|
|
41252
41595
|
size: "sm",
|
|
41253
41596
|
icon: Upload,
|
|
41254
41597
|
action: "MEDIA_UPLOAD",
|
|
41255
|
-
children: "
|
|
41598
|
+
children: t("mediaGallery.upload")
|
|
41256
41599
|
}
|
|
41257
41600
|
),
|
|
41258
41601
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41266,10 +41609,7 @@ var init_MediaGallery = __esm({
|
|
|
41266
41609
|
))
|
|
41267
41610
|
] })
|
|
41268
41611
|
] }),
|
|
41269
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41270
|
-
selectedItems.length,
|
|
41271
|
-
" selected"
|
|
41272
|
-
] }) }),
|
|
41612
|
+
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 }) }) }),
|
|
41273
41613
|
/* @__PURE__ */ jsx(
|
|
41274
41614
|
Box,
|
|
41275
41615
|
{
|
|
@@ -42262,7 +42602,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42262
42602
|
EmptyState,
|
|
42263
42603
|
{
|
|
42264
42604
|
title: t("debug.noActiveTraits"),
|
|
42265
|
-
description: "
|
|
42605
|
+
description: t("debug.traitsMountHint"),
|
|
42266
42606
|
className: "py-8"
|
|
42267
42607
|
}
|
|
42268
42608
|
);
|
|
@@ -42272,14 +42612,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42272
42612
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42273
42613
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42274
42614
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42275
|
-
/* @__PURE__ */
|
|
42276
|
-
trait.transitionCount,
|
|
42277
|
-
" transitions"
|
|
42278
|
-
] })
|
|
42615
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42279
42616
|
] }),
|
|
42280
42617
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42281
42618
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42282
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42619
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42283
42620
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42284
42621
|
Badge,
|
|
42285
42622
|
{
|
|
@@ -42291,7 +42628,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42291
42628
|
)) })
|
|
42292
42629
|
] }),
|
|
42293
42630
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42294
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42631
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42295
42632
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42296
42633
|
t2.from,
|
|
42297
42634
|
" \u2192 ",
|
|
@@ -42310,7 +42647,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42310
42647
|
] }, i)) })
|
|
42311
42648
|
] }),
|
|
42312
42649
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42313
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42650
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42314
42651
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42315
42652
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42316
42653
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42416,7 +42753,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42416
42753
|
EmptyState,
|
|
42417
42754
|
{
|
|
42418
42755
|
title: t("debug.noEntityData"),
|
|
42419
|
-
description: "
|
|
42756
|
+
description: t("debug.debugModeHint"),
|
|
42420
42757
|
className: "py-8"
|
|
42421
42758
|
}
|
|
42422
42759
|
);
|
|
@@ -42429,7 +42766,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42429
42766
|
EmptyState,
|
|
42430
42767
|
{
|
|
42431
42768
|
title: t("debug.noEntities"),
|
|
42432
|
-
description: "
|
|
42769
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42433
42770
|
className: "py-8"
|
|
42434
42771
|
}
|
|
42435
42772
|
);
|
|
@@ -42437,7 +42774,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42437
42774
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42438
42775
|
id: `singleton-${name}`,
|
|
42439
42776
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42440
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42777
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42441
42778
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42442
42779
|
] }),
|
|
42443
42780
|
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) })
|
|
@@ -42455,31 +42792,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42455
42792
|
}));
|
|
42456
42793
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42457
42794
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42458
|
-
/* @__PURE__ */
|
|
42459
|
-
"Singletons (",
|
|
42460
|
-
singletonItems.length,
|
|
42461
|
-
")"
|
|
42462
|
-
] }),
|
|
42795
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42463
42796
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42464
42797
|
] }),
|
|
42465
42798
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42466
|
-
/* @__PURE__ */
|
|
42467
|
-
"Runtime (",
|
|
42468
|
-
runtimeEntities.length,
|
|
42469
|
-
")"
|
|
42470
|
-
] }),
|
|
42799
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42471
42800
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42472
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42473
|
-
"+",
|
|
42474
|
-
runtimeEntities.length - 20,
|
|
42475
|
-
" more entities"
|
|
42476
|
-
] })
|
|
42801
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42477
42802
|
] }),
|
|
42478
42803
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42479
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42804
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42480
42805
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42481
42806
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42482
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
42807
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42483
42808
|
] }, type)) })
|
|
42484
42809
|
] })
|
|
42485
42810
|
] });
|
|
@@ -42523,7 +42848,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42523
42848
|
EmptyState,
|
|
42524
42849
|
{
|
|
42525
42850
|
title: t("debug.noEventsYet"),
|
|
42526
|
-
description: "
|
|
42851
|
+
description: t("debug.eventsExecuteHint"),
|
|
42527
42852
|
className: "py-8"
|
|
42528
42853
|
}
|
|
42529
42854
|
);
|
|
@@ -42534,17 +42859,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42534
42859
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42535
42860
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42536
42861
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42537
|
-
/* @__PURE__ */
|
|
42862
|
+
/* @__PURE__ */ jsx(
|
|
42538
42863
|
Button,
|
|
42539
42864
|
{
|
|
42540
42865
|
size: "sm",
|
|
42541
42866
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42542
42867
|
onClick: () => setFilter("all"),
|
|
42543
|
-
children:
|
|
42544
|
-
"All (",
|
|
42545
|
-
events2.length,
|
|
42546
|
-
")"
|
|
42547
|
-
]
|
|
42868
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42548
42869
|
}
|
|
42549
42870
|
),
|
|
42550
42871
|
eventTypes.map((type) => {
|
|
@@ -42574,7 +42895,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42574
42895
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42575
42896
|
}
|
|
42576
42897
|
),
|
|
42577
|
-
"
|
|
42898
|
+
t("debug.autoScroll")
|
|
42578
42899
|
] })
|
|
42579
42900
|
] }),
|
|
42580
42901
|
/* @__PURE__ */ jsx(
|
|
@@ -42632,7 +42953,7 @@ function GuardsPanel({ guards }) {
|
|
|
42632
42953
|
EmptyState,
|
|
42633
42954
|
{
|
|
42634
42955
|
title: t("debug.noGuardEvaluations"),
|
|
42635
|
-
description: "
|
|
42956
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42636
42957
|
className: "py-8"
|
|
42637
42958
|
}
|
|
42638
42959
|
);
|
|
@@ -42663,15 +42984,15 @@ function GuardsPanel({ guards }) {
|
|
|
42663
42984
|
] }),
|
|
42664
42985
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42665
42986
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42666
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42987
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42667
42988
|
/* @__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 })
|
|
42668
42989
|
] }),
|
|
42669
42990
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42670
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42991
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42671
42992
|
/* @__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) })
|
|
42672
42993
|
] }),
|
|
42673
42994
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42674
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
42995
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42675
42996
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42676
42997
|
] })
|
|
42677
42998
|
] })
|
|
@@ -42689,9 +43010,9 @@ function GuardsPanel({ guards }) {
|
|
|
42689
43010
|
] })
|
|
42690
43011
|
] }),
|
|
42691
43012
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42692
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42693
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42694
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
43013
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
43014
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
43015
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42695
43016
|
] })
|
|
42696
43017
|
] }),
|
|
42697
43018
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -42817,7 +43138,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42817
43138
|
EmptyState,
|
|
42818
43139
|
{
|
|
42819
43140
|
title: t("debug.noTransitionsRecorded"),
|
|
42820
|
-
description: "
|
|
43141
|
+
description: t("debug.transitionsProcessHint"),
|
|
42821
43142
|
className: "py-8"
|
|
42822
43143
|
}
|
|
42823
43144
|
);
|
|
@@ -42834,10 +43155,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42834
43155
|
const sorted = [...transitions].reverse();
|
|
42835
43156
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
42836
43157
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
42837
|
-
/* @__PURE__ */
|
|
42838
|
-
transitions.length,
|
|
42839
|
-
" transitions recorded"
|
|
42840
|
-
] }),
|
|
43158
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
42841
43159
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
42842
43160
|
/* @__PURE__ */ jsx(
|
|
42843
43161
|
Checkbox,
|
|
@@ -42846,7 +43164,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
42846
43164
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42847
43165
|
}
|
|
42848
43166
|
),
|
|
42849
|
-
"
|
|
43167
|
+
t("debug.autoScroll")
|
|
42850
43168
|
] })
|
|
42851
43169
|
] }),
|
|
42852
43170
|
/* @__PURE__ */ jsx(
|
|
@@ -42889,15 +43207,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
42889
43207
|
variant: trace.guardResult ? "success" : "danger",
|
|
42890
43208
|
size: "sm",
|
|
42891
43209
|
children: [
|
|
42892
|
-
"
|
|
43210
|
+
t("debug.guardLabel"),
|
|
43211
|
+
" ",
|
|
42893
43212
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
42894
43213
|
]
|
|
42895
43214
|
}
|
|
42896
43215
|
),
|
|
42897
|
-
/* @__PURE__ */
|
|
42898
|
-
trace.effects.length,
|
|
42899
|
-
" effects"
|
|
42900
|
-
] })
|
|
43216
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
42901
43217
|
] }),
|
|
42902
43218
|
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: [
|
|
42903
43219
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -42946,13 +43262,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42946
43262
|
EmptyState,
|
|
42947
43263
|
{
|
|
42948
43264
|
title: t("debug.noBridgeData"),
|
|
42949
|
-
description: "
|
|
43265
|
+
description: t("debug.bridgeInitHint"),
|
|
42950
43266
|
className: "py-8"
|
|
42951
43267
|
}
|
|
42952
43268
|
);
|
|
42953
43269
|
}
|
|
42954
43270
|
const formatTime4 = (ts) => {
|
|
42955
|
-
if (ts === 0) return "
|
|
43271
|
+
if (ts === 0) return t("debug.never");
|
|
42956
43272
|
const d = new Date(ts);
|
|
42957
43273
|
return d.toLocaleTimeString("en-US", {
|
|
42958
43274
|
hour12: false,
|
|
@@ -42965,14 +43281,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
42965
43281
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
42966
43282
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
42967
43283
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
42968
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43284
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
42969
43285
|
] }),
|
|
42970
43286
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
42971
43287
|
/* @__PURE__ */ jsx(
|
|
42972
43288
|
StatRow,
|
|
42973
43289
|
{
|
|
42974
43290
|
label: t("debug.status"),
|
|
42975
|
-
value: bridge.connected ? "
|
|
43291
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
42976
43292
|
variant: bridge.connected ? "success" : "danger"
|
|
42977
43293
|
}
|
|
42978
43294
|
),
|
|
@@ -43000,13 +43316,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43000
43316
|
] })
|
|
43001
43317
|
] }),
|
|
43002
43318
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
43003
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43319
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
43004
43320
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
43005
43321
|
] }),
|
|
43006
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
43007
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
43008
|
-
" total events processed"
|
|
43009
|
-
] }) })
|
|
43322
|
+
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 }) }) })
|
|
43010
43323
|
] }) });
|
|
43011
43324
|
}
|
|
43012
43325
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43116,7 +43429,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43116
43429
|
EmptyState,
|
|
43117
43430
|
{
|
|
43118
43431
|
title: t("debug.noActiveTraits"),
|
|
43119
|
-
description: "
|
|
43432
|
+
description: t("debug.traitsInitHint"),
|
|
43120
43433
|
className: "py-8"
|
|
43121
43434
|
}
|
|
43122
43435
|
);
|
|
@@ -43133,7 +43446,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43133
43446
|
};
|
|
43134
43447
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43135
43448
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43136
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43449
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
43137
43450
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43138
43451
|
trait.name,
|
|
43139
43452
|
": ",
|
|
@@ -43141,8 +43454,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43141
43454
|
] }, trait.id)) })
|
|
43142
43455
|
] }),
|
|
43143
43456
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43144
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43145
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43457
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43458
|
+
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: [
|
|
43146
43459
|
/* @__PURE__ */ jsx(
|
|
43147
43460
|
Button,
|
|
43148
43461
|
{
|
|
@@ -43154,15 +43467,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43154
43467
|
}
|
|
43155
43468
|
),
|
|
43156
43469
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43157
|
-
transitions.some((
|
|
43470
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43158
43471
|
] }, event)) })
|
|
43159
43472
|
] }),
|
|
43160
43473
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43161
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43474
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43162
43475
|
/* @__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)) })
|
|
43163
43476
|
] }),
|
|
43164
43477
|
log18.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
43165
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43478
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43166
43479
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log18.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43167
43480
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43168
43481
|
" ",
|
|
@@ -43193,21 +43506,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43193
43506
|
}
|
|
43194
43507
|
});
|
|
43195
43508
|
function ServerResponseRow({ sr }) {
|
|
43509
|
+
const { t } = useTranslate();
|
|
43196
43510
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43197
43511
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43198
43512
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43199
43513
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43200
43514
|
sr.success ? "\u2713" : "\u2717",
|
|
43201
|
-
"
|
|
43515
|
+
" ",
|
|
43516
|
+
t("debug.server")
|
|
43202
43517
|
] }),
|
|
43203
43518
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43204
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
43205
|
-
sr.clientEffects,
|
|
43206
|
-
" clientEffect",
|
|
43207
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43208
|
-
] }),
|
|
43519
|
+
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 }) }),
|
|
43209
43520
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43210
|
-
"
|
|
43521
|
+
t("debug.emitLabel"),
|
|
43522
|
+
" ",
|
|
43211
43523
|
sr.emittedEvents.join(", ")
|
|
43212
43524
|
] }),
|
|
43213
43525
|
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 })
|
|
@@ -43215,13 +43527,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43215
43527
|
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: [
|
|
43216
43528
|
name,
|
|
43217
43529
|
": ",
|
|
43218
|
-
count
|
|
43219
|
-
" row",
|
|
43220
|
-
count !== 1 ? "s" : ""
|
|
43530
|
+
t("debug.rowsCount", { count })
|
|
43221
43531
|
] }, name)) })
|
|
43222
43532
|
] });
|
|
43223
43533
|
}
|
|
43224
43534
|
function TransitionRow({ trace }) {
|
|
43535
|
+
const { t } = useTranslate();
|
|
43225
43536
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43226
43537
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43227
43538
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43229,7 +43540,7 @@ function TransitionRow({ trace }) {
|
|
|
43229
43540
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43230
43541
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43231
43542
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43232
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43543
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43233
43544
|
] }),
|
|
43234
43545
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43235
43546
|
] });
|
|
@@ -43270,6 +43581,7 @@ function VerifyModePanel({
|
|
|
43270
43581
|
serverCount,
|
|
43271
43582
|
localCount
|
|
43272
43583
|
}) {
|
|
43584
|
+
const { t } = useTranslate();
|
|
43273
43585
|
const [expanded, setExpanded] = React79.useState(true);
|
|
43274
43586
|
const scrollRef = React79.useRef(null);
|
|
43275
43587
|
const prevCountRef = React79.useRef(0);
|
|
@@ -43300,30 +43612,20 @@ function VerifyModePanel({
|
|
|
43300
43612
|
onClick: () => setExpanded((v) => !v),
|
|
43301
43613
|
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",
|
|
43302
43614
|
"aria-expanded": expanded,
|
|
43303
|
-
"aria-label": expanded ? "
|
|
43615
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43304
43616
|
"data-testid": "debugger-verify-toggle",
|
|
43305
43617
|
children: [
|
|
43306
43618
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43307
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43308
|
-
/* @__PURE__ */
|
|
43309
|
-
|
|
43310
|
-
" local"
|
|
43311
|
-
] }),
|
|
43312
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43313
|
-
serverCount,
|
|
43314
|
-
" server"
|
|
43315
|
-
] }),
|
|
43619
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43620
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43621
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43316
43622
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43317
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43318
|
-
transitions.length,
|
|
43319
|
-
" transition",
|
|
43320
|
-
transitions.length !== 1 ? "s" : ""
|
|
43321
|
-
] })
|
|
43623
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43322
43624
|
]
|
|
43323
43625
|
}
|
|
43324
43626
|
),
|
|
43325
43627
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43326
|
-
/* @__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: "
|
|
43628
|
+
/* @__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)) }) }) }),
|
|
43327
43629
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43328
43630
|
] })
|
|
43329
43631
|
]
|
|
@@ -43339,6 +43641,7 @@ function RuntimeDebugger({
|
|
|
43339
43641
|
defaultTab,
|
|
43340
43642
|
schema
|
|
43341
43643
|
}) {
|
|
43644
|
+
const { t } = useTranslate();
|
|
43342
43645
|
const [isCollapsed, setIsCollapsed] = React79.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43343
43646
|
const [isVisible, setIsVisible] = React79.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43344
43647
|
const debugData = useDebugData();
|
|
@@ -43377,55 +43680,55 @@ function RuntimeDebugger({
|
|
|
43377
43680
|
const tabItems = [
|
|
43378
43681
|
{
|
|
43379
43682
|
id: "dispatch",
|
|
43380
|
-
label: "
|
|
43683
|
+
label: t("debug.tabDispatch"),
|
|
43381
43684
|
badge: debugData.traits.length || void 0,
|
|
43382
43685
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43383
43686
|
},
|
|
43384
43687
|
{
|
|
43385
43688
|
id: "verify",
|
|
43386
|
-
label: failedChecks > 0 ? "
|
|
43689
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43387
43690
|
badge: verification.summary.totalChecks || void 0,
|
|
43388
43691
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43389
43692
|
},
|
|
43390
43693
|
{
|
|
43391
43694
|
id: "timeline",
|
|
43392
|
-
label: "
|
|
43695
|
+
label: t("debug.tabTimeline"),
|
|
43393
43696
|
badge: verification.transitions.length || void 0,
|
|
43394
43697
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43395
43698
|
},
|
|
43396
43699
|
{
|
|
43397
43700
|
id: "bridge",
|
|
43398
|
-
label: "
|
|
43701
|
+
label: t("debug.tabBridge"),
|
|
43399
43702
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43400
43703
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43401
43704
|
},
|
|
43402
43705
|
{
|
|
43403
43706
|
id: "traits",
|
|
43404
|
-
label: "
|
|
43707
|
+
label: t("debug.tabTraits"),
|
|
43405
43708
|
badge: debugData.traits.length || void 0,
|
|
43406
43709
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43407
43710
|
},
|
|
43408
43711
|
{
|
|
43409
43712
|
id: "ticks",
|
|
43410
|
-
label: "
|
|
43411
|
-
badge: debugData.ticks.filter((
|
|
43713
|
+
label: t("debug.tabTicks"),
|
|
43714
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43412
43715
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43413
43716
|
},
|
|
43414
43717
|
{
|
|
43415
43718
|
id: "entities",
|
|
43416
|
-
label: "
|
|
43719
|
+
label: t("debug.tabEntities"),
|
|
43417
43720
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43418
43721
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43419
43722
|
},
|
|
43420
43723
|
{
|
|
43421
43724
|
id: "events",
|
|
43422
|
-
label: "
|
|
43725
|
+
label: t("debug.tabEvents"),
|
|
43423
43726
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43424
43727
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43425
43728
|
},
|
|
43426
43729
|
{
|
|
43427
43730
|
id: "guards",
|
|
43428
|
-
label: "
|
|
43731
|
+
label: t("debug.tabGuards"),
|
|
43429
43732
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43430
43733
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43431
43734
|
}
|
|
@@ -43453,15 +43756,10 @@ function RuntimeDebugger({
|
|
|
43453
43756
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43454
43757
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43455
43758
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43456
|
-
"
|
|
43759
|
+
" ",
|
|
43760
|
+
t("debug.debugger")
|
|
43457
43761
|
] }),
|
|
43458
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43459
|
-
failedChecks,
|
|
43460
|
-
" failed"
|
|
43461
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43462
|
-
debugData.traits.length,
|
|
43463
|
-
" traits"
|
|
43464
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43762
|
+
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") })
|
|
43465
43763
|
] })
|
|
43466
43764
|
}
|
|
43467
43765
|
),
|
|
@@ -43479,9 +43777,9 @@ function RuntimeDebugger({
|
|
|
43479
43777
|
);
|
|
43480
43778
|
}
|
|
43481
43779
|
if (mode === "verify") {
|
|
43482
|
-
const traitStates = debugData.traits.map((
|
|
43483
|
-
const serverEntries = verification.transitions.filter((
|
|
43484
|
-
const localEntries = verification.transitions.filter((
|
|
43780
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43781
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43782
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43485
43783
|
return /* @__PURE__ */ jsx(
|
|
43486
43784
|
VerifyModePanel,
|
|
43487
43785
|
{
|
|
@@ -43513,7 +43811,7 @@ function RuntimeDebugger({
|
|
|
43513
43811
|
variant: "secondary",
|
|
43514
43812
|
size: "sm",
|
|
43515
43813
|
className: "runtime-debugger__toggle",
|
|
43516
|
-
title: "
|
|
43814
|
+
title: t("debug.openDebugger"),
|
|
43517
43815
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43518
43816
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43519
43817
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43523,11 +43821,8 @@ function RuntimeDebugger({
|
|
|
43523
43821
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43524
43822
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43525
43823
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43526
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43527
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43528
|
-
failedChecks,
|
|
43529
|
-
" failed"
|
|
43530
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
43824
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
43825
|
+
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") })
|
|
43531
43826
|
] }),
|
|
43532
43827
|
/* @__PURE__ */ jsx(
|
|
43533
43828
|
Button,
|
|
@@ -43535,7 +43830,7 @@ function RuntimeDebugger({
|
|
|
43535
43830
|
onClick: () => setIsCollapsed(true),
|
|
43536
43831
|
variant: "ghost",
|
|
43537
43832
|
size: "sm",
|
|
43538
|
-
title: "
|
|
43833
|
+
title: t("debug.close"),
|
|
43539
43834
|
children: "x"
|
|
43540
43835
|
}
|
|
43541
43836
|
)
|
|
@@ -43549,7 +43844,7 @@ function RuntimeDebugger({
|
|
|
43549
43844
|
className: "runtime-debugger__tabs"
|
|
43550
43845
|
}
|
|
43551
43846
|
) }),
|
|
43552
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
43847
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43553
43848
|
] })
|
|
43554
43849
|
}
|
|
43555
43850
|
);
|
|
@@ -43575,6 +43870,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43575
43870
|
init_TransitionTimeline();
|
|
43576
43871
|
init_ServerBridgeTab();
|
|
43577
43872
|
init_EventDispatcherTab();
|
|
43873
|
+
init_useTranslate();
|
|
43578
43874
|
init_RuntimeDebugger();
|
|
43579
43875
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43580
43876
|
}
|
|
@@ -44974,7 +45270,7 @@ var init_StatCard = __esm({
|
|
|
44974
45270
|
}
|
|
44975
45271
|
);
|
|
44976
45272
|
}
|
|
44977
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45273
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
44978
45274
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
44979
45275
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
44980
45276
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45017,7 +45313,7 @@ var init_StatCard = __esm({
|
|
|
45017
45313
|
]
|
|
45018
45314
|
}
|
|
45019
45315
|
),
|
|
45020
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45316
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
45021
45317
|
] }),
|
|
45022
45318
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45023
45319
|
] }),
|