@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/providers/index.js
CHANGED
|
@@ -1914,7 +1914,10 @@ var en_default;
|
|
|
1914
1914
|
var init_en = __esm({
|
|
1915
1915
|
"locales/en.json"() {
|
|
1916
1916
|
en_default = {
|
|
1917
|
-
$meta: {
|
|
1917
|
+
$meta: {
|
|
1918
|
+
locale: "en",
|
|
1919
|
+
direction: "ltr"
|
|
1920
|
+
},
|
|
1918
1921
|
"common.save": "Save",
|
|
1919
1922
|
"common.cancel": "Cancel",
|
|
1920
1923
|
"common.delete": "Delete",
|
|
@@ -2056,7 +2059,6 @@ var init_en = __esm({
|
|
|
2056
2059
|
"error.somethingWentWrong": "Something went wrong",
|
|
2057
2060
|
"error.loadingItems": "Loading items...",
|
|
2058
2061
|
"error.noItemsFound": "No items found",
|
|
2059
|
-
"error.notFound": "Not found",
|
|
2060
2062
|
"debug.noEntityData": "No entity data",
|
|
2061
2063
|
"debug.noEntities": "No entities",
|
|
2062
2064
|
"debug.noTicks": "No ticks registered",
|
|
@@ -2088,7 +2090,298 @@ var init_en = __esm({
|
|
|
2088
2090
|
"template.showcase": "Showcase",
|
|
2089
2091
|
"template.faq": "Frequently Asked Questions",
|
|
2090
2092
|
"template.ourTeam": "Our Team",
|
|
2091
|
-
"template.caseStudies": "Case Studies"
|
|
2093
|
+
"template.caseStudies": "Case Studies",
|
|
2094
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
2095
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
2096
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
2097
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
2098
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
2099
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
2100
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
2101
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
2102
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
2103
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
2104
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
2105
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
2106
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
2107
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
2108
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
2109
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
2110
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
2111
|
+
"richBlockEditor.blockType.code": "Code",
|
|
2112
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
2113
|
+
"richBlockEditor.blockType.image": "Image",
|
|
2114
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
2115
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
2116
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
2117
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
2118
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
2119
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
2120
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
2121
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
2122
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
2123
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
2124
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
2125
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
2126
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
2127
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
2128
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
2129
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
2130
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
2131
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
2132
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
2133
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
2134
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
2135
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
2136
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
2137
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
2138
|
+
"richBlockEditor.addItem": "Add item",
|
|
2139
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
2140
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
2141
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
2142
|
+
"versionDiff.compare": "Compare",
|
|
2143
|
+
"versionDiff.to": "to",
|
|
2144
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
2145
|
+
"versionDiff.afterRevision": "After revision",
|
|
2146
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
2147
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
2148
|
+
"versionDiff.revert": "Revert",
|
|
2149
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
2150
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
2151
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
2152
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
2153
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
2154
|
+
"violationAlert.adminLabel": "Admin:",
|
|
2155
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
2156
|
+
"violationAlert.goToField": "Go to field",
|
|
2157
|
+
"branchingLogic.title": "Branching logic",
|
|
2158
|
+
"branchingLogic.if": "If",
|
|
2159
|
+
"branchingLogic.goTo": "go to",
|
|
2160
|
+
"branchingLogic.rules": "Rules",
|
|
2161
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
2162
|
+
"branchingLogic.addRule": "Add rule",
|
|
2163
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
2164
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
2165
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
2166
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
2167
|
+
"branchingLogic.selectTarget": "Select target",
|
|
2168
|
+
"branchingLogic.selectValue": "Select value",
|
|
2169
|
+
"branchingLogic.addValue": "Add value",
|
|
2170
|
+
"branchingLogic.value": "Value",
|
|
2171
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
2172
|
+
"branchingLogic.operatorEquals": "equals",
|
|
2173
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
2174
|
+
"branchingLogic.operatorContains": "contains",
|
|
2175
|
+
"branchingLogic.operatorIn": "is one of",
|
|
2176
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
2177
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
2178
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
2179
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
2180
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
2181
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
2182
|
+
"filterGroup.filters": "Filters",
|
|
2183
|
+
"filterGroup.all": "All",
|
|
2184
|
+
"filterGroup.clear": "Clear",
|
|
2185
|
+
"filterGroup.clearAll": "Clear all",
|
|
2186
|
+
"filterGroup.from": "From",
|
|
2187
|
+
"filterGroup.to": "To",
|
|
2188
|
+
"filterGroup.allOf": "All {{label}}",
|
|
2189
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
2190
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
2191
|
+
"debug.expression": "Expression",
|
|
2192
|
+
"debug.inputs": "Inputs",
|
|
2193
|
+
"debug.trait": "Trait",
|
|
2194
|
+
"debug.filterAll": "All",
|
|
2195
|
+
"debug.filterPassed": "Passed",
|
|
2196
|
+
"debug.filterFailed": "Failed",
|
|
2197
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
2198
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
2199
|
+
"debug.activeStates": "Active States",
|
|
2200
|
+
"debug.availableEvents": "Available Events",
|
|
2201
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
2202
|
+
"debug.guarded": "guarded",
|
|
2203
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
2204
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
2205
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
2206
|
+
"debug.states": "States",
|
|
2207
|
+
"debug.transitions": "Transitions",
|
|
2208
|
+
"debug.guards": "Guards",
|
|
2209
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
2210
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
2211
|
+
"debug.singleton": "Singleton",
|
|
2212
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
2213
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
2214
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
2215
|
+
"debug.persistent": "Persistent",
|
|
2216
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
2217
|
+
"debug.notLoaded": "not loaded",
|
|
2218
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
2219
|
+
"debug.allCount": "All ({{count}})",
|
|
2220
|
+
"debug.autoScroll": "Auto-scroll",
|
|
2221
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
2222
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
2223
|
+
"debug.guardLabel": "guard:",
|
|
2224
|
+
"debug.effectsCount": "{{count}} effects",
|
|
2225
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
2226
|
+
"debug.never": "Never",
|
|
2227
|
+
"debug.connected": "Connected",
|
|
2228
|
+
"debug.disconnected": "Disconnected",
|
|
2229
|
+
"debug.lastError": "Last Error",
|
|
2230
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
2231
|
+
"debug.server": "server",
|
|
2232
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
2233
|
+
"debug.emitLabel": "emit:",
|
|
2234
|
+
"debug.rowsCount": "{{count}} rows",
|
|
2235
|
+
"debug.serverResponse": "server response",
|
|
2236
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
2237
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
2238
|
+
"debug.failCount": "{{count}} fail",
|
|
2239
|
+
"debug.ok": "OK",
|
|
2240
|
+
"debug.localCount": "{{count}} local",
|
|
2241
|
+
"debug.serverCount": "{{count}} server",
|
|
2242
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
2243
|
+
"debug.tabDispatch": "Dispatch",
|
|
2244
|
+
"debug.tabVerify": "Verify",
|
|
2245
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
2246
|
+
"debug.tabTimeline": "Timeline",
|
|
2247
|
+
"debug.tabBridge": "Bridge",
|
|
2248
|
+
"debug.tabTraits": "Traits",
|
|
2249
|
+
"debug.tabTicks": "Ticks",
|
|
2250
|
+
"debug.tabEntities": "Entities",
|
|
2251
|
+
"debug.tabEvents": "Events",
|
|
2252
|
+
"debug.tabGuards": "Guards",
|
|
2253
|
+
"debug.debugger": "Debugger",
|
|
2254
|
+
"debug.failedCount": "{{count}} failed",
|
|
2255
|
+
"debug.traitsCount": "{{count}} traits",
|
|
2256
|
+
"debug.idle": "Idle",
|
|
2257
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
2258
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
2259
|
+
"debug.allPassing": "All passing",
|
|
2260
|
+
"debug.runtime": "Runtime",
|
|
2261
|
+
"debug.close": "Close (`)",
|
|
2262
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
2263
|
+
"replyTree.expandReplies": "Expand replies",
|
|
2264
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
2265
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
2266
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
2267
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
2268
|
+
"replyTree.reply": "Reply",
|
|
2269
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
2270
|
+
"replyTree.flag": "Flag",
|
|
2271
|
+
"replyTree.send": "Send",
|
|
2272
|
+
"replyTree.continueThread": "Continue thread",
|
|
2273
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
2274
|
+
"signaturePad.label": "Signature",
|
|
2275
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
2276
|
+
"signaturePad.clear": "Clear",
|
|
2277
|
+
"signaturePad.confirm": "Confirm",
|
|
2278
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
2279
|
+
"qrScanner.paused": "Paused",
|
|
2280
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
2281
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
2282
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
2283
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
2284
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
2285
|
+
"docSearch.placeholder": "Search documentation...",
|
|
2286
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
2287
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
2288
|
+
"avl.trigger": "Trigger",
|
|
2289
|
+
"avl.guard": "Guard",
|
|
2290
|
+
"avl.effects": "Effects",
|
|
2291
|
+
"avl.props": "Props",
|
|
2292
|
+
"avl.entity": "Entity",
|
|
2293
|
+
"avl.traits": "Traits",
|
|
2294
|
+
"avl.transition": "Transition",
|
|
2295
|
+
"avl.onEntity": "on {{entity}}",
|
|
2296
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
2297
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
2298
|
+
"avl.zoomIn": "Zoom in",
|
|
2299
|
+
"avl.zoomOut": "Zoom out",
|
|
2300
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
2301
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
2302
|
+
"avl.noTraitData": "No trait data",
|
|
2303
|
+
"avl.computingLayout": "Computing layout...",
|
|
2304
|
+
"avl.noStateMachine": "No state machine",
|
|
2305
|
+
"avl.listensFor": "listens for {{event}}",
|
|
2306
|
+
"avl.emits": "emits {{event}}",
|
|
2307
|
+
"avl.pageLayout": "Page Layout",
|
|
2308
|
+
"avl.overlaySuffix": "(overlay)",
|
|
2309
|
+
"orbPreview.previewBadge": "Preview",
|
|
2310
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
2311
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
2312
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
2313
|
+
"orbPreview.noPreview": "No preview available",
|
|
2314
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
2315
|
+
"detailView.noTransitionData": "No transition data",
|
|
2316
|
+
"orbInspector.required": "req",
|
|
2317
|
+
"orbInspector.addField": "Add Field",
|
|
2318
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
2319
|
+
"orbInspector.standalone": "Standalone",
|
|
2320
|
+
"orbInspector.embedded": "Embedded",
|
|
2321
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
2322
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
2323
|
+
"orbInspector.addEffect": "Add Effect",
|
|
2324
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
2325
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
2326
|
+
"orbInspector.tokens": "Tokens",
|
|
2327
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
2328
|
+
"orbInspector.variant": "Variant",
|
|
2329
|
+
"orbInspector.size": "Size",
|
|
2330
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
2331
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
2332
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
2333
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
2334
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
2335
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
2336
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
2337
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
2338
|
+
"orbInspector.tab.styles": "Styles",
|
|
2339
|
+
"orbInspector.tab.code": "Code",
|
|
2340
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
2341
|
+
"canvas.overview": "Overview",
|
|
2342
|
+
"canvas.expanded": "Expanded",
|
|
2343
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
2344
|
+
"canvas.screensCount": "{{count}} screens",
|
|
2345
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
2346
|
+
"lawReference.viewFullText": "View full law text",
|
|
2347
|
+
"statCard.defaultLabel": "Stat",
|
|
2348
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
2349
|
+
"mediaGallery.upload": "Upload",
|
|
2350
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
2351
|
+
"pagination.jumpPlaceholder": "Page",
|
|
2352
|
+
"table.selectRow": "Select row {{id}}",
|
|
2353
|
+
"card.selectItem": "Select {{item}}",
|
|
2354
|
+
"card.itemFallback": "item",
|
|
2355
|
+
"fileTree.noFiles": "No files",
|
|
2356
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
2357
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
2358
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
2359
|
+
"upload.dropFilesHere": "Drop files here",
|
|
2360
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
2361
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
2362
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
2363
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
2364
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
2365
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
2366
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
2367
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
2368
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
2369
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
2370
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
2371
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
2372
|
+
"optionConstraint.optional": "Optional",
|
|
2373
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
2374
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
2375
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
2376
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
2377
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
2378
|
+
"stateMachine.pinned": "Pinned",
|
|
2379
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
2380
|
+
"stateMachine.externalEffects": "External Effects",
|
|
2381
|
+
"stateMachine.legend.initial": "Initial",
|
|
2382
|
+
"stateMachine.legend.final": "Final",
|
|
2383
|
+
"stateMachine.legend.state": "State",
|
|
2384
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
2092
2385
|
};
|
|
2093
2386
|
}
|
|
2094
2387
|
});
|
|
@@ -5176,6 +5469,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5176
5469
|
init_Typography();
|
|
5177
5470
|
init_Divider();
|
|
5178
5471
|
init_cn();
|
|
5472
|
+
init_useTranslate();
|
|
5179
5473
|
positionStyles2 = {
|
|
5180
5474
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5181
5475
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5194,6 +5488,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5194
5488
|
position = "top",
|
|
5195
5489
|
className
|
|
5196
5490
|
}) => {
|
|
5491
|
+
const { t } = useTranslate();
|
|
5197
5492
|
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
5198
5493
|
const timeoutRef = React85__default.useRef(null);
|
|
5199
5494
|
const handleMouseEnter = () => {
|
|
@@ -5277,7 +5572,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5277
5572
|
target: "_blank",
|
|
5278
5573
|
rel: "noopener noreferrer",
|
|
5279
5574
|
onClick: (e) => e.stopPropagation(),
|
|
5280
|
-
children: "
|
|
5575
|
+
children: t("lawReference.viewFullText")
|
|
5281
5576
|
}
|
|
5282
5577
|
)
|
|
5283
5578
|
] }),
|
|
@@ -13558,6 +13853,7 @@ var log7, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13558
13853
|
var init_BehaviorView = __esm({
|
|
13559
13854
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13560
13855
|
"use client";
|
|
13856
|
+
init_useTranslate();
|
|
13561
13857
|
init_AvlState();
|
|
13562
13858
|
init_AvlTransitionLane();
|
|
13563
13859
|
init_AvlSwimLane();
|
|
@@ -13567,6 +13863,7 @@ var init_BehaviorView = __esm({
|
|
|
13567
13863
|
SWIM_GUTTER = 120;
|
|
13568
13864
|
CENTER_W = 360;
|
|
13569
13865
|
BehaviorView = ({ data }) => {
|
|
13866
|
+
const { t } = useTranslate();
|
|
13570
13867
|
const [layout, setLayout] = useState(null);
|
|
13571
13868
|
const traitName = data.traits[0]?.name;
|
|
13572
13869
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13576,10 +13873,10 @@ var init_BehaviorView = __esm({
|
|
|
13576
13873
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log7.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
13577
13874
|
}, [dataKey]);
|
|
13578
13875
|
if (!traitData) {
|
|
13579
|
-
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: "
|
|
13876
|
+
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") });
|
|
13580
13877
|
}
|
|
13581
13878
|
if (!layout) {
|
|
13582
|
-
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: "
|
|
13879
|
+
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") });
|
|
13583
13880
|
}
|
|
13584
13881
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
13585
13882
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -13595,10 +13892,7 @@ var init_BehaviorView = __esm({
|
|
|
13595
13892
|
const machineHeight = scaledH + 100;
|
|
13596
13893
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
13597
13894
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
13598
|
-
/* @__PURE__ */
|
|
13599
|
-
"on ",
|
|
13600
|
-
traitData.linkedEntity
|
|
13601
|
-
] }),
|
|
13895
|
+
/* @__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 }) }),
|
|
13602
13896
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
13603
13897
|
/* @__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 }) }),
|
|
13604
13898
|
/* @__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 }) })
|
|
@@ -13906,7 +14200,7 @@ var init_CodeBlock = __esm({
|
|
|
13906
14200
|
const isLolo = language === "lolo";
|
|
13907
14201
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
13908
14202
|
const eventBus = useEventBus();
|
|
13909
|
-
const { t
|
|
14203
|
+
const { t } = useTranslate();
|
|
13910
14204
|
const scrollRef = useRef(null);
|
|
13911
14205
|
const codeRef = useRef(null);
|
|
13912
14206
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -14161,7 +14455,7 @@ var init_CodeBlock = __esm({
|
|
|
14161
14455
|
size: "sm",
|
|
14162
14456
|
onClick: handleCopy,
|
|
14163
14457
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
14164
|
-
"aria-label": "
|
|
14458
|
+
"aria-label": t("common.copy"),
|
|
14165
14459
|
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" })
|
|
14166
14460
|
}
|
|
14167
14461
|
)
|
|
@@ -14816,7 +15110,7 @@ var init_StateMachineView = __esm({
|
|
|
14816
15110
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14817
15111
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14818
15112
|
const isSingle2 = bundle.labels.length === 1;
|
|
14819
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
15113
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14820
15114
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
14821
15115
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
14822
15116
|
const cx = fromState.x;
|
|
@@ -14942,7 +15236,7 @@ var init_StateMachineView = __esm({
|
|
|
14942
15236
|
const controlX = midX + perpX;
|
|
14943
15237
|
const controlY = midY + perpY;
|
|
14944
15238
|
const isSingle = bundle.labels.length === 1;
|
|
14945
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
15239
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14946
15240
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
14947
15241
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
14948
15242
|
const curveMidpoint = {
|
|
@@ -15097,7 +15391,7 @@ var init_StateMachineView = __esm({
|
|
|
15097
15391
|
{
|
|
15098
15392
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
15099
15393
|
style: { backgroundColor: "var(--color-success)" },
|
|
15100
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
15394
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
15101
15395
|
}
|
|
15102
15396
|
),
|
|
15103
15397
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -15119,10 +15413,7 @@ var init_StateMachineView = __esm({
|
|
|
15119
15413
|
{
|
|
15120
15414
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
15121
15415
|
style: { backgroundColor: "var(--color-accent)" },
|
|
15122
|
-
children: /* @__PURE__ */
|
|
15123
|
-
bundle.labels.length,
|
|
15124
|
-
" events"
|
|
15125
|
-
] })
|
|
15416
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
15126
15417
|
}
|
|
15127
15418
|
)
|
|
15128
15419
|
]
|
|
@@ -15267,7 +15558,7 @@ var init_StateMachineView = __esm({
|
|
|
15267
15558
|
align: "center",
|
|
15268
15559
|
className: "mb-2",
|
|
15269
15560
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
15270
|
-
children: "
|
|
15561
|
+
children: t("stateMachine.externalEffects")
|
|
15271
15562
|
}
|
|
15272
15563
|
),
|
|
15273
15564
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -15287,10 +15578,10 @@ var init_StateMachineView = __esm({
|
|
|
15287
15578
|
Legend = ({ config, y }) => {
|
|
15288
15579
|
const { t } = useTranslate();
|
|
15289
15580
|
const items = [
|
|
15290
|
-
{ label: "
|
|
15291
|
-
{ label: "
|
|
15292
|
-
{ label: "
|
|
15293
|
-
{ label: "
|
|
15581
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15582
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
15583
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
15584
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
15294
15585
|
];
|
|
15295
15586
|
return /* @__PURE__ */ jsx(
|
|
15296
15587
|
HStack,
|
|
@@ -15305,8 +15596,8 @@ var init_StateMachineView = __esm({
|
|
|
15305
15596
|
{
|
|
15306
15597
|
className: "w-3 h-3 rounded-full",
|
|
15307
15598
|
style: {
|
|
15308
|
-
backgroundColor: item.
|
|
15309
|
-
border: item.
|
|
15599
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
15600
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
15310
15601
|
}
|
|
15311
15602
|
}
|
|
15312
15603
|
),
|
|
@@ -15318,7 +15609,7 @@ var init_StateMachineView = __esm({
|
|
|
15318
15609
|
children: item.label
|
|
15319
15610
|
}
|
|
15320
15611
|
)
|
|
15321
|
-
] }, item.
|
|
15612
|
+
] }, item.key))
|
|
15322
15613
|
}
|
|
15323
15614
|
);
|
|
15324
15615
|
};
|
|
@@ -16112,13 +16403,13 @@ var init_JazariStateMachine = __esm({
|
|
|
16112
16403
|
);
|
|
16113
16404
|
}, [resolvedTrait, entityFields]);
|
|
16114
16405
|
if (isLoading) {
|
|
16115
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
16406
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
16116
16407
|
}
|
|
16117
16408
|
if (error) {
|
|
16118
16409
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
16119
16410
|
}
|
|
16120
16411
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
16121
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
16412
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
16122
16413
|
}
|
|
16123
16414
|
return /* @__PURE__ */ jsx(
|
|
16124
16415
|
StateMachineView,
|
|
@@ -17162,13 +17453,13 @@ var init_LayoutPatterns = __esm({
|
|
|
17162
17453
|
function generateRuleId() {
|
|
17163
17454
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
17164
17455
|
}
|
|
17165
|
-
function questionsToOptions(questions,
|
|
17456
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
17166
17457
|
const opts = questions.map((q) => ({
|
|
17167
17458
|
value: q.id,
|
|
17168
17459
|
label: q.label
|
|
17169
17460
|
}));
|
|
17170
|
-
if (
|
|
17171
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
17461
|
+
if (endOfSurveyLabel !== null) {
|
|
17462
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
17172
17463
|
}
|
|
17173
17464
|
return opts;
|
|
17174
17465
|
}
|
|
@@ -17177,7 +17468,7 @@ function isRuleBroken(rule, questions) {
|
|
|
17177
17468
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
17178
17469
|
return !sourceExists || !targetExists;
|
|
17179
17470
|
}
|
|
17180
|
-
var END_OF_SURVEY,
|
|
17471
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
17181
17472
|
var init_BranchingLogicBuilder = __esm({
|
|
17182
17473
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
17183
17474
|
"use client";
|
|
@@ -17190,14 +17481,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17190
17481
|
init_FilterPill();
|
|
17191
17482
|
init_Box();
|
|
17192
17483
|
init_useEventBus();
|
|
17484
|
+
init_useTranslate();
|
|
17193
17485
|
init_cn();
|
|
17194
17486
|
END_OF_SURVEY = "end-of-survey";
|
|
17195
|
-
OPERATOR_OPTIONS = [
|
|
17196
|
-
{ value: "equals", label: "equals" },
|
|
17197
|
-
{ value: "not-equals", label: "does not equal" },
|
|
17198
|
-
{ value: "contains", label: "contains" },
|
|
17199
|
-
{ value: "in", label: "is one of" }
|
|
17200
|
-
];
|
|
17201
17487
|
RuleRow = ({
|
|
17202
17488
|
rule,
|
|
17203
17489
|
questions,
|
|
@@ -17206,8 +17492,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17206
17492
|
onChange,
|
|
17207
17493
|
onDelete
|
|
17208
17494
|
}) => {
|
|
17209
|
-
const
|
|
17210
|
-
const
|
|
17495
|
+
const { t } = useTranslate();
|
|
17496
|
+
const operatorOptions = useMemo(
|
|
17497
|
+
() => [
|
|
17498
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
17499
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
17500
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
17501
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
17502
|
+
],
|
|
17503
|
+
[t]
|
|
17504
|
+
);
|
|
17505
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
17506
|
+
const targetOptions = useMemo(
|
|
17507
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
17508
|
+
[questions, t]
|
|
17509
|
+
);
|
|
17211
17510
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
17212
17511
|
const valueOptions = useMemo(() => {
|
|
17213
17512
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -17252,22 +17551,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17252
17551
|
),
|
|
17253
17552
|
children: [
|
|
17254
17553
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
17255
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
17554
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
17256
17555
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17257
17556
|
Select,
|
|
17258
17557
|
{
|
|
17259
17558
|
options: sourceOptions,
|
|
17260
17559
|
value: rule.sourceQuestionId,
|
|
17261
|
-
placeholder: "
|
|
17560
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
17262
17561
|
onChange: handleSource,
|
|
17263
17562
|
disabled: readOnly,
|
|
17264
|
-
error: broken ? "
|
|
17563
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
17265
17564
|
}
|
|
17266
17565
|
) }),
|
|
17267
17566
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
17268
17567
|
Select,
|
|
17269
17568
|
{
|
|
17270
|
-
options:
|
|
17569
|
+
options: operatorOptions,
|
|
17271
17570
|
value: rule.operator,
|
|
17272
17571
|
onChange: handleOperator,
|
|
17273
17572
|
disabled: readOnly
|
|
@@ -17290,7 +17589,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17290
17589
|
{
|
|
17291
17590
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
17292
17591
|
value: "",
|
|
17293
|
-
placeholder: "
|
|
17592
|
+
placeholder: t("branchingLogic.addValue"),
|
|
17294
17593
|
onChange: handleAddChip,
|
|
17295
17594
|
disabled: readOnly
|
|
17296
17595
|
}
|
|
@@ -17298,7 +17597,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17298
17597
|
Input,
|
|
17299
17598
|
{
|
|
17300
17599
|
inputType: "text",
|
|
17301
|
-
placeholder: "
|
|
17600
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
17302
17601
|
value: "",
|
|
17303
17602
|
onKeyDown: (e) => {
|
|
17304
17603
|
if (e.key !== "Enter") return;
|
|
@@ -17316,7 +17615,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17316
17615
|
{
|
|
17317
17616
|
options: valueOptions,
|
|
17318
17617
|
value: scalarValue,
|
|
17319
|
-
placeholder: "
|
|
17618
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
17320
17619
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
17321
17620
|
disabled: readOnly
|
|
17322
17621
|
}
|
|
@@ -17324,7 +17623,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17324
17623
|
Input,
|
|
17325
17624
|
{
|
|
17326
17625
|
inputType: "text",
|
|
17327
|
-
placeholder: "
|
|
17626
|
+
placeholder: t("branchingLogic.value"),
|
|
17328
17627
|
value: scalarValue,
|
|
17329
17628
|
onChange: handleScalarValue,
|
|
17330
17629
|
disabled: readOnly
|
|
@@ -17332,17 +17631,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17332
17631
|
) }),
|
|
17333
17632
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
17334
17633
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
17335
|
-
"
|
|
17634
|
+
t("branchingLogic.goTo")
|
|
17336
17635
|
] }),
|
|
17337
17636
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17338
17637
|
Select,
|
|
17339
17638
|
{
|
|
17340
17639
|
options: targetOptions,
|
|
17341
17640
|
value: rule.targetQuestionId,
|
|
17342
|
-
placeholder: "
|
|
17641
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
17343
17642
|
onChange: handleTarget,
|
|
17344
17643
|
disabled: readOnly,
|
|
17345
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
17644
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
17346
17645
|
}
|
|
17347
17646
|
) }),
|
|
17348
17647
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -17354,11 +17653,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17354
17653
|
action: "DELETE_RULE",
|
|
17355
17654
|
actionPayload: { ruleId: rule.id },
|
|
17356
17655
|
onClick: onDelete,
|
|
17357
|
-
"aria-label": "
|
|
17656
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
17358
17657
|
}
|
|
17359
17658
|
)
|
|
17360
17659
|
] }),
|
|
17361
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
17660
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
17362
17661
|
]
|
|
17363
17662
|
}
|
|
17364
17663
|
);
|
|
@@ -17368,10 +17667,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17368
17667
|
NODE_GAP_Y = 80;
|
|
17369
17668
|
PADDING = 32;
|
|
17370
17669
|
LogicGraph = ({ questions, rules }) => {
|
|
17670
|
+
const { t } = useTranslate();
|
|
17671
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17371
17672
|
const layout = useMemo(() => {
|
|
17372
17673
|
const items = [
|
|
17373
17674
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
17374
|
-
{ id: END_OF_SURVEY, label:
|
|
17675
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
17375
17676
|
];
|
|
17376
17677
|
const positions = {};
|
|
17377
17678
|
items.forEach((item, i) => {
|
|
@@ -17383,14 +17684,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17383
17684
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
17384
17685
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
17385
17686
|
return { items, positions, width, height };
|
|
17386
|
-
}, [questions]);
|
|
17687
|
+
}, [questions, endOfSurveyLabel]);
|
|
17387
17688
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
17388
17689
|
"svg",
|
|
17389
17690
|
{
|
|
17390
17691
|
width: layout.width,
|
|
17391
17692
|
height: layout.height,
|
|
17392
17693
|
role: "img",
|
|
17393
|
-
"aria-label": "
|
|
17694
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
17394
17695
|
style: { display: "block" },
|
|
17395
17696
|
children: [
|
|
17396
17697
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -17498,6 +17799,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17498
17799
|
readOnly = false,
|
|
17499
17800
|
className
|
|
17500
17801
|
}) => {
|
|
17802
|
+
const { t } = useTranslate();
|
|
17501
17803
|
const eventBus = useEventBus();
|
|
17502
17804
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17503
17805
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17550,16 +17852,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17550
17852
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
17551
17853
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
17552
17854
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
17553
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
17855
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
17554
17856
|
/* @__PURE__ */ jsx(
|
|
17555
17857
|
Badge,
|
|
17556
17858
|
{
|
|
17557
17859
|
variant: "neutral",
|
|
17558
17860
|
size: "sm",
|
|
17559
|
-
label:
|
|
17861
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
17560
17862
|
}
|
|
17561
17863
|
),
|
|
17562
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17864
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
17865
|
+
Badge,
|
|
17866
|
+
{
|
|
17867
|
+
variant: "error",
|
|
17868
|
+
size: "sm",
|
|
17869
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
17870
|
+
}
|
|
17871
|
+
)
|
|
17563
17872
|
] }),
|
|
17564
17873
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
17565
17874
|
/* @__PURE__ */ jsx(
|
|
@@ -17570,7 +17879,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17570
17879
|
leftIcon: Pencil,
|
|
17571
17880
|
action: "VIEW_EDIT",
|
|
17572
17881
|
onClick: () => setView("edit"),
|
|
17573
|
-
children: "
|
|
17882
|
+
children: t("branchingLogic.rules")
|
|
17574
17883
|
}
|
|
17575
17884
|
),
|
|
17576
17885
|
/* @__PURE__ */ jsx(
|
|
@@ -17581,13 +17890,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17581
17890
|
leftIcon: Eye,
|
|
17582
17891
|
action: "VIEW_GRAPH",
|
|
17583
17892
|
onClick: () => setView("graph"),
|
|
17584
|
-
children: "
|
|
17893
|
+
children: t("branchingLogic.logicGraph")
|
|
17585
17894
|
}
|
|
17586
17895
|
)
|
|
17587
17896
|
] })
|
|
17588
17897
|
] }),
|
|
17589
17898
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
17590
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
17899
|
+
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(
|
|
17591
17900
|
RuleRow,
|
|
17592
17901
|
{
|
|
17593
17902
|
rule,
|
|
@@ -17608,7 +17917,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17608
17917
|
action: "ADD_RULE",
|
|
17609
17918
|
onClick: handleAddRule,
|
|
17610
17919
|
disabled: noQuestions,
|
|
17611
|
-
children: "
|
|
17920
|
+
children: t("branchingLogic.addRule")
|
|
17612
17921
|
}
|
|
17613
17922
|
) })
|
|
17614
17923
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -18235,7 +18544,7 @@ function CalendarGrid({
|
|
|
18235
18544
|
onClick: stepPrev,
|
|
18236
18545
|
"aria-disabled": !canPrev || void 0,
|
|
18237
18546
|
"aria-label": t("aria.previousDays"),
|
|
18238
|
-
children: "
|
|
18547
|
+
children: t("nav.previous")
|
|
18239
18548
|
}
|
|
18240
18549
|
),
|
|
18241
18550
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -18248,7 +18557,7 @@ function CalendarGrid({
|
|
|
18248
18557
|
onClick: stepNext,
|
|
18249
18558
|
"aria-disabled": !canNext || void 0,
|
|
18250
18559
|
"aria-label": t("aria.nextDays"),
|
|
18251
|
-
children: "
|
|
18560
|
+
children: t("nav.next")
|
|
18252
18561
|
}
|
|
18253
18562
|
)
|
|
18254
18563
|
] }),
|
|
@@ -19798,7 +20107,7 @@ var init_Pagination = __esm({
|
|
|
19798
20107
|
type: "number",
|
|
19799
20108
|
value: jumpToPage,
|
|
19800
20109
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
19801
|
-
placeholder: "
|
|
20110
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
19802
20111
|
className: "w-20",
|
|
19803
20112
|
onKeyDown: (e) => {
|
|
19804
20113
|
if (e.key === "Enter") {
|
|
@@ -19936,13 +20245,10 @@ var init_CardGrid = __esm({
|
|
|
19936
20245
|
return children;
|
|
19937
20246
|
}
|
|
19938
20247
|
if (isLoading) {
|
|
19939
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
20248
|
+
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") }) });
|
|
19940
20249
|
}
|
|
19941
20250
|
if (error) {
|
|
19942
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
19943
|
-
"Error loading items: ",
|
|
19944
|
-
error.message
|
|
19945
|
-
] }) });
|
|
20251
|
+
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 }) }) });
|
|
19946
20252
|
}
|
|
19947
20253
|
if (normalizedData.length === 0) {
|
|
19948
20254
|
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" }) });
|
|
@@ -23808,7 +24114,7 @@ function DataGrid({
|
|
|
23808
24114
|
onChange: () => toggleSelection(id),
|
|
23809
24115
|
onClick: (e) => e.stopPropagation(),
|
|
23810
24116
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
23811
|
-
"aria-label":
|
|
24117
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
23812
24118
|
}
|
|
23813
24119
|
),
|
|
23814
24120
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -24006,7 +24312,7 @@ function formatDate3(value) {
|
|
|
24006
24312
|
if (isNaN(d.getTime())) return String(value);
|
|
24007
24313
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
24008
24314
|
}
|
|
24009
|
-
function formatValue2(value, format) {
|
|
24315
|
+
function formatValue2(value, format, boolLabels) {
|
|
24010
24316
|
if (value === void 0 || value === null) return "";
|
|
24011
24317
|
switch (format) {
|
|
24012
24318
|
case "date":
|
|
@@ -24018,7 +24324,7 @@ function formatValue2(value, format) {
|
|
|
24018
24324
|
case "percent":
|
|
24019
24325
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
24020
24326
|
case "boolean":
|
|
24021
|
-
return value ? "Yes" : "No";
|
|
24327
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
24022
24328
|
default:
|
|
24023
24329
|
return String(value);
|
|
24024
24330
|
}
|
|
@@ -24314,7 +24620,7 @@ function DataList({
|
|
|
24314
24620
|
field.label ?? fieldLabel3(field.name),
|
|
24315
24621
|
":"
|
|
24316
24622
|
] }),
|
|
24317
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
24623
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
24318
24624
|
] }, field.name);
|
|
24319
24625
|
}) }),
|
|
24320
24626
|
progressFields.map((field) => {
|
|
@@ -24444,6 +24750,7 @@ var init_FileTree = __esm({
|
|
|
24444
24750
|
init_Box();
|
|
24445
24751
|
init_Typography();
|
|
24446
24752
|
init_Icon();
|
|
24753
|
+
init_useTranslate();
|
|
24447
24754
|
TreeNodeItem = ({
|
|
24448
24755
|
node,
|
|
24449
24756
|
depth,
|
|
@@ -24529,8 +24836,9 @@ var init_FileTree = __esm({
|
|
|
24529
24836
|
className,
|
|
24530
24837
|
indent = 16
|
|
24531
24838
|
}) => {
|
|
24839
|
+
const { t } = useTranslate();
|
|
24532
24840
|
if (tree.length === 0) {
|
|
24533
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
24841
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24534
24842
|
}
|
|
24535
24843
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
24536
24844
|
TreeNodeItem,
|
|
@@ -24649,6 +24957,7 @@ var init_FilterGroup = __esm({
|
|
|
24649
24957
|
init_Icon();
|
|
24650
24958
|
init_useEventBus();
|
|
24651
24959
|
init_useQuerySingleton();
|
|
24960
|
+
init_useTranslate();
|
|
24652
24961
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24653
24962
|
lookStyles6 = {
|
|
24654
24963
|
toolbar: "",
|
|
@@ -24669,6 +24978,7 @@ var init_FilterGroup = __esm({
|
|
|
24669
24978
|
isLoading,
|
|
24670
24979
|
look = "toolbar"
|
|
24671
24980
|
}) => {
|
|
24981
|
+
const { t } = useTranslate();
|
|
24672
24982
|
const eventBus = useEventBus();
|
|
24673
24983
|
const queryState = useQuerySingleton(query);
|
|
24674
24984
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -24750,7 +25060,7 @@ var init_FilterGroup = __esm({
|
|
|
24750
25060
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
24751
25061
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24752
25062
|
),
|
|
24753
|
-
children: "
|
|
25063
|
+
children: t("filterGroup.all")
|
|
24754
25064
|
}
|
|
24755
25065
|
),
|
|
24756
25066
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -24778,7 +25088,7 @@ var init_FilterGroup = __esm({
|
|
|
24778
25088
|
size: "sm",
|
|
24779
25089
|
onClick: handleClearAll,
|
|
24780
25090
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24781
|
-
children: "
|
|
25091
|
+
children: t("filterGroup.clear")
|
|
24782
25092
|
}
|
|
24783
25093
|
)
|
|
24784
25094
|
]
|
|
@@ -24789,7 +25099,7 @@ var init_FilterGroup = __esm({
|
|
|
24789
25099
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
24790
25100
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
24791
25101
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24792
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
25102
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24793
25103
|
] }),
|
|
24794
25104
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
24795
25105
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -24812,7 +25122,7 @@ var init_FilterGroup = __esm({
|
|
|
24812
25122
|
`${filter.field}_from`,
|
|
24813
25123
|
e.target.value || null
|
|
24814
25124
|
),
|
|
24815
|
-
placeholder: "
|
|
25125
|
+
placeholder: t("filterGroup.from"),
|
|
24816
25126
|
clearable: true,
|
|
24817
25127
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
24818
25128
|
}
|
|
@@ -24826,7 +25136,7 @@ var init_FilterGroup = __esm({
|
|
|
24826
25136
|
`${filter.field}_to`,
|
|
24827
25137
|
e.target.value || null
|
|
24828
25138
|
),
|
|
24829
|
-
placeholder: "
|
|
25139
|
+
placeholder: t("filterGroup.to"),
|
|
24830
25140
|
clearable: true,
|
|
24831
25141
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
24832
25142
|
}
|
|
@@ -24846,7 +25156,7 @@ var init_FilterGroup = __esm({
|
|
|
24846
25156
|
value: selectedValues[filter.field] || "all",
|
|
24847
25157
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24848
25158
|
options: [
|
|
24849
|
-
{ value: "all", label: "
|
|
25159
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24850
25160
|
...filter.options?.map((opt) => ({
|
|
24851
25161
|
value: opt,
|
|
24852
25162
|
label: opt
|
|
@@ -24863,7 +25173,7 @@ var init_FilterGroup = __esm({
|
|
|
24863
25173
|
onClick: handleClearAll,
|
|
24864
25174
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24865
25175
|
className: "self-start",
|
|
24866
|
-
children: "
|
|
25176
|
+
children: t("filterGroup.clearAll")
|
|
24867
25177
|
}
|
|
24868
25178
|
)
|
|
24869
25179
|
] });
|
|
@@ -24929,7 +25239,7 @@ var init_FilterGroup = __esm({
|
|
|
24929
25239
|
value: selectedValues[filter.field] || "all",
|
|
24930
25240
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24931
25241
|
options: [
|
|
24932
|
-
{ value: "all", label:
|
|
25242
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
24933
25243
|
...filter.options?.map((opt) => ({
|
|
24934
25244
|
value: opt,
|
|
24935
25245
|
label: opt
|
|
@@ -24958,7 +25268,7 @@ var init_FilterGroup = __esm({
|
|
|
24958
25268
|
field
|
|
24959
25269
|
);
|
|
24960
25270
|
}),
|
|
24961
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
25271
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
24962
25272
|
] })
|
|
24963
25273
|
]
|
|
24964
25274
|
}
|
|
@@ -24983,7 +25293,7 @@ var init_FilterGroup = __esm({
|
|
|
24983
25293
|
className: "text-muted-foreground",
|
|
24984
25294
|
children: [
|
|
24985
25295
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24986
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
25296
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24987
25297
|
]
|
|
24988
25298
|
}
|
|
24989
25299
|
),
|
|
@@ -25009,7 +25319,7 @@ var init_FilterGroup = __esm({
|
|
|
25009
25319
|
`${filter.field}_from`,
|
|
25010
25320
|
e.target.value || null
|
|
25011
25321
|
),
|
|
25012
|
-
placeholder: "
|
|
25322
|
+
placeholder: t("filterGroup.from"),
|
|
25013
25323
|
clearable: true,
|
|
25014
25324
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
25015
25325
|
className: "min-w-[130px]"
|
|
@@ -25025,7 +25335,7 @@ var init_FilterGroup = __esm({
|
|
|
25025
25335
|
`${filter.field}_to`,
|
|
25026
25336
|
e.target.value || null
|
|
25027
25337
|
),
|
|
25028
|
-
placeholder: "
|
|
25338
|
+
placeholder: t("filterGroup.to"),
|
|
25029
25339
|
clearable: true,
|
|
25030
25340
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
25031
25341
|
className: "min-w-[130px]"
|
|
@@ -25047,7 +25357,7 @@ var init_FilterGroup = __esm({
|
|
|
25047
25357
|
value: selectedValues[filter.field] || "all",
|
|
25048
25358
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
25049
25359
|
options: [
|
|
25050
|
-
{ value: "all", label: "
|
|
25360
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
25051
25361
|
...filter.options?.map((opt) => ({
|
|
25052
25362
|
value: opt,
|
|
25053
25363
|
label: opt
|
|
@@ -25058,10 +25368,7 @@ var init_FilterGroup = __esm({
|
|
|
25058
25368
|
)
|
|
25059
25369
|
] }, filter.field)),
|
|
25060
25370
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
25061
|
-
/* @__PURE__ */
|
|
25062
|
-
activeFilterCount,
|
|
25063
|
-
" active"
|
|
25064
|
-
] }),
|
|
25371
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
25065
25372
|
/* @__PURE__ */ jsx(
|
|
25066
25373
|
Button,
|
|
25067
25374
|
{
|
|
@@ -25069,7 +25376,7 @@ var init_FilterGroup = __esm({
|
|
|
25069
25376
|
size: "sm",
|
|
25070
25377
|
onClick: handleClearAll,
|
|
25071
25378
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
25072
|
-
children: "
|
|
25379
|
+
children: t("filterGroup.clearAll")
|
|
25073
25380
|
}
|
|
25074
25381
|
)
|
|
25075
25382
|
] })
|
|
@@ -26013,19 +26320,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
26013
26320
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
26014
26321
|
}
|
|
26015
26322
|
});
|
|
26016
|
-
var
|
|
26323
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
26017
26324
|
var init_ViolationAlert = __esm({
|
|
26018
26325
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26019
26326
|
init_cn();
|
|
26327
|
+
init_useTranslate();
|
|
26020
26328
|
init_Box();
|
|
26021
26329
|
init_Stack();
|
|
26022
26330
|
init_Typography();
|
|
26023
26331
|
init_Button();
|
|
26024
26332
|
init_Icon();
|
|
26025
|
-
|
|
26026
|
-
measure: "
|
|
26027
|
-
admin: "
|
|
26028
|
-
penalty: "
|
|
26333
|
+
actionTypeLabelKeys = {
|
|
26334
|
+
measure: "violationAlert.actionType.measure",
|
|
26335
|
+
admin: "violationAlert.actionType.admin",
|
|
26336
|
+
penalty: "violationAlert.actionType.penalty"
|
|
26029
26337
|
};
|
|
26030
26338
|
actionTypeIcons = {
|
|
26031
26339
|
measure: "alert-triangle",
|
|
@@ -26042,10 +26350,11 @@ var init_ViolationAlert = __esm({
|
|
|
26042
26350
|
className,
|
|
26043
26351
|
...flatProps
|
|
26044
26352
|
}) => {
|
|
26353
|
+
const { t } = useTranslate();
|
|
26045
26354
|
const resolvedViolation = violation ?? {
|
|
26046
26355
|
law: "",
|
|
26047
26356
|
article: "",
|
|
26048
|
-
message: flatProps.message ?? "
|
|
26357
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
26049
26358
|
actionType: "measure"
|
|
26050
26359
|
};
|
|
26051
26360
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -26130,7 +26439,7 @@ var init_ViolationAlert = __esm({
|
|
|
26130
26439
|
{
|
|
26131
26440
|
variant: "caption",
|
|
26132
26441
|
className: cn(textColor, "opacity-75"),
|
|
26133
|
-
children:
|
|
26442
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
26134
26443
|
}
|
|
26135
26444
|
)
|
|
26136
26445
|
] })
|
|
@@ -26161,7 +26470,7 @@ var init_ViolationAlert = __esm({
|
|
|
26161
26470
|
{
|
|
26162
26471
|
variant: "caption",
|
|
26163
26472
|
className: cn(textColor, "opacity-75"),
|
|
26164
|
-
children: "
|
|
26473
|
+
children: t("violationAlert.adminLabel")
|
|
26165
26474
|
}
|
|
26166
26475
|
),
|
|
26167
26476
|
/* @__PURE__ */ jsx(
|
|
@@ -26180,7 +26489,7 @@ var init_ViolationAlert = __esm({
|
|
|
26180
26489
|
{
|
|
26181
26490
|
variant: "caption",
|
|
26182
26491
|
className: cn(textColor, "opacity-75"),
|
|
26183
|
-
children: "
|
|
26492
|
+
children: t("violationAlert.penaltyLabel")
|
|
26184
26493
|
}
|
|
26185
26494
|
),
|
|
26186
26495
|
/* @__PURE__ */ jsx(
|
|
@@ -26205,7 +26514,7 @@ var init_ViolationAlert = __esm({
|
|
|
26205
26514
|
className: cn(textColor, "self-start"),
|
|
26206
26515
|
children: [
|
|
26207
26516
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
26208
|
-
"
|
|
26517
|
+
t("violationAlert.goToField")
|
|
26209
26518
|
]
|
|
26210
26519
|
}
|
|
26211
26520
|
)
|
|
@@ -26521,6 +26830,7 @@ var init_LineChart = __esm({
|
|
|
26521
26830
|
"use client";
|
|
26522
26831
|
init_cn();
|
|
26523
26832
|
init_atoms2();
|
|
26833
|
+
init_useTranslate();
|
|
26524
26834
|
LineChart2 = ({
|
|
26525
26835
|
data,
|
|
26526
26836
|
width = 400,
|
|
@@ -26532,6 +26842,7 @@ var init_LineChart = __esm({
|
|
|
26532
26842
|
areaColor = "var(--color-primary)",
|
|
26533
26843
|
className
|
|
26534
26844
|
}) => {
|
|
26845
|
+
const { t } = useTranslate();
|
|
26535
26846
|
const gradientId = useId();
|
|
26536
26847
|
const safeData = data ?? [];
|
|
26537
26848
|
const sortedData = useMemo(() => {
|
|
@@ -26568,7 +26879,7 @@ var init_LineChart = __esm({
|
|
|
26568
26879
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
26569
26880
|
}, [linePath, points, height, showArea]);
|
|
26570
26881
|
if (safeData.length === 0) {
|
|
26571
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
26882
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
26572
26883
|
}
|
|
26573
26884
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
26574
26885
|
"svg",
|
|
@@ -28475,6 +28786,7 @@ var init_GraphView = __esm({
|
|
|
28475
28786
|
"use client";
|
|
28476
28787
|
init_cn();
|
|
28477
28788
|
init_atoms2();
|
|
28789
|
+
init_useTranslate();
|
|
28478
28790
|
GROUP_COLORS = [
|
|
28479
28791
|
"#3b82f6",
|
|
28480
28792
|
// blue-500
|
|
@@ -28507,6 +28819,7 @@ var init_GraphView = __esm({
|
|
|
28507
28819
|
showLabels = true,
|
|
28508
28820
|
zoomToFit = true
|
|
28509
28821
|
}) => {
|
|
28822
|
+
const { t } = useTranslate();
|
|
28510
28823
|
const containerRef = useRef(null);
|
|
28511
28824
|
const animRef = useRef(0);
|
|
28512
28825
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -28684,7 +28997,7 @@ var init_GraphView = __esm({
|
|
|
28684
28997
|
[onNodeClick]
|
|
28685
28998
|
);
|
|
28686
28999
|
if (nodes.length === 0) {
|
|
28687
|
-
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: "
|
|
29000
|
+
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") }) });
|
|
28688
29001
|
}
|
|
28689
29002
|
return /* @__PURE__ */ jsx(
|
|
28690
29003
|
Box,
|
|
@@ -29140,11 +29453,12 @@ var init_UploadDropZone = __esm({
|
|
|
29140
29453
|
init_Icon();
|
|
29141
29454
|
init_Typography();
|
|
29142
29455
|
init_useEventBus();
|
|
29456
|
+
init_useTranslate();
|
|
29143
29457
|
UploadDropZone = ({
|
|
29144
29458
|
accept,
|
|
29145
29459
|
maxSize,
|
|
29146
29460
|
maxFiles = 1,
|
|
29147
|
-
label
|
|
29461
|
+
label,
|
|
29148
29462
|
description,
|
|
29149
29463
|
disabled = false,
|
|
29150
29464
|
action,
|
|
@@ -29152,22 +29466,24 @@ var init_UploadDropZone = __esm({
|
|
|
29152
29466
|
onFiles,
|
|
29153
29467
|
className
|
|
29154
29468
|
}) => {
|
|
29469
|
+
const { t } = useTranslate();
|
|
29470
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
29155
29471
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
29156
29472
|
const [error, setError] = useState(null);
|
|
29157
29473
|
const inputRef = useRef(null);
|
|
29158
29474
|
const eventBus = useSafeEventBus7();
|
|
29159
29475
|
const defaultDescription = [
|
|
29160
|
-
accept ?
|
|
29161
|
-
maxSize ?
|
|
29162
|
-
maxFiles > 1 ?
|
|
29476
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
29477
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
29478
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
29163
29479
|
].filter(Boolean).join(". ");
|
|
29164
29480
|
const validateFiles = useCallback(
|
|
29165
29481
|
(files) => {
|
|
29166
29482
|
if (files.length > maxFiles) {
|
|
29167
|
-
return { valid: [], error:
|
|
29483
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
29168
29484
|
}
|
|
29169
29485
|
if (accept) {
|
|
29170
|
-
const acceptedTypes = accept.split(",").map((
|
|
29486
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
29171
29487
|
const invalid = files.filter((file) => {
|
|
29172
29488
|
return !acceptedTypes.some((type) => {
|
|
29173
29489
|
if (type.endsWith("/*")) {
|
|
@@ -29177,7 +29493,7 @@ var init_UploadDropZone = __esm({
|
|
|
29177
29493
|
});
|
|
29178
29494
|
});
|
|
29179
29495
|
if (invalid.length > 0) {
|
|
29180
|
-
return { valid: [], error:
|
|
29496
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
29181
29497
|
}
|
|
29182
29498
|
}
|
|
29183
29499
|
if (maxSize) {
|
|
@@ -29185,13 +29501,13 @@ var init_UploadDropZone = __esm({
|
|
|
29185
29501
|
if (tooLarge.length > 0) {
|
|
29186
29502
|
return {
|
|
29187
29503
|
valid: [],
|
|
29188
|
-
error:
|
|
29504
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
29189
29505
|
};
|
|
29190
29506
|
}
|
|
29191
29507
|
}
|
|
29192
29508
|
return { valid: files, error: null };
|
|
29193
29509
|
},
|
|
29194
|
-
[accept, maxSize, maxFiles]
|
|
29510
|
+
[accept, maxSize, maxFiles, t]
|
|
29195
29511
|
);
|
|
29196
29512
|
const handleFiles = useCallback(
|
|
29197
29513
|
(files) => {
|
|
@@ -29262,7 +29578,7 @@ var init_UploadDropZone = __esm({
|
|
|
29262
29578
|
handleClick();
|
|
29263
29579
|
}
|
|
29264
29580
|
},
|
|
29265
|
-
"aria-label":
|
|
29581
|
+
"aria-label": resolvedLabel,
|
|
29266
29582
|
children: [
|
|
29267
29583
|
/* @__PURE__ */ jsx(
|
|
29268
29584
|
"input",
|
|
@@ -29278,7 +29594,7 @@ var init_UploadDropZone = __esm({
|
|
|
29278
29594
|
}
|
|
29279
29595
|
),
|
|
29280
29596
|
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" }),
|
|
29281
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
29597
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
29282
29598
|
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 })
|
|
29283
29599
|
]
|
|
29284
29600
|
}
|
|
@@ -29700,7 +30016,7 @@ function TableView({
|
|
|
29700
30016
|
{
|
|
29701
30017
|
checked: selected.has(id),
|
|
29702
30018
|
onChange: () => toggleRow(id),
|
|
29703
|
-
"aria-label":
|
|
30019
|
+
"aria-label": t("table.selectRow", { id })
|
|
29704
30020
|
}
|
|
29705
30021
|
) }),
|
|
29706
30022
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -32547,7 +32863,7 @@ var init_QrScanner = __esm({
|
|
|
32547
32863
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
32548
32864
|
children: [
|
|
32549
32865
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
32550
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32866
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
32551
32867
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
32552
32868
|
]
|
|
32553
32869
|
}
|
|
@@ -32558,7 +32874,7 @@ var init_QrScanner = __esm({
|
|
|
32558
32874
|
position: "absolute",
|
|
32559
32875
|
display: "flex",
|
|
32560
32876
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
32561
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32877
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
32562
32878
|
}
|
|
32563
32879
|
),
|
|
32564
32880
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -32577,7 +32893,7 @@ var init_QrScanner = __esm({
|
|
|
32577
32893
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32578
32894
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32579
32895
|
),
|
|
32580
|
-
"aria-label": isPaused ? "
|
|
32896
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
32581
32897
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
32582
32898
|
}
|
|
32583
32899
|
),
|
|
@@ -32590,7 +32906,7 @@ var init_QrScanner = __esm({
|
|
|
32590
32906
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32591
32907
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32592
32908
|
),
|
|
32593
|
-
"aria-label":
|
|
32909
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
32594
32910
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
32595
32911
|
}
|
|
32596
32912
|
),
|
|
@@ -32604,7 +32920,7 @@ var init_QrScanner = __esm({
|
|
|
32604
32920
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32605
32921
|
),
|
|
32606
32922
|
"aria-label": t("aria.mockScanDev"),
|
|
32607
|
-
children: "
|
|
32923
|
+
children: t("qrScanner.mockScan")
|
|
32608
32924
|
}
|
|
32609
32925
|
)
|
|
32610
32926
|
]
|
|
@@ -32622,6 +32938,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32622
32938
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32623
32939
|
init_cn();
|
|
32624
32940
|
init_useEventBus();
|
|
32941
|
+
init_useTranslate();
|
|
32625
32942
|
init_Typography();
|
|
32626
32943
|
init_Box();
|
|
32627
32944
|
init_Label();
|
|
@@ -32631,36 +32948,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32631
32948
|
const sign = delta >= 0 ? "+" : "-";
|
|
32632
32949
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
32633
32950
|
};
|
|
32634
|
-
constraintHint = (constraint) => {
|
|
32951
|
+
constraintHint = (constraint, t) => {
|
|
32635
32952
|
if (constraint.type === "single") {
|
|
32636
|
-
return constraint.required ? "
|
|
32953
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
32637
32954
|
}
|
|
32638
32955
|
const { min, max } = constraint;
|
|
32639
32956
|
if (min && max) {
|
|
32640
|
-
return min === max ?
|
|
32957
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
32641
32958
|
}
|
|
32642
|
-
if (min) return
|
|
32643
|
-
if (max) return
|
|
32644
|
-
return "
|
|
32959
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32960
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32961
|
+
return t("optionConstraint.optional");
|
|
32645
32962
|
};
|
|
32646
|
-
validateSelection = (selected, constraint) => {
|
|
32963
|
+
validateSelection = (selected, constraint, t) => {
|
|
32647
32964
|
if (constraint.type === "single") {
|
|
32648
32965
|
if (constraint.required && selected.length === 0) {
|
|
32649
|
-
return "
|
|
32966
|
+
return t("optionConstraint.error.pickOne");
|
|
32650
32967
|
}
|
|
32651
32968
|
if (selected.length > 1) {
|
|
32652
|
-
return "
|
|
32969
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32653
32970
|
}
|
|
32654
32971
|
return void 0;
|
|
32655
32972
|
}
|
|
32656
32973
|
const { min, max } = constraint;
|
|
32657
32974
|
if (min !== void 0 && selected.length < min) {
|
|
32658
32975
|
const remaining = min - selected.length;
|
|
32659
|
-
return
|
|
32976
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32660
32977
|
}
|
|
32661
32978
|
if (max !== void 0 && selected.length > max) {
|
|
32662
32979
|
const excess = selected.length - max;
|
|
32663
|
-
return
|
|
32980
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32664
32981
|
}
|
|
32665
32982
|
return void 0;
|
|
32666
32983
|
};
|
|
@@ -32677,8 +32994,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32677
32994
|
className
|
|
32678
32995
|
}) => {
|
|
32679
32996
|
const eventBus = useEventBus();
|
|
32680
|
-
const
|
|
32681
|
-
const
|
|
32997
|
+
const { t } = useTranslate();
|
|
32998
|
+
const hint = constraintHint(constraint, t);
|
|
32999
|
+
const error = validateSelection(selected, constraint, t);
|
|
32682
33000
|
const inputName = `option-${groupId}`;
|
|
32683
33001
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32684
33002
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32778,7 +33096,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32778
33096
|
variant: "caption",
|
|
32779
33097
|
color: "warning",
|
|
32780
33098
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32781
|
-
children: "
|
|
33099
|
+
children: t("optionConstraint.outOfStock")
|
|
32782
33100
|
}
|
|
32783
33101
|
)
|
|
32784
33102
|
]
|
|
@@ -33100,6 +33418,7 @@ function changeBlockType(block, type) {
|
|
|
33100
33418
|
return { id: block.id, type, content: seed };
|
|
33101
33419
|
}
|
|
33102
33420
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33421
|
+
const { t } = useTranslate();
|
|
33103
33422
|
const [open, setOpen] = useState(false);
|
|
33104
33423
|
const ref = useRef(null);
|
|
33105
33424
|
useEffect(() => {
|
|
@@ -33119,7 +33438,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33119
33438
|
{
|
|
33120
33439
|
type: "button",
|
|
33121
33440
|
variant: "ghost",
|
|
33122
|
-
"aria-label": "
|
|
33441
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
33123
33442
|
className: cn(
|
|
33124
33443
|
"inline-flex items-center justify-center",
|
|
33125
33444
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -33141,7 +33460,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33141
33460
|
"py-1 text-sm"
|
|
33142
33461
|
),
|
|
33143
33462
|
children: [
|
|
33144
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
33463
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
33145
33464
|
/* @__PURE__ */ jsxs(
|
|
33146
33465
|
Button,
|
|
33147
33466
|
{
|
|
@@ -33155,7 +33474,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33155
33474
|
},
|
|
33156
33475
|
children: [
|
|
33157
33476
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
33158
|
-
"
|
|
33477
|
+
" ",
|
|
33478
|
+
t("richBlockEditor.duplicate")
|
|
33159
33479
|
]
|
|
33160
33480
|
}
|
|
33161
33481
|
),
|
|
@@ -33172,14 +33492,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33172
33492
|
},
|
|
33173
33493
|
children: [
|
|
33174
33494
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
33175
|
-
"
|
|
33495
|
+
" ",
|
|
33496
|
+
t("common.delete")
|
|
33176
33497
|
]
|
|
33177
33498
|
}
|
|
33178
33499
|
),
|
|
33179
33500
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33180
33501
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
33181
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
33182
|
-
CHANGEABLE_TYPES.filter((
|
|
33502
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
33503
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
33183
33504
|
Button,
|
|
33184
33505
|
{
|
|
33185
33506
|
type: "button",
|
|
@@ -33187,12 +33508,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33187
33508
|
role: "menuitem",
|
|
33188
33509
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
33189
33510
|
onClick: () => {
|
|
33190
|
-
onChangeType(
|
|
33511
|
+
onChangeType(bt);
|
|
33191
33512
|
setOpen(false);
|
|
33192
33513
|
},
|
|
33193
|
-
children:
|
|
33514
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
33194
33515
|
},
|
|
33195
|
-
|
|
33516
|
+
bt
|
|
33196
33517
|
))
|
|
33197
33518
|
] })
|
|
33198
33519
|
]
|
|
@@ -33254,6 +33575,7 @@ function BlockRow({
|
|
|
33254
33575
|
onInsertAfter,
|
|
33255
33576
|
onChangeType
|
|
33256
33577
|
}) {
|
|
33578
|
+
const { t } = useTranslate();
|
|
33257
33579
|
const setContent = useCallback(
|
|
33258
33580
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
33259
33581
|
[onUpdate]
|
|
@@ -33303,8 +33625,8 @@ function BlockRow({
|
|
|
33303
33625
|
tag: "h1",
|
|
33304
33626
|
value: block.content ?? "",
|
|
33305
33627
|
readOnly,
|
|
33306
|
-
placeholder: placeholder ?? "
|
|
33307
|
-
ariaLabel: "
|
|
33628
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
33629
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
33308
33630
|
className: "text-3xl font-bold leading-tight",
|
|
33309
33631
|
onValueChange: setContent
|
|
33310
33632
|
}
|
|
@@ -33316,8 +33638,8 @@ function BlockRow({
|
|
|
33316
33638
|
tag: "h2",
|
|
33317
33639
|
value: block.content ?? "",
|
|
33318
33640
|
readOnly,
|
|
33319
|
-
placeholder: placeholder ?? "
|
|
33320
|
-
ariaLabel: "
|
|
33641
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
33642
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
33321
33643
|
className: "text-2xl font-semibold leading-tight",
|
|
33322
33644
|
onValueChange: setContent
|
|
33323
33645
|
}
|
|
@@ -33329,8 +33651,8 @@ function BlockRow({
|
|
|
33329
33651
|
tag: "h3",
|
|
33330
33652
|
value: block.content ?? "",
|
|
33331
33653
|
readOnly,
|
|
33332
|
-
placeholder: placeholder ?? "
|
|
33333
|
-
ariaLabel: "
|
|
33654
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33655
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
33334
33656
|
className: "text-xl font-semibold leading-tight",
|
|
33335
33657
|
onValueChange: setContent
|
|
33336
33658
|
}
|
|
@@ -33342,8 +33664,8 @@ function BlockRow({
|
|
|
33342
33664
|
tag: "blockquote",
|
|
33343
33665
|
value: block.content ?? "",
|
|
33344
33666
|
readOnly,
|
|
33345
|
-
placeholder: placeholder ?? "
|
|
33346
|
-
ariaLabel: "
|
|
33667
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33668
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
33347
33669
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
33348
33670
|
onValueChange: setContent
|
|
33349
33671
|
}
|
|
@@ -33351,13 +33673,13 @@ function BlockRow({
|
|
|
33351
33673
|
case "code":
|
|
33352
33674
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
33353
33675
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
33354
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
33676
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
33355
33677
|
!readOnly && /* @__PURE__ */ jsx(
|
|
33356
33678
|
Input,
|
|
33357
33679
|
{
|
|
33358
33680
|
inputType: "text",
|
|
33359
33681
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
33360
|
-
"aria-label": "
|
|
33682
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
33361
33683
|
className: cn(
|
|
33362
33684
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
33363
33685
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33373,8 +33695,8 @@ function BlockRow({
|
|
|
33373
33695
|
tag: "pre",
|
|
33374
33696
|
value: block.content ?? "",
|
|
33375
33697
|
readOnly,
|
|
33376
|
-
placeholder: placeholder ?? "
|
|
33377
|
-
ariaLabel: "
|
|
33698
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33699
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
33378
33700
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
33379
33701
|
onValueChange: setContent
|
|
33380
33702
|
}
|
|
@@ -33387,7 +33709,7 @@ function BlockRow({
|
|
|
33387
33709
|
const caption = String(block.metadata?.caption ?? "");
|
|
33388
33710
|
const imgProps = {
|
|
33389
33711
|
src: url,
|
|
33390
|
-
alt: caption || "
|
|
33712
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
33391
33713
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
33392
33714
|
};
|
|
33393
33715
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -33401,7 +33723,8 @@ function BlockRow({
|
|
|
33401
33723
|
),
|
|
33402
33724
|
children: [
|
|
33403
33725
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
33404
|
-
"
|
|
33726
|
+
" ",
|
|
33727
|
+
t("richBlockEditor.noImageUrl")
|
|
33405
33728
|
]
|
|
33406
33729
|
}
|
|
33407
33730
|
),
|
|
@@ -33412,7 +33735,7 @@ function BlockRow({
|
|
|
33412
33735
|
inputType: "url",
|
|
33413
33736
|
value: url,
|
|
33414
33737
|
placeholder: "https://example.com/image.png",
|
|
33415
|
-
"aria-label": "
|
|
33738
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
33416
33739
|
className: cn(
|
|
33417
33740
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33418
33741
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33425,8 +33748,8 @@ function BlockRow({
|
|
|
33425
33748
|
{
|
|
33426
33749
|
inputType: "text",
|
|
33427
33750
|
value: caption,
|
|
33428
|
-
placeholder: "
|
|
33429
|
-
"aria-label": "
|
|
33751
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33752
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
33430
33753
|
className: cn(
|
|
33431
33754
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33432
33755
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33457,8 +33780,8 @@ function BlockRow({
|
|
|
33457
33780
|
tag: "span",
|
|
33458
33781
|
value: child.content ?? "",
|
|
33459
33782
|
readOnly,
|
|
33460
|
-
placeholder: "
|
|
33461
|
-
ariaLabel: "
|
|
33783
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33784
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
33462
33785
|
className: "inline-block min-w-[1ch] flex-1",
|
|
33463
33786
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
33464
33787
|
}
|
|
@@ -33468,7 +33791,7 @@ function BlockRow({
|
|
|
33468
33791
|
{
|
|
33469
33792
|
type: "button",
|
|
33470
33793
|
variant: "ghost",
|
|
33471
|
-
"aria-label": "
|
|
33794
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
33472
33795
|
className: cn(
|
|
33473
33796
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
33474
33797
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -33490,7 +33813,8 @@ function BlockRow({
|
|
|
33490
33813
|
onClick: addListItem,
|
|
33491
33814
|
children: [
|
|
33492
33815
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
33493
|
-
"
|
|
33816
|
+
" ",
|
|
33817
|
+
t("richBlockEditor.addItem")
|
|
33494
33818
|
]
|
|
33495
33819
|
}
|
|
33496
33820
|
) })
|
|
@@ -33506,8 +33830,8 @@ function BlockRow({
|
|
|
33506
33830
|
tag: "p",
|
|
33507
33831
|
value: block.content ?? "",
|
|
33508
33832
|
readOnly,
|
|
33509
|
-
placeholder: placeholder ?? "
|
|
33510
|
-
ariaLabel: "
|
|
33833
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33834
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
33511
33835
|
className: "leading-7",
|
|
33512
33836
|
onValueChange: setContent
|
|
33513
33837
|
}
|
|
@@ -33530,7 +33854,7 @@ function BlockRow({
|
|
|
33530
33854
|
{
|
|
33531
33855
|
type: "button",
|
|
33532
33856
|
variant: "ghost",
|
|
33533
|
-
"aria-label": "
|
|
33857
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
33534
33858
|
className: cn(
|
|
33535
33859
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
33536
33860
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -33557,7 +33881,7 @@ function BlockRow({
|
|
|
33557
33881
|
}
|
|
33558
33882
|
);
|
|
33559
33883
|
}
|
|
33560
|
-
var TOOLBAR_ENTRIES,
|
|
33884
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
33561
33885
|
var init_RichBlockEditor = __esm({
|
|
33562
33886
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
33563
33887
|
"use client";
|
|
@@ -33570,29 +33894,30 @@ var init_RichBlockEditor = __esm({
|
|
|
33570
33894
|
init_Input();
|
|
33571
33895
|
init_Icon();
|
|
33572
33896
|
init_useEventBus();
|
|
33897
|
+
init_useTranslate();
|
|
33573
33898
|
TOOLBAR_ENTRIES = [
|
|
33574
|
-
{ type: "paragraph",
|
|
33575
|
-
{ type: "heading-1",
|
|
33576
|
-
{ type: "heading-2",
|
|
33577
|
-
{ type: "heading-3",
|
|
33578
|
-
{ type: "bullet-list",
|
|
33579
|
-
{ type: "numbered-list",
|
|
33580
|
-
{ type: "quote",
|
|
33581
|
-
{ type: "code",
|
|
33582
|
-
{ type: "divider",
|
|
33583
|
-
{ type: "image",
|
|
33899
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33900
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
33901
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
33902
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
33903
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
33904
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
33905
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
33906
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
33907
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
33908
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
33584
33909
|
];
|
|
33585
|
-
|
|
33586
|
-
paragraph: "
|
|
33587
|
-
"heading-1": "
|
|
33588
|
-
"heading-2": "
|
|
33589
|
-
"heading-3": "
|
|
33590
|
-
"bullet-list": "
|
|
33591
|
-
"numbered-list": "
|
|
33592
|
-
quote: "
|
|
33593
|
-
code: "
|
|
33594
|
-
divider: "
|
|
33595
|
-
image: "
|
|
33910
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
33911
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
33912
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
33913
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
33914
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
33915
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
33916
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
33917
|
+
quote: "richBlockEditor.blockType.quote",
|
|
33918
|
+
code: "richBlockEditor.blockType.code",
|
|
33919
|
+
divider: "richBlockEditor.blockType.divider",
|
|
33920
|
+
image: "richBlockEditor.blockType.image"
|
|
33596
33921
|
};
|
|
33597
33922
|
CHANGEABLE_TYPES = [
|
|
33598
33923
|
"paragraph",
|
|
@@ -33626,6 +33951,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33626
33951
|
showToolbar = true,
|
|
33627
33952
|
className
|
|
33628
33953
|
}) => {
|
|
33954
|
+
const { t } = useTranslate();
|
|
33629
33955
|
const [blocks, setBlocks] = useState(
|
|
33630
33956
|
() => normalizeBlocks(initialBlocks)
|
|
33631
33957
|
);
|
|
@@ -33697,25 +34023,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33697
34023
|
Box,
|
|
33698
34024
|
{
|
|
33699
34025
|
role: "toolbar",
|
|
33700
|
-
"aria-label": "
|
|
34026
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33701
34027
|
className: cn(
|
|
33702
34028
|
"flex flex-wrap items-center gap-1",
|
|
33703
34029
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33704
34030
|
),
|
|
33705
34031
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33706
34032
|
const Icon3 = entry.icon;
|
|
34033
|
+
const entryLabel = t(entry.labelKey);
|
|
33707
34034
|
return /* @__PURE__ */ jsxs(
|
|
33708
34035
|
Button,
|
|
33709
34036
|
{
|
|
33710
34037
|
type: "button",
|
|
33711
34038
|
variant: "ghost",
|
|
33712
34039
|
size: "sm",
|
|
33713
|
-
"aria-label":
|
|
33714
|
-
title:
|
|
34040
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
34041
|
+
title: entryLabel,
|
|
33715
34042
|
onClick: () => handleAppend(entry.type),
|
|
33716
34043
|
children: [
|
|
33717
34044
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33718
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
34045
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
33719
34046
|
]
|
|
33720
34047
|
},
|
|
33721
34048
|
entry.type
|
|
@@ -33758,6 +34085,7 @@ var init_ReplyTree = __esm({
|
|
|
33758
34085
|
"use client";
|
|
33759
34086
|
init_cn();
|
|
33760
34087
|
init_useEventBus();
|
|
34088
|
+
init_useTranslate();
|
|
33761
34089
|
init_atoms2();
|
|
33762
34090
|
init_VoteStack();
|
|
33763
34091
|
ReplyTreeNode = ({
|
|
@@ -33777,6 +34105,7 @@ var init_ReplyTree = __esm({
|
|
|
33777
34105
|
showActions
|
|
33778
34106
|
}) => {
|
|
33779
34107
|
const eventBus = useEventBus();
|
|
34108
|
+
const { t } = useTranslate();
|
|
33780
34109
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33781
34110
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33782
34111
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33823,7 +34152,7 @@ var init_ReplyTree = __esm({
|
|
|
33823
34152
|
variant: "ghost",
|
|
33824
34153
|
size: "sm",
|
|
33825
34154
|
onClick: handleToggle,
|
|
33826
|
-
"aria-label": isCollapsed ? "
|
|
34155
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33827
34156
|
"aria-expanded": !isCollapsed,
|
|
33828
34157
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33829
34158
|
className: cn(
|
|
@@ -33864,7 +34193,7 @@ var init_ReplyTree = __esm({
|
|
|
33864
34193
|
onVote: handleVote,
|
|
33865
34194
|
size: "sm",
|
|
33866
34195
|
variant: "horizontal",
|
|
33867
|
-
label:
|
|
34196
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33868
34197
|
}
|
|
33869
34198
|
),
|
|
33870
34199
|
/* @__PURE__ */ jsx(
|
|
@@ -33874,8 +34203,8 @@ var init_ReplyTree = __esm({
|
|
|
33874
34203
|
size: "sm",
|
|
33875
34204
|
leftIcon: "message-square",
|
|
33876
34205
|
onClick: handleReply,
|
|
33877
|
-
"aria-label":
|
|
33878
|
-
children: "
|
|
34206
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
34207
|
+
children: t("replyTree.reply")
|
|
33879
34208
|
}
|
|
33880
34209
|
),
|
|
33881
34210
|
/* @__PURE__ */ jsx(
|
|
@@ -33885,8 +34214,8 @@ var init_ReplyTree = __esm({
|
|
|
33885
34214
|
size: "sm",
|
|
33886
34215
|
leftIcon: "flag",
|
|
33887
34216
|
onClick: handleFlag,
|
|
33888
|
-
"aria-label":
|
|
33889
|
-
children: "
|
|
34217
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
34218
|
+
children: t("replyTree.flag")
|
|
33890
34219
|
}
|
|
33891
34220
|
)
|
|
33892
34221
|
] }),
|
|
@@ -33897,9 +34226,9 @@ var init_ReplyTree = __esm({
|
|
|
33897
34226
|
inputType: "textarea",
|
|
33898
34227
|
rows: 2,
|
|
33899
34228
|
value: draft,
|
|
33900
|
-
placeholder:
|
|
34229
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33901
34230
|
onChange: (e) => setDraft(e.target.value),
|
|
33902
|
-
"aria-label":
|
|
34231
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33903
34232
|
}
|
|
33904
34233
|
),
|
|
33905
34234
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33911,10 +34240,10 @@ var init_ReplyTree = __esm({
|
|
|
33911
34240
|
leftIcon: "send",
|
|
33912
34241
|
onClick: handleSubmitReply,
|
|
33913
34242
|
disabled: !draft.trim(),
|
|
33914
|
-
children: "
|
|
34243
|
+
children: t("replyTree.send")
|
|
33915
34244
|
}
|
|
33916
34245
|
),
|
|
33917
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
34246
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33918
34247
|
] })
|
|
33919
34248
|
] }),
|
|
33920
34249
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33928,7 +34257,7 @@ var init_ReplyTree = __esm({
|
|
|
33928
34257
|
"self-start gap-1 px-0 h-auto",
|
|
33929
34258
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33930
34259
|
),
|
|
33931
|
-
children: "
|
|
34260
|
+
children: t("replyTree.continueThread")
|
|
33932
34261
|
}
|
|
33933
34262
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33934
34263
|
ReplyTreeNode,
|
|
@@ -33967,6 +34296,7 @@ var init_ReplyTree = __esm({
|
|
|
33967
34296
|
showActions = true,
|
|
33968
34297
|
className
|
|
33969
34298
|
}) => {
|
|
34299
|
+
const { t } = useTranslate();
|
|
33970
34300
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33971
34301
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33972
34302
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33985,7 +34315,7 @@ var init_ReplyTree = __esm({
|
|
|
33985
34315
|
});
|
|
33986
34316
|
}, []);
|
|
33987
34317
|
if (nodeList.length === 0) {
|
|
33988
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
34318
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
33989
34319
|
}
|
|
33990
34320
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33991
34321
|
ReplyTreeNode,
|
|
@@ -34063,6 +34393,7 @@ var init_VersionDiff = __esm({
|
|
|
34063
34393
|
"use client";
|
|
34064
34394
|
init_cn();
|
|
34065
34395
|
init_useEventBus();
|
|
34396
|
+
init_useTranslate();
|
|
34066
34397
|
init_atoms2();
|
|
34067
34398
|
init_Stack();
|
|
34068
34399
|
INLINE_STYLES = {
|
|
@@ -34085,6 +34416,7 @@ var init_VersionDiff = __esm({
|
|
|
34085
34416
|
language,
|
|
34086
34417
|
className
|
|
34087
34418
|
}) => {
|
|
34419
|
+
const { t } = useTranslate();
|
|
34088
34420
|
const eventBus = useEventBus();
|
|
34089
34421
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
34090
34422
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34166,24 +34498,24 @@ var init_VersionDiff = __esm({
|
|
|
34166
34498
|
children: [
|
|
34167
34499
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
34168
34500
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
34169
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
34501
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
34170
34502
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
34171
34503
|
Select,
|
|
34172
34504
|
{
|
|
34173
34505
|
options,
|
|
34174
34506
|
value: activeBeforeId,
|
|
34175
34507
|
onChange: handleBeforeChange,
|
|
34176
|
-
"aria-label": "
|
|
34508
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
34177
34509
|
}
|
|
34178
34510
|
) }),
|
|
34179
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
34511
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
34180
34512
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
34181
34513
|
Select,
|
|
34182
34514
|
{
|
|
34183
34515
|
options,
|
|
34184
34516
|
value: activeAfterId,
|
|
34185
34517
|
onChange: handleAfterChange,
|
|
34186
|
-
"aria-label": "
|
|
34518
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
34187
34519
|
}
|
|
34188
34520
|
) }),
|
|
34189
34521
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -34204,7 +34536,7 @@ var init_VersionDiff = __esm({
|
|
|
34204
34536
|
size: "sm",
|
|
34205
34537
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
34206
34538
|
onClick: handleViewToggle,
|
|
34207
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
34539
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
34208
34540
|
}
|
|
34209
34541
|
),
|
|
34210
34542
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -34214,7 +34546,7 @@ var init_VersionDiff = __esm({
|
|
|
34214
34546
|
size: "sm",
|
|
34215
34547
|
icon: "rotate-ccw",
|
|
34216
34548
|
onClick: handleRevert,
|
|
34217
|
-
children: "
|
|
34549
|
+
children: t("versionDiff.revert")
|
|
34218
34550
|
}
|
|
34219
34551
|
)
|
|
34220
34552
|
] })
|
|
@@ -34231,12 +34563,12 @@ var init_VersionDiff = __esm({
|
|
|
34231
34563
|
children: [
|
|
34232
34564
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
34233
34565
|
beforeRev?.label,
|
|
34234
|
-
beforeRev?.author ?
|
|
34566
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
34235
34567
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
34236
34568
|
] }),
|
|
34237
34569
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
34238
34570
|
afterRev?.label,
|
|
34239
|
-
afterRev?.author ?
|
|
34571
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
34240
34572
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
34241
34573
|
] })
|
|
34242
34574
|
]
|
|
@@ -34629,10 +34961,12 @@ var init_DocPagination = __esm({
|
|
|
34629
34961
|
}
|
|
34630
34962
|
});
|
|
34631
34963
|
function DocSearch({
|
|
34632
|
-
placeholder
|
|
34964
|
+
placeholder,
|
|
34633
34965
|
onSearch,
|
|
34634
34966
|
className
|
|
34635
34967
|
}) {
|
|
34968
|
+
const { t } = useTranslate();
|
|
34969
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34636
34970
|
const [query, setQuery] = useState("");
|
|
34637
34971
|
const [results, setResults] = useState([]);
|
|
34638
34972
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34739,7 +35073,7 @@ function DocSearch({
|
|
|
34739
35073
|
Input,
|
|
34740
35074
|
{
|
|
34741
35075
|
inputType: "search",
|
|
34742
|
-
placeholder,
|
|
35076
|
+
placeholder: resolvedPlaceholder,
|
|
34743
35077
|
value: query,
|
|
34744
35078
|
onChange: handleChange,
|
|
34745
35079
|
onFocus: handleFocus,
|
|
@@ -34804,6 +35138,7 @@ var init_DocSearch = __esm({
|
|
|
34804
35138
|
init_Typography();
|
|
34805
35139
|
init_Icon();
|
|
34806
35140
|
init_Input();
|
|
35141
|
+
init_useTranslate();
|
|
34807
35142
|
}
|
|
34808
35143
|
});
|
|
34809
35144
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36808,8 +37143,8 @@ var init_SignaturePad = __esm({
|
|
|
36808
37143
|
init_useEventBus();
|
|
36809
37144
|
init_useTranslate();
|
|
36810
37145
|
SignaturePad = ({
|
|
36811
|
-
label
|
|
36812
|
-
helperText
|
|
37146
|
+
label,
|
|
37147
|
+
helperText,
|
|
36813
37148
|
strokeColor,
|
|
36814
37149
|
strokeWidth = 2,
|
|
36815
37150
|
height = 200,
|
|
@@ -36825,6 +37160,8 @@ var init_SignaturePad = __esm({
|
|
|
36825
37160
|
}) => {
|
|
36826
37161
|
const eventBus = useEventBus();
|
|
36827
37162
|
const { t } = useTranslate();
|
|
37163
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
37164
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36828
37165
|
const canvasRef = useRef(null);
|
|
36829
37166
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36830
37167
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36927,7 +37264,7 @@ var init_SignaturePad = __esm({
|
|
|
36927
37264
|
);
|
|
36928
37265
|
}
|
|
36929
37266
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36930
|
-
|
|
37267
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36931
37268
|
/* @__PURE__ */ jsx(
|
|
36932
37269
|
Box,
|
|
36933
37270
|
{
|
|
@@ -36956,7 +37293,7 @@ var init_SignaturePad = __esm({
|
|
|
36956
37293
|
)
|
|
36957
37294
|
}
|
|
36958
37295
|
),
|
|
36959
|
-
|
|
37296
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36960
37297
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36961
37298
|
/* @__PURE__ */ jsx(
|
|
36962
37299
|
Button,
|
|
@@ -36966,7 +37303,7 @@ var init_SignaturePad = __esm({
|
|
|
36966
37303
|
icon: Eraser,
|
|
36967
37304
|
onClick: clearSignature,
|
|
36968
37305
|
disabled: !hasSignature,
|
|
36969
|
-
children: "
|
|
37306
|
+
children: t("signaturePad.clear")
|
|
36970
37307
|
}
|
|
36971
37308
|
),
|
|
36972
37309
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36977,7 +37314,7 @@ var init_SignaturePad = __esm({
|
|
|
36977
37314
|
icon: Check,
|
|
36978
37315
|
onClick: confirmSignature,
|
|
36979
37316
|
disabled: !hasSignature,
|
|
36980
|
-
children: "
|
|
37317
|
+
children: t("signaturePad.confirm")
|
|
36981
37318
|
}
|
|
36982
37319
|
)
|
|
36983
37320
|
] })
|
|
@@ -41422,6 +41759,7 @@ function MasterDetail({
|
|
|
41422
41759
|
className,
|
|
41423
41760
|
...rest
|
|
41424
41761
|
}) {
|
|
41762
|
+
const { t } = useTranslate();
|
|
41425
41763
|
const loading = externalLoading ?? false;
|
|
41426
41764
|
const isLoading = externalIsLoading ?? false;
|
|
41427
41765
|
const error = externalError ?? null;
|
|
@@ -41434,8 +41772,8 @@ function MasterDetail({
|
|
|
41434
41772
|
isLoading: loading || isLoading,
|
|
41435
41773
|
error,
|
|
41436
41774
|
className,
|
|
41437
|
-
emptyTitle: "
|
|
41438
|
-
emptyDescription: "
|
|
41775
|
+
emptyTitle: t("table.empty.title"),
|
|
41776
|
+
emptyDescription: t("empty.createFirst"),
|
|
41439
41777
|
...rest
|
|
41440
41778
|
}
|
|
41441
41779
|
);
|
|
@@ -41444,6 +41782,7 @@ var init_MasterDetail = __esm({
|
|
|
41444
41782
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41445
41783
|
"use client";
|
|
41446
41784
|
init_DataTable();
|
|
41785
|
+
init_useTranslate();
|
|
41447
41786
|
MasterDetail.displayName = "MasterDetail";
|
|
41448
41787
|
}
|
|
41449
41788
|
});
|
|
@@ -41452,14 +41791,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41452
41791
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41453
41792
|
init_cn();
|
|
41454
41793
|
init_Typography();
|
|
41455
|
-
|
|
41456
|
-
|
|
41457
|
-
{
|
|
41458
|
-
|
|
41459
|
-
|
|
41460
|
-
|
|
41461
|
-
|
|
41462
|
-
|
|
41794
|
+
init_useTranslate();
|
|
41795
|
+
DefaultEmptyDetail = () => {
|
|
41796
|
+
const { t } = useTranslate();
|
|
41797
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
41798
|
+
Typography,
|
|
41799
|
+
{
|
|
41800
|
+
variant: "body2",
|
|
41801
|
+
className: "text-muted-foreground",
|
|
41802
|
+
children: t("masterDetail.selectItem")
|
|
41803
|
+
}
|
|
41804
|
+
) });
|
|
41805
|
+
};
|
|
41463
41806
|
MasterDetailLayout = ({
|
|
41464
41807
|
master,
|
|
41465
41808
|
detail,
|
|
@@ -41586,7 +41929,7 @@ var init_MediaGallery = __esm({
|
|
|
41586
41929
|
{
|
|
41587
41930
|
icon: Image$1,
|
|
41588
41931
|
title: t("display.noMedia"),
|
|
41589
|
-
description: "
|
|
41932
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41590
41933
|
className
|
|
41591
41934
|
}
|
|
41592
41935
|
);
|
|
@@ -41603,7 +41946,7 @@ var init_MediaGallery = __esm({
|
|
|
41603
41946
|
size: "sm",
|
|
41604
41947
|
icon: Upload,
|
|
41605
41948
|
action: "MEDIA_UPLOAD",
|
|
41606
|
-
children: "
|
|
41949
|
+
children: t("mediaGallery.upload")
|
|
41607
41950
|
}
|
|
41608
41951
|
),
|
|
41609
41952
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41617,10 +41960,7 @@ var init_MediaGallery = __esm({
|
|
|
41617
41960
|
))
|
|
41618
41961
|
] })
|
|
41619
41962
|
] }),
|
|
41620
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41621
|
-
selectedItems.length,
|
|
41622
|
-
" selected"
|
|
41623
|
-
] }) }),
|
|
41963
|
+
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 }) }) }),
|
|
41624
41964
|
/* @__PURE__ */ jsx(
|
|
41625
41965
|
Box,
|
|
41626
41966
|
{
|
|
@@ -42475,7 +42815,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42475
42815
|
EmptyState,
|
|
42476
42816
|
{
|
|
42477
42817
|
title: t("debug.noActiveTraits"),
|
|
42478
|
-
description: "
|
|
42818
|
+
description: t("debug.traitsMountHint"),
|
|
42479
42819
|
className: "py-8"
|
|
42480
42820
|
}
|
|
42481
42821
|
);
|
|
@@ -42485,14 +42825,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42485
42825
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42486
42826
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42487
42827
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42488
|
-
/* @__PURE__ */
|
|
42489
|
-
trait.transitionCount,
|
|
42490
|
-
" transitions"
|
|
42491
|
-
] })
|
|
42828
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42492
42829
|
] }),
|
|
42493
42830
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42494
42831
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42495
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42832
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
42496
42833
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42497
42834
|
Badge,
|
|
42498
42835
|
{
|
|
@@ -42504,7 +42841,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42504
42841
|
)) })
|
|
42505
42842
|
] }),
|
|
42506
42843
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42507
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42844
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
42508
42845
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42509
42846
|
t2.from,
|
|
42510
42847
|
" \u2192 ",
|
|
@@ -42523,7 +42860,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42523
42860
|
] }, i)) })
|
|
42524
42861
|
] }),
|
|
42525
42862
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42526
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
42863
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
42527
42864
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42528
42865
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42529
42866
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -42629,7 +42966,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42629
42966
|
EmptyState,
|
|
42630
42967
|
{
|
|
42631
42968
|
title: t("debug.noEntityData"),
|
|
42632
|
-
description: "
|
|
42969
|
+
description: t("debug.debugModeHint"),
|
|
42633
42970
|
className: "py-8"
|
|
42634
42971
|
}
|
|
42635
42972
|
);
|
|
@@ -42642,7 +42979,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42642
42979
|
EmptyState,
|
|
42643
42980
|
{
|
|
42644
42981
|
title: t("debug.noEntities"),
|
|
42645
|
-
description: "
|
|
42982
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42646
42983
|
className: "py-8"
|
|
42647
42984
|
}
|
|
42648
42985
|
);
|
|
@@ -42650,7 +42987,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42650
42987
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42651
42988
|
id: `singleton-${name}`,
|
|
42652
42989
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42653
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42990
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42654
42991
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42655
42992
|
] }),
|
|
42656
42993
|
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) })
|
|
@@ -42668,31 +43005,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42668
43005
|
}));
|
|
42669
43006
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42670
43007
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42671
|
-
/* @__PURE__ */
|
|
42672
|
-
"Singletons (",
|
|
42673
|
-
singletonItems.length,
|
|
42674
|
-
")"
|
|
42675
|
-
] }),
|
|
43008
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42676
43009
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42677
43010
|
] }),
|
|
42678
43011
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42679
|
-
/* @__PURE__ */
|
|
42680
|
-
"Runtime (",
|
|
42681
|
-
runtimeEntities.length,
|
|
42682
|
-
")"
|
|
42683
|
-
] }),
|
|
43012
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42684
43013
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42685
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42686
|
-
"+",
|
|
42687
|
-
runtimeEntities.length - 20,
|
|
42688
|
-
" more entities"
|
|
42689
|
-
] })
|
|
43014
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
42690
43015
|
] }),
|
|
42691
43016
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42692
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
43017
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
42693
43018
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42694
43019
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42695
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
43020
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
42696
43021
|
] }, type)) })
|
|
42697
43022
|
] })
|
|
42698
43023
|
] });
|
|
@@ -42736,7 +43061,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42736
43061
|
EmptyState,
|
|
42737
43062
|
{
|
|
42738
43063
|
title: t("debug.noEventsYet"),
|
|
42739
|
-
description: "
|
|
43064
|
+
description: t("debug.eventsExecuteHint"),
|
|
42740
43065
|
className: "py-8"
|
|
42741
43066
|
}
|
|
42742
43067
|
);
|
|
@@ -42747,17 +43072,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42747
43072
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42748
43073
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42749
43074
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42750
|
-
/* @__PURE__ */
|
|
43075
|
+
/* @__PURE__ */ jsx(
|
|
42751
43076
|
Button,
|
|
42752
43077
|
{
|
|
42753
43078
|
size: "sm",
|
|
42754
43079
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42755
43080
|
onClick: () => setFilter("all"),
|
|
42756
|
-
children:
|
|
42757
|
-
"All (",
|
|
42758
|
-
events2.length,
|
|
42759
|
-
")"
|
|
42760
|
-
]
|
|
43081
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42761
43082
|
}
|
|
42762
43083
|
),
|
|
42763
43084
|
eventTypes.map((type) => {
|
|
@@ -42787,7 +43108,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42787
43108
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42788
43109
|
}
|
|
42789
43110
|
),
|
|
42790
|
-
"
|
|
43111
|
+
t("debug.autoScroll")
|
|
42791
43112
|
] })
|
|
42792
43113
|
] }),
|
|
42793
43114
|
/* @__PURE__ */ jsx(
|
|
@@ -42845,7 +43166,7 @@ function GuardsPanel({ guards }) {
|
|
|
42845
43166
|
EmptyState,
|
|
42846
43167
|
{
|
|
42847
43168
|
title: t("debug.noGuardEvaluations"),
|
|
42848
|
-
description: "
|
|
43169
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42849
43170
|
className: "py-8"
|
|
42850
43171
|
}
|
|
42851
43172
|
);
|
|
@@ -42876,15 +43197,15 @@ function GuardsPanel({ guards }) {
|
|
|
42876
43197
|
] }),
|
|
42877
43198
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42878
43199
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42879
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43200
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
42880
43201
|
/* @__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 })
|
|
42881
43202
|
] }),
|
|
42882
43203
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42883
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43204
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
42884
43205
|
/* @__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) })
|
|
42885
43206
|
] }),
|
|
42886
43207
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42887
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
43208
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
42888
43209
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42889
43210
|
] })
|
|
42890
43211
|
] })
|
|
@@ -42902,9 +43223,9 @@ function GuardsPanel({ guards }) {
|
|
|
42902
43223
|
] })
|
|
42903
43224
|
] }),
|
|
42904
43225
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42905
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42906
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42907
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
43226
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
43227
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
43228
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
42908
43229
|
] })
|
|
42909
43230
|
] }),
|
|
42910
43231
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -43030,7 +43351,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43030
43351
|
EmptyState,
|
|
43031
43352
|
{
|
|
43032
43353
|
title: t("debug.noTransitionsRecorded"),
|
|
43033
|
-
description: "
|
|
43354
|
+
description: t("debug.transitionsProcessHint"),
|
|
43034
43355
|
className: "py-8"
|
|
43035
43356
|
}
|
|
43036
43357
|
);
|
|
@@ -43047,10 +43368,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43047
43368
|
const sorted = [...transitions].reverse();
|
|
43048
43369
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
43049
43370
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
43050
|
-
/* @__PURE__ */
|
|
43051
|
-
transitions.length,
|
|
43052
|
-
" transitions recorded"
|
|
43053
|
-
] }),
|
|
43371
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
43054
43372
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
43055
43373
|
/* @__PURE__ */ jsx(
|
|
43056
43374
|
Checkbox,
|
|
@@ -43059,7 +43377,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43059
43377
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
43060
43378
|
}
|
|
43061
43379
|
),
|
|
43062
|
-
"
|
|
43380
|
+
t("debug.autoScroll")
|
|
43063
43381
|
] })
|
|
43064
43382
|
] }),
|
|
43065
43383
|
/* @__PURE__ */ jsx(
|
|
@@ -43102,15 +43420,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
43102
43420
|
variant: trace.guardResult ? "success" : "danger",
|
|
43103
43421
|
size: "sm",
|
|
43104
43422
|
children: [
|
|
43105
|
-
"
|
|
43423
|
+
t("debug.guardLabel"),
|
|
43424
|
+
" ",
|
|
43106
43425
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
43107
43426
|
]
|
|
43108
43427
|
}
|
|
43109
43428
|
),
|
|
43110
|
-
/* @__PURE__ */
|
|
43111
|
-
trace.effects.length,
|
|
43112
|
-
" effects"
|
|
43113
|
-
] })
|
|
43429
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
43114
43430
|
] }),
|
|
43115
43431
|
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: [
|
|
43116
43432
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -43159,13 +43475,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43159
43475
|
EmptyState,
|
|
43160
43476
|
{
|
|
43161
43477
|
title: t("debug.noBridgeData"),
|
|
43162
|
-
description: "
|
|
43478
|
+
description: t("debug.bridgeInitHint"),
|
|
43163
43479
|
className: "py-8"
|
|
43164
43480
|
}
|
|
43165
43481
|
);
|
|
43166
43482
|
}
|
|
43167
43483
|
const formatTime4 = (ts) => {
|
|
43168
|
-
if (ts === 0) return "
|
|
43484
|
+
if (ts === 0) return t("debug.never");
|
|
43169
43485
|
const d = new Date(ts);
|
|
43170
43486
|
return d.toLocaleTimeString("en-US", {
|
|
43171
43487
|
hour12: false,
|
|
@@ -43178,14 +43494,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43178
43494
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
43179
43495
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
43180
43496
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
43181
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43497
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
43182
43498
|
] }),
|
|
43183
43499
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
43184
43500
|
/* @__PURE__ */ jsx(
|
|
43185
43501
|
StatRow,
|
|
43186
43502
|
{
|
|
43187
43503
|
label: t("debug.status"),
|
|
43188
|
-
value: bridge.connected ? "
|
|
43504
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
43189
43505
|
variant: bridge.connected ? "success" : "danger"
|
|
43190
43506
|
}
|
|
43191
43507
|
),
|
|
@@ -43213,13 +43529,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43213
43529
|
] })
|
|
43214
43530
|
] }),
|
|
43215
43531
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
43216
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
43532
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
43217
43533
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
43218
43534
|
] }),
|
|
43219
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
43220
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
43221
|
-
" total events processed"
|
|
43222
|
-
] }) })
|
|
43535
|
+
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 }) }) })
|
|
43223
43536
|
] }) });
|
|
43224
43537
|
}
|
|
43225
43538
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43329,7 +43642,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43329
43642
|
EmptyState,
|
|
43330
43643
|
{
|
|
43331
43644
|
title: t("debug.noActiveTraits"),
|
|
43332
|
-
description: "
|
|
43645
|
+
description: t("debug.traitsInitHint"),
|
|
43333
43646
|
className: "py-8"
|
|
43334
43647
|
}
|
|
43335
43648
|
);
|
|
@@ -43346,7 +43659,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43346
43659
|
};
|
|
43347
43660
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43348
43661
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43349
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43662
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
43350
43663
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43351
43664
|
trait.name,
|
|
43352
43665
|
": ",
|
|
@@ -43354,8 +43667,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43354
43667
|
] }, trait.id)) })
|
|
43355
43668
|
] }),
|
|
43356
43669
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43357
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43358
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
43670
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
43671
|
+
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: [
|
|
43359
43672
|
/* @__PURE__ */ jsx(
|
|
43360
43673
|
Button,
|
|
43361
43674
|
{
|
|
@@ -43367,15 +43680,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43367
43680
|
}
|
|
43368
43681
|
),
|
|
43369
43682
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43370
|
-
transitions.some((
|
|
43683
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43371
43684
|
] }, event)) })
|
|
43372
43685
|
] }),
|
|
43373
43686
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43374
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43687
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43375
43688
|
/* @__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)) })
|
|
43376
43689
|
] }),
|
|
43377
43690
|
log12.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
43378
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43691
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43379
43692
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43380
43693
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43381
43694
|
" ",
|
|
@@ -43406,21 +43719,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43406
43719
|
}
|
|
43407
43720
|
});
|
|
43408
43721
|
function ServerResponseRow({ sr }) {
|
|
43722
|
+
const { t } = useTranslate();
|
|
43409
43723
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43410
43724
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43411
43725
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43412
43726
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43413
43727
|
sr.success ? "\u2713" : "\u2717",
|
|
43414
|
-
"
|
|
43728
|
+
" ",
|
|
43729
|
+
t("debug.server")
|
|
43415
43730
|
] }),
|
|
43416
43731
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43417
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
43418
|
-
sr.clientEffects,
|
|
43419
|
-
" clientEffect",
|
|
43420
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43421
|
-
] }),
|
|
43732
|
+
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 }) }),
|
|
43422
43733
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43423
|
-
"
|
|
43734
|
+
t("debug.emitLabel"),
|
|
43735
|
+
" ",
|
|
43424
43736
|
sr.emittedEvents.join(", ")
|
|
43425
43737
|
] }),
|
|
43426
43738
|
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 })
|
|
@@ -43428,13 +43740,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43428
43740
|
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: [
|
|
43429
43741
|
name,
|
|
43430
43742
|
": ",
|
|
43431
|
-
count
|
|
43432
|
-
" row",
|
|
43433
|
-
count !== 1 ? "s" : ""
|
|
43743
|
+
t("debug.rowsCount", { count })
|
|
43434
43744
|
] }, name)) })
|
|
43435
43745
|
] });
|
|
43436
43746
|
}
|
|
43437
43747
|
function TransitionRow({ trace }) {
|
|
43748
|
+
const { t } = useTranslate();
|
|
43438
43749
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43439
43750
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43440
43751
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43442,7 +43753,7 @@ function TransitionRow({ trace }) {
|
|
|
43442
43753
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43443
43754
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43444
43755
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43445
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
43756
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
43446
43757
|
] }),
|
|
43447
43758
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43448
43759
|
] });
|
|
@@ -43483,6 +43794,7 @@ function VerifyModePanel({
|
|
|
43483
43794
|
serverCount,
|
|
43484
43795
|
localCount
|
|
43485
43796
|
}) {
|
|
43797
|
+
const { t } = useTranslate();
|
|
43486
43798
|
const [expanded, setExpanded] = React85.useState(true);
|
|
43487
43799
|
const scrollRef = React85.useRef(null);
|
|
43488
43800
|
const prevCountRef = React85.useRef(0);
|
|
@@ -43513,30 +43825,20 @@ function VerifyModePanel({
|
|
|
43513
43825
|
onClick: () => setExpanded((v) => !v),
|
|
43514
43826
|
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",
|
|
43515
43827
|
"aria-expanded": expanded,
|
|
43516
|
-
"aria-label": expanded ? "
|
|
43828
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43517
43829
|
"data-testid": "debugger-verify-toggle",
|
|
43518
43830
|
children: [
|
|
43519
43831
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43520
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43521
|
-
/* @__PURE__ */
|
|
43522
|
-
|
|
43523
|
-
" local"
|
|
43524
|
-
] }),
|
|
43525
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43526
|
-
serverCount,
|
|
43527
|
-
" server"
|
|
43528
|
-
] }),
|
|
43832
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
43833
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
43834
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
43529
43835
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43530
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43531
|
-
transitions.length,
|
|
43532
|
-
" transition",
|
|
43533
|
-
transitions.length !== 1 ? "s" : ""
|
|
43534
|
-
] })
|
|
43836
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43535
43837
|
]
|
|
43536
43838
|
}
|
|
43537
43839
|
),
|
|
43538
43840
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43539
|
-
/* @__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: "
|
|
43841
|
+
/* @__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)) }) }) }),
|
|
43540
43842
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43541
43843
|
] })
|
|
43542
43844
|
]
|
|
@@ -43552,6 +43854,7 @@ function RuntimeDebugger({
|
|
|
43552
43854
|
defaultTab,
|
|
43553
43855
|
schema
|
|
43554
43856
|
}) {
|
|
43857
|
+
const { t } = useTranslate();
|
|
43555
43858
|
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43556
43859
|
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43557
43860
|
const debugData = useDebugData();
|
|
@@ -43590,55 +43893,55 @@ function RuntimeDebugger({
|
|
|
43590
43893
|
const tabItems = [
|
|
43591
43894
|
{
|
|
43592
43895
|
id: "dispatch",
|
|
43593
|
-
label: "
|
|
43896
|
+
label: t("debug.tabDispatch"),
|
|
43594
43897
|
badge: debugData.traits.length || void 0,
|
|
43595
43898
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43596
43899
|
},
|
|
43597
43900
|
{
|
|
43598
43901
|
id: "verify",
|
|
43599
|
-
label: failedChecks > 0 ? "
|
|
43902
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43600
43903
|
badge: verification.summary.totalChecks || void 0,
|
|
43601
43904
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43602
43905
|
},
|
|
43603
43906
|
{
|
|
43604
43907
|
id: "timeline",
|
|
43605
|
-
label: "
|
|
43908
|
+
label: t("debug.tabTimeline"),
|
|
43606
43909
|
badge: verification.transitions.length || void 0,
|
|
43607
43910
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43608
43911
|
},
|
|
43609
43912
|
{
|
|
43610
43913
|
id: "bridge",
|
|
43611
|
-
label: "
|
|
43914
|
+
label: t("debug.tabBridge"),
|
|
43612
43915
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43613
43916
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43614
43917
|
},
|
|
43615
43918
|
{
|
|
43616
43919
|
id: "traits",
|
|
43617
|
-
label: "
|
|
43920
|
+
label: t("debug.tabTraits"),
|
|
43618
43921
|
badge: debugData.traits.length || void 0,
|
|
43619
43922
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43620
43923
|
},
|
|
43621
43924
|
{
|
|
43622
43925
|
id: "ticks",
|
|
43623
|
-
label: "
|
|
43624
|
-
badge: debugData.ticks.filter((
|
|
43926
|
+
label: t("debug.tabTicks"),
|
|
43927
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43625
43928
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43626
43929
|
},
|
|
43627
43930
|
{
|
|
43628
43931
|
id: "entities",
|
|
43629
|
-
label: "
|
|
43932
|
+
label: t("debug.tabEntities"),
|
|
43630
43933
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43631
43934
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43632
43935
|
},
|
|
43633
43936
|
{
|
|
43634
43937
|
id: "events",
|
|
43635
|
-
label: "
|
|
43938
|
+
label: t("debug.tabEvents"),
|
|
43636
43939
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43637
43940
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43638
43941
|
},
|
|
43639
43942
|
{
|
|
43640
43943
|
id: "guards",
|
|
43641
|
-
label: "
|
|
43944
|
+
label: t("debug.tabGuards"),
|
|
43642
43945
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43643
43946
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43644
43947
|
}
|
|
@@ -43666,15 +43969,10 @@ function RuntimeDebugger({
|
|
|
43666
43969
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43667
43970
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43668
43971
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43669
|
-
"
|
|
43972
|
+
" ",
|
|
43973
|
+
t("debug.debugger")
|
|
43670
43974
|
] }),
|
|
43671
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43672
|
-
failedChecks,
|
|
43673
|
-
" failed"
|
|
43674
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43675
|
-
debugData.traits.length,
|
|
43676
|
-
" traits"
|
|
43677
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
43975
|
+
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") })
|
|
43678
43976
|
] })
|
|
43679
43977
|
}
|
|
43680
43978
|
),
|
|
@@ -43692,9 +43990,9 @@ function RuntimeDebugger({
|
|
|
43692
43990
|
);
|
|
43693
43991
|
}
|
|
43694
43992
|
if (mode === "verify") {
|
|
43695
|
-
const traitStates = debugData.traits.map((
|
|
43696
|
-
const serverEntries = verification.transitions.filter((
|
|
43697
|
-
const localEntries = verification.transitions.filter((
|
|
43993
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
43994
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
43995
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
43698
43996
|
return /* @__PURE__ */ jsx(
|
|
43699
43997
|
VerifyModePanel,
|
|
43700
43998
|
{
|
|
@@ -43726,7 +44024,7 @@ function RuntimeDebugger({
|
|
|
43726
44024
|
variant: "secondary",
|
|
43727
44025
|
size: "sm",
|
|
43728
44026
|
className: "runtime-debugger__toggle",
|
|
43729
|
-
title: "
|
|
44027
|
+
title: t("debug.openDebugger"),
|
|
43730
44028
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43731
44029
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43732
44030
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43736,11 +44034,8 @@ function RuntimeDebugger({
|
|
|
43736
44034
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43737
44035
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43738
44036
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43739
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43740
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43741
|
-
failedChecks,
|
|
43742
|
-
" failed"
|
|
43743
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
44037
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
44038
|
+
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") })
|
|
43744
44039
|
] }),
|
|
43745
44040
|
/* @__PURE__ */ jsx(
|
|
43746
44041
|
Button,
|
|
@@ -43748,7 +44043,7 @@ function RuntimeDebugger({
|
|
|
43748
44043
|
onClick: () => setIsCollapsed(true),
|
|
43749
44044
|
variant: "ghost",
|
|
43750
44045
|
size: "sm",
|
|
43751
|
-
title: "
|
|
44046
|
+
title: t("debug.close"),
|
|
43752
44047
|
children: "x"
|
|
43753
44048
|
}
|
|
43754
44049
|
)
|
|
@@ -43762,7 +44057,7 @@ function RuntimeDebugger({
|
|
|
43762
44057
|
className: "runtime-debugger__tabs"
|
|
43763
44058
|
}
|
|
43764
44059
|
) }),
|
|
43765
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
44060
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
43766
44061
|
] })
|
|
43767
44062
|
}
|
|
43768
44063
|
);
|
|
@@ -43788,6 +44083,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43788
44083
|
init_TransitionTimeline();
|
|
43789
44084
|
init_ServerBridgeTab();
|
|
43790
44085
|
init_EventDispatcherTab();
|
|
44086
|
+
init_useTranslate();
|
|
43791
44087
|
init_RuntimeDebugger();
|
|
43792
44088
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43793
44089
|
}
|
|
@@ -45076,7 +45372,7 @@ var init_StatCard = __esm({
|
|
|
45076
45372
|
}
|
|
45077
45373
|
);
|
|
45078
45374
|
}
|
|
45079
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45375
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
45080
45376
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
45081
45377
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
45082
45378
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45119,7 +45415,7 @@ var init_StatCard = __esm({
|
|
|
45119
45415
|
]
|
|
45120
45416
|
}
|
|
45121
45417
|
),
|
|
45122
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45418
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
45123
45419
|
] }),
|
|
45124
45420
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45125
45421
|
] }),
|