@almadar/ui 5.21.7 → 5.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +970 -650
- package/dist/avl/index.js +970 -650
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +675 -370
- package/dist/components/index.js +675 -370
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +675 -370
- package/dist/providers/index.js +675 -370
- package/dist/runtime/index.cjs +675 -370
- package/dist/runtime/index.js +675 -370
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/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
|
)
|
|
@@ -14382,9 +14676,18 @@ var init_MarkdownContent = __esm({
|
|
|
14382
14676
|
);
|
|
14383
14677
|
}
|
|
14384
14678
|
return /* @__PURE__ */ jsx(
|
|
14385
|
-
"
|
|
14679
|
+
"code",
|
|
14386
14680
|
{
|
|
14681
|
+
...props,
|
|
14682
|
+
className: codeClassName,
|
|
14387
14683
|
style: {
|
|
14684
|
+
backgroundColor: "var(--color-muted)",
|
|
14685
|
+
color: "var(--color-foreground)",
|
|
14686
|
+
border: "1px solid var(--color-border)",
|
|
14687
|
+
padding: "0.125rem 0.375rem",
|
|
14688
|
+
borderRadius: "0.25rem",
|
|
14689
|
+
fontSize: "0.875em",
|
|
14690
|
+
fontFamily: "ui-monospace, monospace",
|
|
14388
14691
|
whiteSpace: "pre-wrap",
|
|
14389
14692
|
wordBreak: "break-word"
|
|
14390
14693
|
},
|
|
@@ -14807,7 +15110,7 @@ var init_StateMachineView = __esm({
|
|
|
14807
15110
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14808
15111
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
14809
15112
|
const isSingle2 = bundle.labels.length === 1;
|
|
14810
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
15113
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14811
15114
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
14812
15115
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
14813
15116
|
const cx = fromState.x;
|
|
@@ -14933,7 +15236,7 @@ var init_StateMachineView = __esm({
|
|
|
14933
15236
|
const controlX = midX + perpX;
|
|
14934
15237
|
const controlY = midY + perpY;
|
|
14935
15238
|
const isSingle = bundle.labels.length === 1;
|
|
14936
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
15239
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
14937
15240
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
14938
15241
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
14939
15242
|
const curveMidpoint = {
|
|
@@ -15088,7 +15391,7 @@ var init_StateMachineView = __esm({
|
|
|
15088
15391
|
{
|
|
15089
15392
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
15090
15393
|
style: { backgroundColor: "var(--color-success)" },
|
|
15091
|
-
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") })
|
|
15092
15395
|
}
|
|
15093
15396
|
),
|
|
15094
15397
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -15110,10 +15413,7 @@ var init_StateMachineView = __esm({
|
|
|
15110
15413
|
{
|
|
15111
15414
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
15112
15415
|
style: { backgroundColor: "var(--color-accent)" },
|
|
15113
|
-
children: /* @__PURE__ */
|
|
15114
|
-
bundle.labels.length,
|
|
15115
|
-
" events"
|
|
15116
|
-
] })
|
|
15416
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
15117
15417
|
}
|
|
15118
15418
|
)
|
|
15119
15419
|
]
|
|
@@ -15258,7 +15558,7 @@ var init_StateMachineView = __esm({
|
|
|
15258
15558
|
align: "center",
|
|
15259
15559
|
className: "mb-2",
|
|
15260
15560
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
15261
|
-
children: "
|
|
15561
|
+
children: t("stateMachine.externalEffects")
|
|
15262
15562
|
}
|
|
15263
15563
|
),
|
|
15264
15564
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -15278,10 +15578,10 @@ var init_StateMachineView = __esm({
|
|
|
15278
15578
|
Legend = ({ config, y }) => {
|
|
15279
15579
|
const { t } = useTranslate();
|
|
15280
15580
|
const items = [
|
|
15281
|
-
{ label: "
|
|
15282
|
-
{ label: "
|
|
15283
|
-
{ label: "
|
|
15284
|
-
{ 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 }
|
|
15285
15585
|
];
|
|
15286
15586
|
return /* @__PURE__ */ jsx(
|
|
15287
15587
|
HStack,
|
|
@@ -15296,8 +15596,8 @@ var init_StateMachineView = __esm({
|
|
|
15296
15596
|
{
|
|
15297
15597
|
className: "w-3 h-3 rounded-full",
|
|
15298
15598
|
style: {
|
|
15299
|
-
backgroundColor: item.
|
|
15300
|
-
border: item.
|
|
15599
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
15600
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
15301
15601
|
}
|
|
15302
15602
|
}
|
|
15303
15603
|
),
|
|
@@ -15309,7 +15609,7 @@ var init_StateMachineView = __esm({
|
|
|
15309
15609
|
children: item.label
|
|
15310
15610
|
}
|
|
15311
15611
|
)
|
|
15312
|
-
] }, item.
|
|
15612
|
+
] }, item.key))
|
|
15313
15613
|
}
|
|
15314
15614
|
);
|
|
15315
15615
|
};
|
|
@@ -16103,13 +16403,13 @@ var init_JazariStateMachine = __esm({
|
|
|
16103
16403
|
);
|
|
16104
16404
|
}, [resolvedTrait, entityFields]);
|
|
16105
16405
|
if (isLoading) {
|
|
16106
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
16406
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
16107
16407
|
}
|
|
16108
16408
|
if (error) {
|
|
16109
16409
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
16110
16410
|
}
|
|
16111
16411
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
16112
|
-
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") }) });
|
|
16113
16413
|
}
|
|
16114
16414
|
return /* @__PURE__ */ jsx(
|
|
16115
16415
|
StateMachineView,
|
|
@@ -17153,13 +17453,13 @@ var init_LayoutPatterns = __esm({
|
|
|
17153
17453
|
function generateRuleId() {
|
|
17154
17454
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
17155
17455
|
}
|
|
17156
|
-
function questionsToOptions(questions,
|
|
17456
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
17157
17457
|
const opts = questions.map((q) => ({
|
|
17158
17458
|
value: q.id,
|
|
17159
17459
|
label: q.label
|
|
17160
17460
|
}));
|
|
17161
|
-
if (
|
|
17162
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
17461
|
+
if (endOfSurveyLabel !== null) {
|
|
17462
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
17163
17463
|
}
|
|
17164
17464
|
return opts;
|
|
17165
17465
|
}
|
|
@@ -17168,7 +17468,7 @@ function isRuleBroken(rule, questions) {
|
|
|
17168
17468
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
17169
17469
|
return !sourceExists || !targetExists;
|
|
17170
17470
|
}
|
|
17171
|
-
var END_OF_SURVEY,
|
|
17471
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
17172
17472
|
var init_BranchingLogicBuilder = __esm({
|
|
17173
17473
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
17174
17474
|
"use client";
|
|
@@ -17181,14 +17481,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17181
17481
|
init_FilterPill();
|
|
17182
17482
|
init_Box();
|
|
17183
17483
|
init_useEventBus();
|
|
17484
|
+
init_useTranslate();
|
|
17184
17485
|
init_cn();
|
|
17185
17486
|
END_OF_SURVEY = "end-of-survey";
|
|
17186
|
-
OPERATOR_OPTIONS = [
|
|
17187
|
-
{ value: "equals", label: "equals" },
|
|
17188
|
-
{ value: "not-equals", label: "does not equal" },
|
|
17189
|
-
{ value: "contains", label: "contains" },
|
|
17190
|
-
{ value: "in", label: "is one of" }
|
|
17191
|
-
];
|
|
17192
17487
|
RuleRow = ({
|
|
17193
17488
|
rule,
|
|
17194
17489
|
questions,
|
|
@@ -17197,8 +17492,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17197
17492
|
onChange,
|
|
17198
17493
|
onDelete
|
|
17199
17494
|
}) => {
|
|
17200
|
-
const
|
|
17201
|
-
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
|
+
);
|
|
17202
17510
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
17203
17511
|
const valueOptions = useMemo(() => {
|
|
17204
17512
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -17243,22 +17551,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17243
17551
|
),
|
|
17244
17552
|
children: [
|
|
17245
17553
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
17246
|
-
/* @__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") }),
|
|
17247
17555
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17248
17556
|
Select,
|
|
17249
17557
|
{
|
|
17250
17558
|
options: sourceOptions,
|
|
17251
17559
|
value: rule.sourceQuestionId,
|
|
17252
|
-
placeholder: "
|
|
17560
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
17253
17561
|
onChange: handleSource,
|
|
17254
17562
|
disabled: readOnly,
|
|
17255
|
-
error: broken ? "
|
|
17563
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
17256
17564
|
}
|
|
17257
17565
|
) }),
|
|
17258
17566
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
17259
17567
|
Select,
|
|
17260
17568
|
{
|
|
17261
|
-
options:
|
|
17569
|
+
options: operatorOptions,
|
|
17262
17570
|
value: rule.operator,
|
|
17263
17571
|
onChange: handleOperator,
|
|
17264
17572
|
disabled: readOnly
|
|
@@ -17281,7 +17589,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17281
17589
|
{
|
|
17282
17590
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
17283
17591
|
value: "",
|
|
17284
|
-
placeholder: "
|
|
17592
|
+
placeholder: t("branchingLogic.addValue"),
|
|
17285
17593
|
onChange: handleAddChip,
|
|
17286
17594
|
disabled: readOnly
|
|
17287
17595
|
}
|
|
@@ -17289,7 +17597,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17289
17597
|
Input,
|
|
17290
17598
|
{
|
|
17291
17599
|
inputType: "text",
|
|
17292
|
-
placeholder: "
|
|
17600
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
17293
17601
|
value: "",
|
|
17294
17602
|
onKeyDown: (e) => {
|
|
17295
17603
|
if (e.key !== "Enter") return;
|
|
@@ -17307,7 +17615,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17307
17615
|
{
|
|
17308
17616
|
options: valueOptions,
|
|
17309
17617
|
value: scalarValue,
|
|
17310
|
-
placeholder: "
|
|
17618
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
17311
17619
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
17312
17620
|
disabled: readOnly
|
|
17313
17621
|
}
|
|
@@ -17315,7 +17623,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17315
17623
|
Input,
|
|
17316
17624
|
{
|
|
17317
17625
|
inputType: "text",
|
|
17318
|
-
placeholder: "
|
|
17626
|
+
placeholder: t("branchingLogic.value"),
|
|
17319
17627
|
value: scalarValue,
|
|
17320
17628
|
onChange: handleScalarValue,
|
|
17321
17629
|
disabled: readOnly
|
|
@@ -17323,17 +17631,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17323
17631
|
) }),
|
|
17324
17632
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
17325
17633
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
17326
|
-
"
|
|
17634
|
+
t("branchingLogic.goTo")
|
|
17327
17635
|
] }),
|
|
17328
17636
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
17329
17637
|
Select,
|
|
17330
17638
|
{
|
|
17331
17639
|
options: targetOptions,
|
|
17332
17640
|
value: rule.targetQuestionId,
|
|
17333
|
-
placeholder: "
|
|
17641
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
17334
17642
|
onChange: handleTarget,
|
|
17335
17643
|
disabled: readOnly,
|
|
17336
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
17644
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
17337
17645
|
}
|
|
17338
17646
|
) }),
|
|
17339
17647
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -17345,11 +17653,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17345
17653
|
action: "DELETE_RULE",
|
|
17346
17654
|
actionPayload: { ruleId: rule.id },
|
|
17347
17655
|
onClick: onDelete,
|
|
17348
|
-
"aria-label": "
|
|
17656
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
17349
17657
|
}
|
|
17350
17658
|
)
|
|
17351
17659
|
] }),
|
|
17352
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
17660
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
17353
17661
|
]
|
|
17354
17662
|
}
|
|
17355
17663
|
);
|
|
@@ -17359,10 +17667,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17359
17667
|
NODE_GAP_Y = 80;
|
|
17360
17668
|
PADDING = 32;
|
|
17361
17669
|
LogicGraph = ({ questions, rules }) => {
|
|
17670
|
+
const { t } = useTranslate();
|
|
17671
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17362
17672
|
const layout = useMemo(() => {
|
|
17363
17673
|
const items = [
|
|
17364
17674
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
17365
|
-
{ id: END_OF_SURVEY, label:
|
|
17675
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
17366
17676
|
];
|
|
17367
17677
|
const positions = {};
|
|
17368
17678
|
items.forEach((item, i) => {
|
|
@@ -17374,14 +17684,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17374
17684
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
17375
17685
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
17376
17686
|
return { items, positions, width, height };
|
|
17377
|
-
}, [questions]);
|
|
17687
|
+
}, [questions, endOfSurveyLabel]);
|
|
17378
17688
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
17379
17689
|
"svg",
|
|
17380
17690
|
{
|
|
17381
17691
|
width: layout.width,
|
|
17382
17692
|
height: layout.height,
|
|
17383
17693
|
role: "img",
|
|
17384
|
-
"aria-label": "
|
|
17694
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
17385
17695
|
style: { display: "block" },
|
|
17386
17696
|
children: [
|
|
17387
17697
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -17489,6 +17799,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17489
17799
|
readOnly = false,
|
|
17490
17800
|
className
|
|
17491
17801
|
}) => {
|
|
17802
|
+
const { t } = useTranslate();
|
|
17492
17803
|
const eventBus = useEventBus();
|
|
17493
17804
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17494
17805
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17541,16 +17852,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17541
17852
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
17542
17853
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
17543
17854
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
17544
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
17855
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
17545
17856
|
/* @__PURE__ */ jsx(
|
|
17546
17857
|
Badge,
|
|
17547
17858
|
{
|
|
17548
17859
|
variant: "neutral",
|
|
17549
17860
|
size: "sm",
|
|
17550
|
-
label:
|
|
17861
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
17551
17862
|
}
|
|
17552
17863
|
),
|
|
17553
|
-
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
|
+
)
|
|
17554
17872
|
] }),
|
|
17555
17873
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
17556
17874
|
/* @__PURE__ */ jsx(
|
|
@@ -17561,7 +17879,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17561
17879
|
leftIcon: Pencil,
|
|
17562
17880
|
action: "VIEW_EDIT",
|
|
17563
17881
|
onClick: () => setView("edit"),
|
|
17564
|
-
children: "
|
|
17882
|
+
children: t("branchingLogic.rules")
|
|
17565
17883
|
}
|
|
17566
17884
|
),
|
|
17567
17885
|
/* @__PURE__ */ jsx(
|
|
@@ -17572,13 +17890,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17572
17890
|
leftIcon: Eye,
|
|
17573
17891
|
action: "VIEW_GRAPH",
|
|
17574
17892
|
onClick: () => setView("graph"),
|
|
17575
|
-
children: "
|
|
17893
|
+
children: t("branchingLogic.logicGraph")
|
|
17576
17894
|
}
|
|
17577
17895
|
)
|
|
17578
17896
|
] })
|
|
17579
17897
|
] }),
|
|
17580
17898
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
17581
|
-
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(
|
|
17582
17900
|
RuleRow,
|
|
17583
17901
|
{
|
|
17584
17902
|
rule,
|
|
@@ -17599,7 +17917,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17599
17917
|
action: "ADD_RULE",
|
|
17600
17918
|
onClick: handleAddRule,
|
|
17601
17919
|
disabled: noQuestions,
|
|
17602
|
-
children: "
|
|
17920
|
+
children: t("branchingLogic.addRule")
|
|
17603
17921
|
}
|
|
17604
17922
|
) })
|
|
17605
17923
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -18226,7 +18544,7 @@ function CalendarGrid({
|
|
|
18226
18544
|
onClick: stepPrev,
|
|
18227
18545
|
"aria-disabled": !canPrev || void 0,
|
|
18228
18546
|
"aria-label": t("aria.previousDays"),
|
|
18229
|
-
children: "
|
|
18547
|
+
children: t("nav.previous")
|
|
18230
18548
|
}
|
|
18231
18549
|
),
|
|
18232
18550
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -18239,7 +18557,7 @@ function CalendarGrid({
|
|
|
18239
18557
|
onClick: stepNext,
|
|
18240
18558
|
"aria-disabled": !canNext || void 0,
|
|
18241
18559
|
"aria-label": t("aria.nextDays"),
|
|
18242
|
-
children: "
|
|
18560
|
+
children: t("nav.next")
|
|
18243
18561
|
}
|
|
18244
18562
|
)
|
|
18245
18563
|
] }),
|
|
@@ -19789,7 +20107,7 @@ var init_Pagination = __esm({
|
|
|
19789
20107
|
type: "number",
|
|
19790
20108
|
value: jumpToPage,
|
|
19791
20109
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
19792
|
-
placeholder: "
|
|
20110
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
19793
20111
|
className: "w-20",
|
|
19794
20112
|
onKeyDown: (e) => {
|
|
19795
20113
|
if (e.key === "Enter") {
|
|
@@ -19927,13 +20245,10 @@ var init_CardGrid = __esm({
|
|
|
19927
20245
|
return children;
|
|
19928
20246
|
}
|
|
19929
20247
|
if (isLoading) {
|
|
19930
|
-
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") }) });
|
|
19931
20249
|
}
|
|
19932
20250
|
if (error) {
|
|
19933
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
19934
|
-
"Error loading items: ",
|
|
19935
|
-
error.message
|
|
19936
|
-
] }) });
|
|
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 }) }) });
|
|
19937
20252
|
}
|
|
19938
20253
|
if (normalizedData.length === 0) {
|
|
19939
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" }) });
|
|
@@ -23799,7 +24114,7 @@ function DataGrid({
|
|
|
23799
24114
|
onChange: () => toggleSelection(id),
|
|
23800
24115
|
onClick: (e) => e.stopPropagation(),
|
|
23801
24116
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
23802
|
-
"aria-label":
|
|
24117
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
23803
24118
|
}
|
|
23804
24119
|
),
|
|
23805
24120
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -23997,7 +24312,7 @@ function formatDate3(value) {
|
|
|
23997
24312
|
if (isNaN(d.getTime())) return String(value);
|
|
23998
24313
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
23999
24314
|
}
|
|
24000
|
-
function formatValue2(value, format) {
|
|
24315
|
+
function formatValue2(value, format, boolLabels) {
|
|
24001
24316
|
if (value === void 0 || value === null) return "";
|
|
24002
24317
|
switch (format) {
|
|
24003
24318
|
case "date":
|
|
@@ -24009,7 +24324,7 @@ function formatValue2(value, format) {
|
|
|
24009
24324
|
case "percent":
|
|
24010
24325
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
24011
24326
|
case "boolean":
|
|
24012
|
-
return value ? "Yes" : "No";
|
|
24327
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
24013
24328
|
default:
|
|
24014
24329
|
return String(value);
|
|
24015
24330
|
}
|
|
@@ -24305,7 +24620,7 @@ function DataList({
|
|
|
24305
24620
|
field.label ?? fieldLabel3(field.name),
|
|
24306
24621
|
":"
|
|
24307
24622
|
] }),
|
|
24308
|
-
/* @__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") }) })
|
|
24309
24624
|
] }, field.name);
|
|
24310
24625
|
}) }),
|
|
24311
24626
|
progressFields.map((field) => {
|
|
@@ -24435,6 +24750,7 @@ var init_FileTree = __esm({
|
|
|
24435
24750
|
init_Box();
|
|
24436
24751
|
init_Typography();
|
|
24437
24752
|
init_Icon();
|
|
24753
|
+
init_useTranslate();
|
|
24438
24754
|
TreeNodeItem = ({
|
|
24439
24755
|
node,
|
|
24440
24756
|
depth,
|
|
@@ -24520,8 +24836,9 @@ var init_FileTree = __esm({
|
|
|
24520
24836
|
className,
|
|
24521
24837
|
indent = 16
|
|
24522
24838
|
}) => {
|
|
24839
|
+
const { t } = useTranslate();
|
|
24523
24840
|
if (tree.length === 0) {
|
|
24524
|
-
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") }) });
|
|
24525
24842
|
}
|
|
24526
24843
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
24527
24844
|
TreeNodeItem,
|
|
@@ -24640,6 +24957,7 @@ var init_FilterGroup = __esm({
|
|
|
24640
24957
|
init_Icon();
|
|
24641
24958
|
init_useEventBus();
|
|
24642
24959
|
init_useQuerySingleton();
|
|
24960
|
+
init_useTranslate();
|
|
24643
24961
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24644
24962
|
lookStyles6 = {
|
|
24645
24963
|
toolbar: "",
|
|
@@ -24660,6 +24978,7 @@ var init_FilterGroup = __esm({
|
|
|
24660
24978
|
isLoading,
|
|
24661
24979
|
look = "toolbar"
|
|
24662
24980
|
}) => {
|
|
24981
|
+
const { t } = useTranslate();
|
|
24663
24982
|
const eventBus = useEventBus();
|
|
24664
24983
|
const queryState = useQuerySingleton(query);
|
|
24665
24984
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -24741,7 +25060,7 @@ var init_FilterGroup = __esm({
|
|
|
24741
25060
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
24742
25061
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24743
25062
|
),
|
|
24744
|
-
children: "
|
|
25063
|
+
children: t("filterGroup.all")
|
|
24745
25064
|
}
|
|
24746
25065
|
),
|
|
24747
25066
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -24769,7 +25088,7 @@ var init_FilterGroup = __esm({
|
|
|
24769
25088
|
size: "sm",
|
|
24770
25089
|
onClick: handleClearAll,
|
|
24771
25090
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24772
|
-
children: "
|
|
25091
|
+
children: t("filterGroup.clear")
|
|
24773
25092
|
}
|
|
24774
25093
|
)
|
|
24775
25094
|
]
|
|
@@ -24780,7 +25099,7 @@ var init_FilterGroup = __esm({
|
|
|
24780
25099
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
24781
25100
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
24782
25101
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24783
|
-
/* @__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") })
|
|
24784
25103
|
] }),
|
|
24785
25104
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
24786
25105
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -24803,7 +25122,7 @@ var init_FilterGroup = __esm({
|
|
|
24803
25122
|
`${filter.field}_from`,
|
|
24804
25123
|
e.target.value || null
|
|
24805
25124
|
),
|
|
24806
|
-
placeholder: "
|
|
25125
|
+
placeholder: t("filterGroup.from"),
|
|
24807
25126
|
clearable: true,
|
|
24808
25127
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
24809
25128
|
}
|
|
@@ -24817,7 +25136,7 @@ var init_FilterGroup = __esm({
|
|
|
24817
25136
|
`${filter.field}_to`,
|
|
24818
25137
|
e.target.value || null
|
|
24819
25138
|
),
|
|
24820
|
-
placeholder: "
|
|
25139
|
+
placeholder: t("filterGroup.to"),
|
|
24821
25140
|
clearable: true,
|
|
24822
25141
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
24823
25142
|
}
|
|
@@ -24837,7 +25156,7 @@ var init_FilterGroup = __esm({
|
|
|
24837
25156
|
value: selectedValues[filter.field] || "all",
|
|
24838
25157
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24839
25158
|
options: [
|
|
24840
|
-
{ value: "all", label: "
|
|
25159
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
24841
25160
|
...filter.options?.map((opt) => ({
|
|
24842
25161
|
value: opt,
|
|
24843
25162
|
label: opt
|
|
@@ -24854,7 +25173,7 @@ var init_FilterGroup = __esm({
|
|
|
24854
25173
|
onClick: handleClearAll,
|
|
24855
25174
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
24856
25175
|
className: "self-start",
|
|
24857
|
-
children: "
|
|
25176
|
+
children: t("filterGroup.clearAll")
|
|
24858
25177
|
}
|
|
24859
25178
|
)
|
|
24860
25179
|
] });
|
|
@@ -24920,7 +25239,7 @@ var init_FilterGroup = __esm({
|
|
|
24920
25239
|
value: selectedValues[filter.field] || "all",
|
|
24921
25240
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
24922
25241
|
options: [
|
|
24923
|
-
{ value: "all", label:
|
|
25242
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
24924
25243
|
...filter.options?.map((opt) => ({
|
|
24925
25244
|
value: opt,
|
|
24926
25245
|
label: opt
|
|
@@ -24949,7 +25268,7 @@ var init_FilterGroup = __esm({
|
|
|
24949
25268
|
field
|
|
24950
25269
|
);
|
|
24951
25270
|
}),
|
|
24952
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
25271
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
24953
25272
|
] })
|
|
24954
25273
|
]
|
|
24955
25274
|
}
|
|
@@ -24974,7 +25293,7 @@ var init_FilterGroup = __esm({
|
|
|
24974
25293
|
className: "text-muted-foreground",
|
|
24975
25294
|
children: [
|
|
24976
25295
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24977
|
-
/* @__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") })
|
|
24978
25297
|
]
|
|
24979
25298
|
}
|
|
24980
25299
|
),
|
|
@@ -25000,7 +25319,7 @@ var init_FilterGroup = __esm({
|
|
|
25000
25319
|
`${filter.field}_from`,
|
|
25001
25320
|
e.target.value || null
|
|
25002
25321
|
),
|
|
25003
|
-
placeholder: "
|
|
25322
|
+
placeholder: t("filterGroup.from"),
|
|
25004
25323
|
clearable: true,
|
|
25005
25324
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
25006
25325
|
className: "min-w-[130px]"
|
|
@@ -25016,7 +25335,7 @@ var init_FilterGroup = __esm({
|
|
|
25016
25335
|
`${filter.field}_to`,
|
|
25017
25336
|
e.target.value || null
|
|
25018
25337
|
),
|
|
25019
|
-
placeholder: "
|
|
25338
|
+
placeholder: t("filterGroup.to"),
|
|
25020
25339
|
clearable: true,
|
|
25021
25340
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
25022
25341
|
className: "min-w-[130px]"
|
|
@@ -25038,7 +25357,7 @@ var init_FilterGroup = __esm({
|
|
|
25038
25357
|
value: selectedValues[filter.field] || "all",
|
|
25039
25358
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
25040
25359
|
options: [
|
|
25041
|
-
{ value: "all", label: "
|
|
25360
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
25042
25361
|
...filter.options?.map((opt) => ({
|
|
25043
25362
|
value: opt,
|
|
25044
25363
|
label: opt
|
|
@@ -25049,10 +25368,7 @@ var init_FilterGroup = __esm({
|
|
|
25049
25368
|
)
|
|
25050
25369
|
] }, filter.field)),
|
|
25051
25370
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
25052
|
-
/* @__PURE__ */
|
|
25053
|
-
activeFilterCount,
|
|
25054
|
-
" active"
|
|
25055
|
-
] }),
|
|
25371
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
25056
25372
|
/* @__PURE__ */ jsx(
|
|
25057
25373
|
Button,
|
|
25058
25374
|
{
|
|
@@ -25060,7 +25376,7 @@ var init_FilterGroup = __esm({
|
|
|
25060
25376
|
size: "sm",
|
|
25061
25377
|
onClick: handleClearAll,
|
|
25062
25378
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
25063
|
-
children: "
|
|
25379
|
+
children: t("filterGroup.clearAll")
|
|
25064
25380
|
}
|
|
25065
25381
|
)
|
|
25066
25382
|
] })
|
|
@@ -26004,19 +26320,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
26004
26320
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
26005
26321
|
}
|
|
26006
26322
|
});
|
|
26007
|
-
var
|
|
26323
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
26008
26324
|
var init_ViolationAlert = __esm({
|
|
26009
26325
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26010
26326
|
init_cn();
|
|
26327
|
+
init_useTranslate();
|
|
26011
26328
|
init_Box();
|
|
26012
26329
|
init_Stack();
|
|
26013
26330
|
init_Typography();
|
|
26014
26331
|
init_Button();
|
|
26015
26332
|
init_Icon();
|
|
26016
|
-
|
|
26017
|
-
measure: "
|
|
26018
|
-
admin: "
|
|
26019
|
-
penalty: "
|
|
26333
|
+
actionTypeLabelKeys = {
|
|
26334
|
+
measure: "violationAlert.actionType.measure",
|
|
26335
|
+
admin: "violationAlert.actionType.admin",
|
|
26336
|
+
penalty: "violationAlert.actionType.penalty"
|
|
26020
26337
|
};
|
|
26021
26338
|
actionTypeIcons = {
|
|
26022
26339
|
measure: "alert-triangle",
|
|
@@ -26033,10 +26350,11 @@ var init_ViolationAlert = __esm({
|
|
|
26033
26350
|
className,
|
|
26034
26351
|
...flatProps
|
|
26035
26352
|
}) => {
|
|
26353
|
+
const { t } = useTranslate();
|
|
26036
26354
|
const resolvedViolation = violation ?? {
|
|
26037
26355
|
law: "",
|
|
26038
26356
|
article: "",
|
|
26039
|
-
message: flatProps.message ?? "
|
|
26357
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
26040
26358
|
actionType: "measure"
|
|
26041
26359
|
};
|
|
26042
26360
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -26121,7 +26439,7 @@ var init_ViolationAlert = __esm({
|
|
|
26121
26439
|
{
|
|
26122
26440
|
variant: "caption",
|
|
26123
26441
|
className: cn(textColor, "opacity-75"),
|
|
26124
|
-
children:
|
|
26442
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
26125
26443
|
}
|
|
26126
26444
|
)
|
|
26127
26445
|
] })
|
|
@@ -26152,7 +26470,7 @@ var init_ViolationAlert = __esm({
|
|
|
26152
26470
|
{
|
|
26153
26471
|
variant: "caption",
|
|
26154
26472
|
className: cn(textColor, "opacity-75"),
|
|
26155
|
-
children: "
|
|
26473
|
+
children: t("violationAlert.adminLabel")
|
|
26156
26474
|
}
|
|
26157
26475
|
),
|
|
26158
26476
|
/* @__PURE__ */ jsx(
|
|
@@ -26171,7 +26489,7 @@ var init_ViolationAlert = __esm({
|
|
|
26171
26489
|
{
|
|
26172
26490
|
variant: "caption",
|
|
26173
26491
|
className: cn(textColor, "opacity-75"),
|
|
26174
|
-
children: "
|
|
26492
|
+
children: t("violationAlert.penaltyLabel")
|
|
26175
26493
|
}
|
|
26176
26494
|
),
|
|
26177
26495
|
/* @__PURE__ */ jsx(
|
|
@@ -26196,7 +26514,7 @@ var init_ViolationAlert = __esm({
|
|
|
26196
26514
|
className: cn(textColor, "self-start"),
|
|
26197
26515
|
children: [
|
|
26198
26516
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
26199
|
-
"
|
|
26517
|
+
t("violationAlert.goToField")
|
|
26200
26518
|
]
|
|
26201
26519
|
}
|
|
26202
26520
|
)
|
|
@@ -26512,6 +26830,7 @@ var init_LineChart = __esm({
|
|
|
26512
26830
|
"use client";
|
|
26513
26831
|
init_cn();
|
|
26514
26832
|
init_atoms2();
|
|
26833
|
+
init_useTranslate();
|
|
26515
26834
|
LineChart2 = ({
|
|
26516
26835
|
data,
|
|
26517
26836
|
width = 400,
|
|
@@ -26523,6 +26842,7 @@ var init_LineChart = __esm({
|
|
|
26523
26842
|
areaColor = "var(--color-primary)",
|
|
26524
26843
|
className
|
|
26525
26844
|
}) => {
|
|
26845
|
+
const { t } = useTranslate();
|
|
26526
26846
|
const gradientId = useId();
|
|
26527
26847
|
const safeData = data ?? [];
|
|
26528
26848
|
const sortedData = useMemo(() => {
|
|
@@ -26559,7 +26879,7 @@ var init_LineChart = __esm({
|
|
|
26559
26879
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
26560
26880
|
}, [linePath, points, height, showArea]);
|
|
26561
26881
|
if (safeData.length === 0) {
|
|
26562
|
-
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") });
|
|
26563
26883
|
}
|
|
26564
26884
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
26565
26885
|
"svg",
|
|
@@ -28466,6 +28786,7 @@ var init_GraphView = __esm({
|
|
|
28466
28786
|
"use client";
|
|
28467
28787
|
init_cn();
|
|
28468
28788
|
init_atoms2();
|
|
28789
|
+
init_useTranslate();
|
|
28469
28790
|
GROUP_COLORS = [
|
|
28470
28791
|
"#3b82f6",
|
|
28471
28792
|
// blue-500
|
|
@@ -28498,6 +28819,7 @@ var init_GraphView = __esm({
|
|
|
28498
28819
|
showLabels = true,
|
|
28499
28820
|
zoomToFit = true
|
|
28500
28821
|
}) => {
|
|
28822
|
+
const { t } = useTranslate();
|
|
28501
28823
|
const containerRef = useRef(null);
|
|
28502
28824
|
const animRef = useRef(0);
|
|
28503
28825
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -28675,7 +28997,7 @@ var init_GraphView = __esm({
|
|
|
28675
28997
|
[onNodeClick]
|
|
28676
28998
|
);
|
|
28677
28999
|
if (nodes.length === 0) {
|
|
28678
|
-
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") }) });
|
|
28679
29001
|
}
|
|
28680
29002
|
return /* @__PURE__ */ jsx(
|
|
28681
29003
|
Box,
|
|
@@ -29131,11 +29453,12 @@ var init_UploadDropZone = __esm({
|
|
|
29131
29453
|
init_Icon();
|
|
29132
29454
|
init_Typography();
|
|
29133
29455
|
init_useEventBus();
|
|
29456
|
+
init_useTranslate();
|
|
29134
29457
|
UploadDropZone = ({
|
|
29135
29458
|
accept,
|
|
29136
29459
|
maxSize,
|
|
29137
29460
|
maxFiles = 1,
|
|
29138
|
-
label
|
|
29461
|
+
label,
|
|
29139
29462
|
description,
|
|
29140
29463
|
disabled = false,
|
|
29141
29464
|
action,
|
|
@@ -29143,22 +29466,24 @@ var init_UploadDropZone = __esm({
|
|
|
29143
29466
|
onFiles,
|
|
29144
29467
|
className
|
|
29145
29468
|
}) => {
|
|
29469
|
+
const { t } = useTranslate();
|
|
29470
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
29146
29471
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
29147
29472
|
const [error, setError] = useState(null);
|
|
29148
29473
|
const inputRef = useRef(null);
|
|
29149
29474
|
const eventBus = useSafeEventBus7();
|
|
29150
29475
|
const defaultDescription = [
|
|
29151
|
-
accept ?
|
|
29152
|
-
maxSize ?
|
|
29153
|
-
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
|
|
29154
29479
|
].filter(Boolean).join(". ");
|
|
29155
29480
|
const validateFiles = useCallback(
|
|
29156
29481
|
(files) => {
|
|
29157
29482
|
if (files.length > maxFiles) {
|
|
29158
|
-
return { valid: [], error:
|
|
29483
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
29159
29484
|
}
|
|
29160
29485
|
if (accept) {
|
|
29161
|
-
const acceptedTypes = accept.split(",").map((
|
|
29486
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
29162
29487
|
const invalid = files.filter((file) => {
|
|
29163
29488
|
return !acceptedTypes.some((type) => {
|
|
29164
29489
|
if (type.endsWith("/*")) {
|
|
@@ -29168,7 +29493,7 @@ var init_UploadDropZone = __esm({
|
|
|
29168
29493
|
});
|
|
29169
29494
|
});
|
|
29170
29495
|
if (invalid.length > 0) {
|
|
29171
|
-
return { valid: [], error:
|
|
29496
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
29172
29497
|
}
|
|
29173
29498
|
}
|
|
29174
29499
|
if (maxSize) {
|
|
@@ -29176,13 +29501,13 @@ var init_UploadDropZone = __esm({
|
|
|
29176
29501
|
if (tooLarge.length > 0) {
|
|
29177
29502
|
return {
|
|
29178
29503
|
valid: [],
|
|
29179
|
-
error:
|
|
29504
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
29180
29505
|
};
|
|
29181
29506
|
}
|
|
29182
29507
|
}
|
|
29183
29508
|
return { valid: files, error: null };
|
|
29184
29509
|
},
|
|
29185
|
-
[accept, maxSize, maxFiles]
|
|
29510
|
+
[accept, maxSize, maxFiles, t]
|
|
29186
29511
|
);
|
|
29187
29512
|
const handleFiles = useCallback(
|
|
29188
29513
|
(files) => {
|
|
@@ -29253,7 +29578,7 @@ var init_UploadDropZone = __esm({
|
|
|
29253
29578
|
handleClick();
|
|
29254
29579
|
}
|
|
29255
29580
|
},
|
|
29256
|
-
"aria-label":
|
|
29581
|
+
"aria-label": resolvedLabel,
|
|
29257
29582
|
children: [
|
|
29258
29583
|
/* @__PURE__ */ jsx(
|
|
29259
29584
|
"input",
|
|
@@ -29269,7 +29594,7 @@ var init_UploadDropZone = __esm({
|
|
|
29269
29594
|
}
|
|
29270
29595
|
),
|
|
29271
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" }),
|
|
29272
|
-
/* @__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 }),
|
|
29273
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 })
|
|
29274
29599
|
]
|
|
29275
29600
|
}
|
|
@@ -29691,7 +30016,7 @@ function TableView({
|
|
|
29691
30016
|
{
|
|
29692
30017
|
checked: selected.has(id),
|
|
29693
30018
|
onChange: () => toggleRow(id),
|
|
29694
|
-
"aria-label":
|
|
30019
|
+
"aria-label": t("table.selectRow", { id })
|
|
29695
30020
|
}
|
|
29696
30021
|
) }),
|
|
29697
30022
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -32538,7 +32863,7 @@ var init_QrScanner = __esm({
|
|
|
32538
32863
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
32539
32864
|
children: [
|
|
32540
32865
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
32541
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32866
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
32542
32867
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
32543
32868
|
]
|
|
32544
32869
|
}
|
|
@@ -32549,7 +32874,7 @@ var init_QrScanner = __esm({
|
|
|
32549
32874
|
position: "absolute",
|
|
32550
32875
|
display: "flex",
|
|
32551
32876
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
32552
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
32877
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
32553
32878
|
}
|
|
32554
32879
|
),
|
|
32555
32880
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -32568,7 +32893,7 @@ var init_QrScanner = __esm({
|
|
|
32568
32893
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32569
32894
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32570
32895
|
),
|
|
32571
|
-
"aria-label": isPaused ? "
|
|
32896
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
32572
32897
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
32573
32898
|
}
|
|
32574
32899
|
),
|
|
@@ -32581,7 +32906,7 @@ var init_QrScanner = __esm({
|
|
|
32581
32906
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
32582
32907
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32583
32908
|
),
|
|
32584
|
-
"aria-label":
|
|
32909
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
32585
32910
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
32586
32911
|
}
|
|
32587
32912
|
),
|
|
@@ -32595,7 +32920,7 @@ var init_QrScanner = __esm({
|
|
|
32595
32920
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
32596
32921
|
),
|
|
32597
32922
|
"aria-label": t("aria.mockScanDev"),
|
|
32598
|
-
children: "
|
|
32923
|
+
children: t("qrScanner.mockScan")
|
|
32599
32924
|
}
|
|
32600
32925
|
)
|
|
32601
32926
|
]
|
|
@@ -32613,6 +32938,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32613
32938
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32614
32939
|
init_cn();
|
|
32615
32940
|
init_useEventBus();
|
|
32941
|
+
init_useTranslate();
|
|
32616
32942
|
init_Typography();
|
|
32617
32943
|
init_Box();
|
|
32618
32944
|
init_Label();
|
|
@@ -32622,36 +32948,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32622
32948
|
const sign = delta >= 0 ? "+" : "-";
|
|
32623
32949
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
32624
32950
|
};
|
|
32625
|
-
constraintHint = (constraint) => {
|
|
32951
|
+
constraintHint = (constraint, t) => {
|
|
32626
32952
|
if (constraint.type === "single") {
|
|
32627
|
-
return constraint.required ? "
|
|
32953
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
32628
32954
|
}
|
|
32629
32955
|
const { min, max } = constraint;
|
|
32630
32956
|
if (min && max) {
|
|
32631
|
-
return min === max ?
|
|
32957
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
32632
32958
|
}
|
|
32633
|
-
if (min) return
|
|
32634
|
-
if (max) return
|
|
32635
|
-
return "
|
|
32959
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
32960
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
32961
|
+
return t("optionConstraint.optional");
|
|
32636
32962
|
};
|
|
32637
|
-
validateSelection = (selected, constraint) => {
|
|
32963
|
+
validateSelection = (selected, constraint, t) => {
|
|
32638
32964
|
if (constraint.type === "single") {
|
|
32639
32965
|
if (constraint.required && selected.length === 0) {
|
|
32640
|
-
return "
|
|
32966
|
+
return t("optionConstraint.error.pickOne");
|
|
32641
32967
|
}
|
|
32642
32968
|
if (selected.length > 1) {
|
|
32643
|
-
return "
|
|
32969
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
32644
32970
|
}
|
|
32645
32971
|
return void 0;
|
|
32646
32972
|
}
|
|
32647
32973
|
const { min, max } = constraint;
|
|
32648
32974
|
if (min !== void 0 && selected.length < min) {
|
|
32649
32975
|
const remaining = min - selected.length;
|
|
32650
|
-
return
|
|
32976
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
32651
32977
|
}
|
|
32652
32978
|
if (max !== void 0 && selected.length > max) {
|
|
32653
32979
|
const excess = selected.length - max;
|
|
32654
|
-
return
|
|
32980
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
32655
32981
|
}
|
|
32656
32982
|
return void 0;
|
|
32657
32983
|
};
|
|
@@ -32668,8 +32994,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32668
32994
|
className
|
|
32669
32995
|
}) => {
|
|
32670
32996
|
const eventBus = useEventBus();
|
|
32671
|
-
const
|
|
32672
|
-
const
|
|
32997
|
+
const { t } = useTranslate();
|
|
32998
|
+
const hint = constraintHint(constraint, t);
|
|
32999
|
+
const error = validateSelection(selected, constraint, t);
|
|
32673
33000
|
const inputName = `option-${groupId}`;
|
|
32674
33001
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
32675
33002
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -32769,7 +33096,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32769
33096
|
variant: "caption",
|
|
32770
33097
|
color: "warning",
|
|
32771
33098
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
32772
|
-
children: "
|
|
33099
|
+
children: t("optionConstraint.outOfStock")
|
|
32773
33100
|
}
|
|
32774
33101
|
)
|
|
32775
33102
|
]
|
|
@@ -33091,6 +33418,7 @@ function changeBlockType(block, type) {
|
|
|
33091
33418
|
return { id: block.id, type, content: seed };
|
|
33092
33419
|
}
|
|
33093
33420
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33421
|
+
const { t } = useTranslate();
|
|
33094
33422
|
const [open, setOpen] = useState(false);
|
|
33095
33423
|
const ref = useRef(null);
|
|
33096
33424
|
useEffect(() => {
|
|
@@ -33110,7 +33438,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33110
33438
|
{
|
|
33111
33439
|
type: "button",
|
|
33112
33440
|
variant: "ghost",
|
|
33113
|
-
"aria-label": "
|
|
33441
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
33114
33442
|
className: cn(
|
|
33115
33443
|
"inline-flex items-center justify-center",
|
|
33116
33444
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -33132,7 +33460,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33132
33460
|
"py-1 text-sm"
|
|
33133
33461
|
),
|
|
33134
33462
|
children: [
|
|
33135
|
-
/* @__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]) }),
|
|
33136
33464
|
/* @__PURE__ */ jsxs(
|
|
33137
33465
|
Button,
|
|
33138
33466
|
{
|
|
@@ -33146,7 +33474,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33146
33474
|
},
|
|
33147
33475
|
children: [
|
|
33148
33476
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
33149
|
-
"
|
|
33477
|
+
" ",
|
|
33478
|
+
t("richBlockEditor.duplicate")
|
|
33150
33479
|
]
|
|
33151
33480
|
}
|
|
33152
33481
|
),
|
|
@@ -33163,14 +33492,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33163
33492
|
},
|
|
33164
33493
|
children: [
|
|
33165
33494
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
33166
|
-
"
|
|
33495
|
+
" ",
|
|
33496
|
+
t("common.delete")
|
|
33167
33497
|
]
|
|
33168
33498
|
}
|
|
33169
33499
|
),
|
|
33170
33500
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33171
33501
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
33172
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
33173
|
-
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(
|
|
33174
33504
|
Button,
|
|
33175
33505
|
{
|
|
33176
33506
|
type: "button",
|
|
@@ -33178,12 +33508,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
33178
33508
|
role: "menuitem",
|
|
33179
33509
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
33180
33510
|
onClick: () => {
|
|
33181
|
-
onChangeType(
|
|
33511
|
+
onChangeType(bt);
|
|
33182
33512
|
setOpen(false);
|
|
33183
33513
|
},
|
|
33184
|
-
children:
|
|
33514
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
33185
33515
|
},
|
|
33186
|
-
|
|
33516
|
+
bt
|
|
33187
33517
|
))
|
|
33188
33518
|
] })
|
|
33189
33519
|
]
|
|
@@ -33245,6 +33575,7 @@ function BlockRow({
|
|
|
33245
33575
|
onInsertAfter,
|
|
33246
33576
|
onChangeType
|
|
33247
33577
|
}) {
|
|
33578
|
+
const { t } = useTranslate();
|
|
33248
33579
|
const setContent = useCallback(
|
|
33249
33580
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
33250
33581
|
[onUpdate]
|
|
@@ -33294,8 +33625,8 @@ function BlockRow({
|
|
|
33294
33625
|
tag: "h1",
|
|
33295
33626
|
value: block.content ?? "",
|
|
33296
33627
|
readOnly,
|
|
33297
|
-
placeholder: placeholder ?? "
|
|
33298
|
-
ariaLabel: "
|
|
33628
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
33629
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
33299
33630
|
className: "text-3xl font-bold leading-tight",
|
|
33300
33631
|
onValueChange: setContent
|
|
33301
33632
|
}
|
|
@@ -33307,8 +33638,8 @@ function BlockRow({
|
|
|
33307
33638
|
tag: "h2",
|
|
33308
33639
|
value: block.content ?? "",
|
|
33309
33640
|
readOnly,
|
|
33310
|
-
placeholder: placeholder ?? "
|
|
33311
|
-
ariaLabel: "
|
|
33641
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
33642
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
33312
33643
|
className: "text-2xl font-semibold leading-tight",
|
|
33313
33644
|
onValueChange: setContent
|
|
33314
33645
|
}
|
|
@@ -33320,8 +33651,8 @@ function BlockRow({
|
|
|
33320
33651
|
tag: "h3",
|
|
33321
33652
|
value: block.content ?? "",
|
|
33322
33653
|
readOnly,
|
|
33323
|
-
placeholder: placeholder ?? "
|
|
33324
|
-
ariaLabel: "
|
|
33654
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
33655
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
33325
33656
|
className: "text-xl font-semibold leading-tight",
|
|
33326
33657
|
onValueChange: setContent
|
|
33327
33658
|
}
|
|
@@ -33333,8 +33664,8 @@ function BlockRow({
|
|
|
33333
33664
|
tag: "blockquote",
|
|
33334
33665
|
value: block.content ?? "",
|
|
33335
33666
|
readOnly,
|
|
33336
|
-
placeholder: placeholder ?? "
|
|
33337
|
-
ariaLabel: "
|
|
33667
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
33668
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
33338
33669
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
33339
33670
|
onValueChange: setContent
|
|
33340
33671
|
}
|
|
@@ -33342,13 +33673,13 @@ function BlockRow({
|
|
|
33342
33673
|
case "code":
|
|
33343
33674
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
33344
33675
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
33345
|
-
/* @__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") }),
|
|
33346
33677
|
!readOnly && /* @__PURE__ */ jsx(
|
|
33347
33678
|
Input,
|
|
33348
33679
|
{
|
|
33349
33680
|
inputType: "text",
|
|
33350
33681
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
33351
|
-
"aria-label": "
|
|
33682
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
33352
33683
|
className: cn(
|
|
33353
33684
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
33354
33685
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33364,8 +33695,8 @@ function BlockRow({
|
|
|
33364
33695
|
tag: "pre",
|
|
33365
33696
|
value: block.content ?? "",
|
|
33366
33697
|
readOnly,
|
|
33367
|
-
placeholder: placeholder ?? "
|
|
33368
|
-
ariaLabel: "
|
|
33698
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
33699
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
33369
33700
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
33370
33701
|
onValueChange: setContent
|
|
33371
33702
|
}
|
|
@@ -33378,7 +33709,7 @@ function BlockRow({
|
|
|
33378
33709
|
const caption = String(block.metadata?.caption ?? "");
|
|
33379
33710
|
const imgProps = {
|
|
33380
33711
|
src: url,
|
|
33381
|
-
alt: caption || "
|
|
33712
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
33382
33713
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
33383
33714
|
};
|
|
33384
33715
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -33392,7 +33723,8 @@ function BlockRow({
|
|
|
33392
33723
|
),
|
|
33393
33724
|
children: [
|
|
33394
33725
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
33395
|
-
"
|
|
33726
|
+
" ",
|
|
33727
|
+
t("richBlockEditor.noImageUrl")
|
|
33396
33728
|
]
|
|
33397
33729
|
}
|
|
33398
33730
|
),
|
|
@@ -33403,7 +33735,7 @@ function BlockRow({
|
|
|
33403
33735
|
inputType: "url",
|
|
33404
33736
|
value: url,
|
|
33405
33737
|
placeholder: "https://example.com/image.png",
|
|
33406
|
-
"aria-label": "
|
|
33738
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
33407
33739
|
className: cn(
|
|
33408
33740
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33409
33741
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33416,8 +33748,8 @@ function BlockRow({
|
|
|
33416
33748
|
{
|
|
33417
33749
|
inputType: "text",
|
|
33418
33750
|
value: caption,
|
|
33419
|
-
placeholder: "
|
|
33420
|
-
"aria-label": "
|
|
33751
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
33752
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
33421
33753
|
className: cn(
|
|
33422
33754
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
33423
33755
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -33448,8 +33780,8 @@ function BlockRow({
|
|
|
33448
33780
|
tag: "span",
|
|
33449
33781
|
value: child.content ?? "",
|
|
33450
33782
|
readOnly,
|
|
33451
|
-
placeholder: "
|
|
33452
|
-
ariaLabel: "
|
|
33783
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
33784
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
33453
33785
|
className: "inline-block min-w-[1ch] flex-1",
|
|
33454
33786
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
33455
33787
|
}
|
|
@@ -33459,7 +33791,7 @@ function BlockRow({
|
|
|
33459
33791
|
{
|
|
33460
33792
|
type: "button",
|
|
33461
33793
|
variant: "ghost",
|
|
33462
|
-
"aria-label": "
|
|
33794
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
33463
33795
|
className: cn(
|
|
33464
33796
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
33465
33797
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -33481,7 +33813,8 @@ function BlockRow({
|
|
|
33481
33813
|
onClick: addListItem,
|
|
33482
33814
|
children: [
|
|
33483
33815
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
33484
|
-
"
|
|
33816
|
+
" ",
|
|
33817
|
+
t("richBlockEditor.addItem")
|
|
33485
33818
|
]
|
|
33486
33819
|
}
|
|
33487
33820
|
) })
|
|
@@ -33497,8 +33830,8 @@ function BlockRow({
|
|
|
33497
33830
|
tag: "p",
|
|
33498
33831
|
value: block.content ?? "",
|
|
33499
33832
|
readOnly,
|
|
33500
|
-
placeholder: placeholder ?? "
|
|
33501
|
-
ariaLabel: "
|
|
33833
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
33834
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
33502
33835
|
className: "leading-7",
|
|
33503
33836
|
onValueChange: setContent
|
|
33504
33837
|
}
|
|
@@ -33521,7 +33854,7 @@ function BlockRow({
|
|
|
33521
33854
|
{
|
|
33522
33855
|
type: "button",
|
|
33523
33856
|
variant: "ghost",
|
|
33524
|
-
"aria-label": "
|
|
33857
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
33525
33858
|
className: cn(
|
|
33526
33859
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
33527
33860
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -33548,7 +33881,7 @@ function BlockRow({
|
|
|
33548
33881
|
}
|
|
33549
33882
|
);
|
|
33550
33883
|
}
|
|
33551
|
-
var TOOLBAR_ENTRIES,
|
|
33884
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
33552
33885
|
var init_RichBlockEditor = __esm({
|
|
33553
33886
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
33554
33887
|
"use client";
|
|
@@ -33561,29 +33894,30 @@ var init_RichBlockEditor = __esm({
|
|
|
33561
33894
|
init_Input();
|
|
33562
33895
|
init_Icon();
|
|
33563
33896
|
init_useEventBus();
|
|
33897
|
+
init_useTranslate();
|
|
33564
33898
|
TOOLBAR_ENTRIES = [
|
|
33565
|
-
{ type: "paragraph",
|
|
33566
|
-
{ type: "heading-1",
|
|
33567
|
-
{ type: "heading-2",
|
|
33568
|
-
{ type: "heading-3",
|
|
33569
|
-
{ type: "bullet-list",
|
|
33570
|
-
{ type: "numbered-list",
|
|
33571
|
-
{ type: "quote",
|
|
33572
|
-
{ type: "code",
|
|
33573
|
-
{ type: "divider",
|
|
33574
|
-
{ 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 }
|
|
33575
33909
|
];
|
|
33576
|
-
|
|
33577
|
-
paragraph: "
|
|
33578
|
-
"heading-1": "
|
|
33579
|
-
"heading-2": "
|
|
33580
|
-
"heading-3": "
|
|
33581
|
-
"bullet-list": "
|
|
33582
|
-
"numbered-list": "
|
|
33583
|
-
quote: "
|
|
33584
|
-
code: "
|
|
33585
|
-
divider: "
|
|
33586
|
-
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"
|
|
33587
33921
|
};
|
|
33588
33922
|
CHANGEABLE_TYPES = [
|
|
33589
33923
|
"paragraph",
|
|
@@ -33617,6 +33951,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33617
33951
|
showToolbar = true,
|
|
33618
33952
|
className
|
|
33619
33953
|
}) => {
|
|
33954
|
+
const { t } = useTranslate();
|
|
33620
33955
|
const [blocks, setBlocks] = useState(
|
|
33621
33956
|
() => normalizeBlocks(initialBlocks)
|
|
33622
33957
|
);
|
|
@@ -33688,25 +34023,26 @@ var init_RichBlockEditor = __esm({
|
|
|
33688
34023
|
Box,
|
|
33689
34024
|
{
|
|
33690
34025
|
role: "toolbar",
|
|
33691
|
-
"aria-label": "
|
|
34026
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
33692
34027
|
className: cn(
|
|
33693
34028
|
"flex flex-wrap items-center gap-1",
|
|
33694
34029
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
33695
34030
|
),
|
|
33696
34031
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
33697
34032
|
const Icon3 = entry.icon;
|
|
34033
|
+
const entryLabel = t(entry.labelKey);
|
|
33698
34034
|
return /* @__PURE__ */ jsxs(
|
|
33699
34035
|
Button,
|
|
33700
34036
|
{
|
|
33701
34037
|
type: "button",
|
|
33702
34038
|
variant: "ghost",
|
|
33703
34039
|
size: "sm",
|
|
33704
|
-
"aria-label":
|
|
33705
|
-
title:
|
|
34040
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
34041
|
+
title: entryLabel,
|
|
33706
34042
|
onClick: () => handleAppend(entry.type),
|
|
33707
34043
|
children: [
|
|
33708
34044
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
33709
|
-
/* @__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 })
|
|
33710
34046
|
]
|
|
33711
34047
|
},
|
|
33712
34048
|
entry.type
|
|
@@ -33749,6 +34085,7 @@ var init_ReplyTree = __esm({
|
|
|
33749
34085
|
"use client";
|
|
33750
34086
|
init_cn();
|
|
33751
34087
|
init_useEventBus();
|
|
34088
|
+
init_useTranslate();
|
|
33752
34089
|
init_atoms2();
|
|
33753
34090
|
init_VoteStack();
|
|
33754
34091
|
ReplyTreeNode = ({
|
|
@@ -33768,6 +34105,7 @@ var init_ReplyTree = __esm({
|
|
|
33768
34105
|
showActions
|
|
33769
34106
|
}) => {
|
|
33770
34107
|
const eventBus = useEventBus();
|
|
34108
|
+
const { t } = useTranslate();
|
|
33771
34109
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33772
34110
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33773
34111
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33814,7 +34152,7 @@ var init_ReplyTree = __esm({
|
|
|
33814
34152
|
variant: "ghost",
|
|
33815
34153
|
size: "sm",
|
|
33816
34154
|
onClick: handleToggle,
|
|
33817
|
-
"aria-label": isCollapsed ? "
|
|
34155
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
33818
34156
|
"aria-expanded": !isCollapsed,
|
|
33819
34157
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
33820
34158
|
className: cn(
|
|
@@ -33855,7 +34193,7 @@ var init_ReplyTree = __esm({
|
|
|
33855
34193
|
onVote: handleVote,
|
|
33856
34194
|
size: "sm",
|
|
33857
34195
|
variant: "horizontal",
|
|
33858
|
-
label:
|
|
34196
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
33859
34197
|
}
|
|
33860
34198
|
),
|
|
33861
34199
|
/* @__PURE__ */ jsx(
|
|
@@ -33865,8 +34203,8 @@ var init_ReplyTree = __esm({
|
|
|
33865
34203
|
size: "sm",
|
|
33866
34204
|
leftIcon: "message-square",
|
|
33867
34205
|
onClick: handleReply,
|
|
33868
|
-
"aria-label":
|
|
33869
|
-
children: "
|
|
34206
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
34207
|
+
children: t("replyTree.reply")
|
|
33870
34208
|
}
|
|
33871
34209
|
),
|
|
33872
34210
|
/* @__PURE__ */ jsx(
|
|
@@ -33876,8 +34214,8 @@ var init_ReplyTree = __esm({
|
|
|
33876
34214
|
size: "sm",
|
|
33877
34215
|
leftIcon: "flag",
|
|
33878
34216
|
onClick: handleFlag,
|
|
33879
|
-
"aria-label":
|
|
33880
|
-
children: "
|
|
34217
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
34218
|
+
children: t("replyTree.flag")
|
|
33881
34219
|
}
|
|
33882
34220
|
)
|
|
33883
34221
|
] }),
|
|
@@ -33888,9 +34226,9 @@ var init_ReplyTree = __esm({
|
|
|
33888
34226
|
inputType: "textarea",
|
|
33889
34227
|
rows: 2,
|
|
33890
34228
|
value: draft,
|
|
33891
|
-
placeholder:
|
|
34229
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
33892
34230
|
onChange: (e) => setDraft(e.target.value),
|
|
33893
|
-
"aria-label":
|
|
34231
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
33894
34232
|
}
|
|
33895
34233
|
),
|
|
33896
34234
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -33902,10 +34240,10 @@ var init_ReplyTree = __esm({
|
|
|
33902
34240
|
leftIcon: "send",
|
|
33903
34241
|
onClick: handleSubmitReply,
|
|
33904
34242
|
disabled: !draft.trim(),
|
|
33905
|
-
children: "
|
|
34243
|
+
children: t("replyTree.send")
|
|
33906
34244
|
}
|
|
33907
34245
|
),
|
|
33908
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
34246
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
33909
34247
|
] })
|
|
33910
34248
|
] }),
|
|
33911
34249
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -33919,7 +34257,7 @@ var init_ReplyTree = __esm({
|
|
|
33919
34257
|
"self-start gap-1 px-0 h-auto",
|
|
33920
34258
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
33921
34259
|
),
|
|
33922
|
-
children: "
|
|
34260
|
+
children: t("replyTree.continueThread")
|
|
33923
34261
|
}
|
|
33924
34262
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
33925
34263
|
ReplyTreeNode,
|
|
@@ -33958,6 +34296,7 @@ var init_ReplyTree = __esm({
|
|
|
33958
34296
|
showActions = true,
|
|
33959
34297
|
className
|
|
33960
34298
|
}) => {
|
|
34299
|
+
const { t } = useTranslate();
|
|
33961
34300
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33962
34301
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
33963
34302
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33976,7 +34315,7 @@ var init_ReplyTree = __esm({
|
|
|
33976
34315
|
});
|
|
33977
34316
|
}, []);
|
|
33978
34317
|
if (nodeList.length === 0) {
|
|
33979
|
-
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") });
|
|
33980
34319
|
}
|
|
33981
34320
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
33982
34321
|
ReplyTreeNode,
|
|
@@ -34054,6 +34393,7 @@ var init_VersionDiff = __esm({
|
|
|
34054
34393
|
"use client";
|
|
34055
34394
|
init_cn();
|
|
34056
34395
|
init_useEventBus();
|
|
34396
|
+
init_useTranslate();
|
|
34057
34397
|
init_atoms2();
|
|
34058
34398
|
init_Stack();
|
|
34059
34399
|
INLINE_STYLES = {
|
|
@@ -34076,6 +34416,7 @@ var init_VersionDiff = __esm({
|
|
|
34076
34416
|
language,
|
|
34077
34417
|
className
|
|
34078
34418
|
}) => {
|
|
34419
|
+
const { t } = useTranslate();
|
|
34079
34420
|
const eventBus = useEventBus();
|
|
34080
34421
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
34081
34422
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34157,24 +34498,24 @@ var init_VersionDiff = __esm({
|
|
|
34157
34498
|
children: [
|
|
34158
34499
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
34159
34500
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
34160
|
-
/* @__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") }),
|
|
34161
34502
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
34162
34503
|
Select,
|
|
34163
34504
|
{
|
|
34164
34505
|
options,
|
|
34165
34506
|
value: activeBeforeId,
|
|
34166
34507
|
onChange: handleBeforeChange,
|
|
34167
|
-
"aria-label": "
|
|
34508
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
34168
34509
|
}
|
|
34169
34510
|
) }),
|
|
34170
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
34511
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
34171
34512
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
34172
34513
|
Select,
|
|
34173
34514
|
{
|
|
34174
34515
|
options,
|
|
34175
34516
|
value: activeAfterId,
|
|
34176
34517
|
onChange: handleAfterChange,
|
|
34177
|
-
"aria-label": "
|
|
34518
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
34178
34519
|
}
|
|
34179
34520
|
) }),
|
|
34180
34521
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -34195,7 +34536,7 @@ var init_VersionDiff = __esm({
|
|
|
34195
34536
|
size: "sm",
|
|
34196
34537
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
34197
34538
|
onClick: handleViewToggle,
|
|
34198
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
34539
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
34199
34540
|
}
|
|
34200
34541
|
),
|
|
34201
34542
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -34205,7 +34546,7 @@ var init_VersionDiff = __esm({
|
|
|
34205
34546
|
size: "sm",
|
|
34206
34547
|
icon: "rotate-ccw",
|
|
34207
34548
|
onClick: handleRevert,
|
|
34208
|
-
children: "
|
|
34549
|
+
children: t("versionDiff.revert")
|
|
34209
34550
|
}
|
|
34210
34551
|
)
|
|
34211
34552
|
] })
|
|
@@ -34222,12 +34563,12 @@ var init_VersionDiff = __esm({
|
|
|
34222
34563
|
children: [
|
|
34223
34564
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
34224
34565
|
beforeRev?.label,
|
|
34225
|
-
beforeRev?.author ?
|
|
34566
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
34226
34567
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
34227
34568
|
] }),
|
|
34228
34569
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
34229
34570
|
afterRev?.label,
|
|
34230
|
-
afterRev?.author ?
|
|
34571
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
34231
34572
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
34232
34573
|
] })
|
|
34233
34574
|
]
|
|
@@ -34620,10 +34961,12 @@ var init_DocPagination = __esm({
|
|
|
34620
34961
|
}
|
|
34621
34962
|
});
|
|
34622
34963
|
function DocSearch({
|
|
34623
|
-
placeholder
|
|
34964
|
+
placeholder,
|
|
34624
34965
|
onSearch,
|
|
34625
34966
|
className
|
|
34626
34967
|
}) {
|
|
34968
|
+
const { t } = useTranslate();
|
|
34969
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34627
34970
|
const [query, setQuery] = useState("");
|
|
34628
34971
|
const [results, setResults] = useState([]);
|
|
34629
34972
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -34730,7 +35073,7 @@ function DocSearch({
|
|
|
34730
35073
|
Input,
|
|
34731
35074
|
{
|
|
34732
35075
|
inputType: "search",
|
|
34733
|
-
placeholder,
|
|
35076
|
+
placeholder: resolvedPlaceholder,
|
|
34734
35077
|
value: query,
|
|
34735
35078
|
onChange: handleChange,
|
|
34736
35079
|
onFocus: handleFocus,
|
|
@@ -34795,6 +35138,7 @@ var init_DocSearch = __esm({
|
|
|
34795
35138
|
init_Typography();
|
|
34796
35139
|
init_Icon();
|
|
34797
35140
|
init_Input();
|
|
35141
|
+
init_useTranslate();
|
|
34798
35142
|
}
|
|
34799
35143
|
});
|
|
34800
35144
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -36799,8 +37143,8 @@ var init_SignaturePad = __esm({
|
|
|
36799
37143
|
init_useEventBus();
|
|
36800
37144
|
init_useTranslate();
|
|
36801
37145
|
SignaturePad = ({
|
|
36802
|
-
label
|
|
36803
|
-
helperText
|
|
37146
|
+
label,
|
|
37147
|
+
helperText,
|
|
36804
37148
|
strokeColor,
|
|
36805
37149
|
strokeWidth = 2,
|
|
36806
37150
|
height = 200,
|
|
@@ -36816,6 +37160,8 @@ var init_SignaturePad = __esm({
|
|
|
36816
37160
|
}) => {
|
|
36817
37161
|
const eventBus = useEventBus();
|
|
36818
37162
|
const { t } = useTranslate();
|
|
37163
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
37164
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36819
37165
|
const canvasRef = useRef(null);
|
|
36820
37166
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
36821
37167
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -36918,7 +37264,7 @@ var init_SignaturePad = __esm({
|
|
|
36918
37264
|
);
|
|
36919
37265
|
}
|
|
36920
37266
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36921
|
-
|
|
37267
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
36922
37268
|
/* @__PURE__ */ jsx(
|
|
36923
37269
|
Box,
|
|
36924
37270
|
{
|
|
@@ -36947,7 +37293,7 @@ var init_SignaturePad = __esm({
|
|
|
36947
37293
|
)
|
|
36948
37294
|
}
|
|
36949
37295
|
),
|
|
36950
|
-
|
|
37296
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
36951
37297
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
36952
37298
|
/* @__PURE__ */ jsx(
|
|
36953
37299
|
Button,
|
|
@@ -36957,7 +37303,7 @@ var init_SignaturePad = __esm({
|
|
|
36957
37303
|
icon: Eraser,
|
|
36958
37304
|
onClick: clearSignature,
|
|
36959
37305
|
disabled: !hasSignature,
|
|
36960
|
-
children: "
|
|
37306
|
+
children: t("signaturePad.clear")
|
|
36961
37307
|
}
|
|
36962
37308
|
),
|
|
36963
37309
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -36968,7 +37314,7 @@ var init_SignaturePad = __esm({
|
|
|
36968
37314
|
icon: Check,
|
|
36969
37315
|
onClick: confirmSignature,
|
|
36970
37316
|
disabled: !hasSignature,
|
|
36971
|
-
children: "
|
|
37317
|
+
children: t("signaturePad.confirm")
|
|
36972
37318
|
}
|
|
36973
37319
|
)
|
|
36974
37320
|
] })
|
|
@@ -41413,6 +41759,7 @@ function MasterDetail({
|
|
|
41413
41759
|
className,
|
|
41414
41760
|
...rest
|
|
41415
41761
|
}) {
|
|
41762
|
+
const { t } = useTranslate();
|
|
41416
41763
|
const loading = externalLoading ?? false;
|
|
41417
41764
|
const isLoading = externalIsLoading ?? false;
|
|
41418
41765
|
const error = externalError ?? null;
|
|
@@ -41425,8 +41772,8 @@ function MasterDetail({
|
|
|
41425
41772
|
isLoading: loading || isLoading,
|
|
41426
41773
|
error,
|
|
41427
41774
|
className,
|
|
41428
|
-
emptyTitle: "
|
|
41429
|
-
emptyDescription: "
|
|
41775
|
+
emptyTitle: t("table.empty.title"),
|
|
41776
|
+
emptyDescription: t("empty.createFirst"),
|
|
41430
41777
|
...rest
|
|
41431
41778
|
}
|
|
41432
41779
|
);
|
|
@@ -41435,6 +41782,7 @@ var init_MasterDetail = __esm({
|
|
|
41435
41782
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41436
41783
|
"use client";
|
|
41437
41784
|
init_DataTable();
|
|
41785
|
+
init_useTranslate();
|
|
41438
41786
|
MasterDetail.displayName = "MasterDetail";
|
|
41439
41787
|
}
|
|
41440
41788
|
});
|
|
@@ -41443,14 +41791,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
41443
41791
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41444
41792
|
init_cn();
|
|
41445
41793
|
init_Typography();
|
|
41446
|
-
|
|
41447
|
-
|
|
41448
|
-
{
|
|
41449
|
-
|
|
41450
|
-
|
|
41451
|
-
|
|
41452
|
-
|
|
41453
|
-
|
|
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
|
+
};
|
|
41454
41806
|
MasterDetailLayout = ({
|
|
41455
41807
|
master,
|
|
41456
41808
|
detail,
|
|
@@ -41577,7 +41929,7 @@ var init_MediaGallery = __esm({
|
|
|
41577
41929
|
{
|
|
41578
41930
|
icon: Image$1,
|
|
41579
41931
|
title: t("display.noMedia"),
|
|
41580
|
-
description: "
|
|
41932
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
41581
41933
|
className
|
|
41582
41934
|
}
|
|
41583
41935
|
);
|
|
@@ -41594,7 +41946,7 @@ var init_MediaGallery = __esm({
|
|
|
41594
41946
|
size: "sm",
|
|
41595
41947
|
icon: Upload,
|
|
41596
41948
|
action: "MEDIA_UPLOAD",
|
|
41597
|
-
children: "
|
|
41949
|
+
children: t("mediaGallery.upload")
|
|
41598
41950
|
}
|
|
41599
41951
|
),
|
|
41600
41952
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -41608,10 +41960,7 @@ var init_MediaGallery = __esm({
|
|
|
41608
41960
|
))
|
|
41609
41961
|
] })
|
|
41610
41962
|
] }),
|
|
41611
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
41612
|
-
selectedItems.length,
|
|
41613
|
-
" selected"
|
|
41614
|
-
] }) }),
|
|
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 }) }) }),
|
|
41615
41964
|
/* @__PURE__ */ jsx(
|
|
41616
41965
|
Box,
|
|
41617
41966
|
{
|
|
@@ -42466,7 +42815,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42466
42815
|
EmptyState,
|
|
42467
42816
|
{
|
|
42468
42817
|
title: t("debug.noActiveTraits"),
|
|
42469
|
-
description: "
|
|
42818
|
+
description: t("debug.traitsMountHint"),
|
|
42470
42819
|
className: "py-8"
|
|
42471
42820
|
}
|
|
42472
42821
|
);
|
|
@@ -42476,14 +42825,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42476
42825
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
42477
42826
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
42478
42827
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
42479
|
-
/* @__PURE__ */
|
|
42480
|
-
trait.transitionCount,
|
|
42481
|
-
" transitions"
|
|
42482
|
-
] })
|
|
42828
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
42483
42829
|
] }),
|
|
42484
42830
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42485
42831
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42486
|
-
/* @__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") }),
|
|
42487
42833
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
42488
42834
|
Badge,
|
|
42489
42835
|
{
|
|
@@ -42495,7 +42841,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42495
42841
|
)) })
|
|
42496
42842
|
] }),
|
|
42497
42843
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42498
|
-
/* @__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") }),
|
|
42499
42845
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
42500
42846
|
t2.from,
|
|
42501
42847
|
" \u2192 ",
|
|
@@ -42514,7 +42860,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
42514
42860
|
] }, i)) })
|
|
42515
42861
|
] }),
|
|
42516
42862
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42517
|
-
/* @__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") }),
|
|
42518
42864
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
42519
42865
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
42520
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" })
|
|
@@ -42620,7 +42966,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42620
42966
|
EmptyState,
|
|
42621
42967
|
{
|
|
42622
42968
|
title: t("debug.noEntityData"),
|
|
42623
|
-
description: "
|
|
42969
|
+
description: t("debug.debugModeHint"),
|
|
42624
42970
|
className: "py-8"
|
|
42625
42971
|
}
|
|
42626
42972
|
);
|
|
@@ -42633,7 +42979,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42633
42979
|
EmptyState,
|
|
42634
42980
|
{
|
|
42635
42981
|
title: t("debug.noEntities"),
|
|
42636
|
-
description: "
|
|
42982
|
+
description: t("debug.entitiesSpawnHint"),
|
|
42637
42983
|
className: "py-8"
|
|
42638
42984
|
}
|
|
42639
42985
|
);
|
|
@@ -42641,7 +42987,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
42641
42987
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
42642
42988
|
id: `singleton-${name}`,
|
|
42643
42989
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42644
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
42990
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
42645
42991
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
42646
42992
|
] }),
|
|
42647
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) })
|
|
@@ -42659,31 +43005,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
42659
43005
|
}));
|
|
42660
43006
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
42661
43007
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42662
|
-
/* @__PURE__ */
|
|
42663
|
-
"Singletons (",
|
|
42664
|
-
singletonItems.length,
|
|
42665
|
-
")"
|
|
42666
|
-
] }),
|
|
43008
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
42667
43009
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
42668
43010
|
] }),
|
|
42669
43011
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
42670
|
-
/* @__PURE__ */
|
|
42671
|
-
"Runtime (",
|
|
42672
|
-
runtimeEntities.length,
|
|
42673
|
-
")"
|
|
42674
|
-
] }),
|
|
43012
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
42675
43013
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
42676
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
42677
|
-
"+",
|
|
42678
|
-
runtimeEntities.length - 20,
|
|
42679
|
-
" more entities"
|
|
42680
|
-
] })
|
|
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 }) })
|
|
42681
43015
|
] }),
|
|
42682
43016
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
42683
|
-
/* @__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") }),
|
|
42684
43018
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
42685
43019
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
42686
|
-
/* @__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") })
|
|
42687
43021
|
] }, type)) })
|
|
42688
43022
|
] })
|
|
42689
43023
|
] });
|
|
@@ -42727,7 +43061,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42727
43061
|
EmptyState,
|
|
42728
43062
|
{
|
|
42729
43063
|
title: t("debug.noEventsYet"),
|
|
42730
|
-
description: "
|
|
43064
|
+
description: t("debug.eventsExecuteHint"),
|
|
42731
43065
|
className: "py-8"
|
|
42732
43066
|
}
|
|
42733
43067
|
);
|
|
@@ -42738,17 +43072,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42738
43072
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
42739
43073
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
42740
43074
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42741
|
-
/* @__PURE__ */
|
|
43075
|
+
/* @__PURE__ */ jsx(
|
|
42742
43076
|
Button,
|
|
42743
43077
|
{
|
|
42744
43078
|
size: "sm",
|
|
42745
43079
|
variant: filter === "all" ? "primary" : "secondary",
|
|
42746
43080
|
onClick: () => setFilter("all"),
|
|
42747
|
-
children:
|
|
42748
|
-
"All (",
|
|
42749
|
-
events2.length,
|
|
42750
|
-
")"
|
|
42751
|
-
]
|
|
43081
|
+
children: t("debug.allCount", { count: events2.length })
|
|
42752
43082
|
}
|
|
42753
43083
|
),
|
|
42754
43084
|
eventTypes.map((type) => {
|
|
@@ -42778,7 +43108,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
42778
43108
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
42779
43109
|
}
|
|
42780
43110
|
),
|
|
42781
|
-
"
|
|
43111
|
+
t("debug.autoScroll")
|
|
42782
43112
|
] })
|
|
42783
43113
|
] }),
|
|
42784
43114
|
/* @__PURE__ */ jsx(
|
|
@@ -42836,7 +43166,7 @@ function GuardsPanel({ guards }) {
|
|
|
42836
43166
|
EmptyState,
|
|
42837
43167
|
{
|
|
42838
43168
|
title: t("debug.noGuardEvaluations"),
|
|
42839
|
-
description: "
|
|
43169
|
+
description: t("debug.guardEvaluationsHint"),
|
|
42840
43170
|
className: "py-8"
|
|
42841
43171
|
}
|
|
42842
43172
|
);
|
|
@@ -42867,15 +43197,15 @@ function GuardsPanel({ guards }) {
|
|
|
42867
43197
|
] }),
|
|
42868
43198
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
42869
43199
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42870
|
-
/* @__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") }),
|
|
42871
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 })
|
|
42872
43202
|
] }),
|
|
42873
43203
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42874
|
-
/* @__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") }),
|
|
42875
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) })
|
|
42876
43206
|
] }),
|
|
42877
43207
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42878
|
-
/* @__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") }),
|
|
42879
43209
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
42880
43210
|
] })
|
|
42881
43211
|
] })
|
|
@@ -42893,9 +43223,9 @@ function GuardsPanel({ guards }) {
|
|
|
42893
43223
|
] })
|
|
42894
43224
|
] }),
|
|
42895
43225
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
42896
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
42897
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
42898
|
-
/* @__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") })
|
|
42899
43229
|
] })
|
|
42900
43230
|
] }),
|
|
42901
43231
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -43021,7 +43351,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43021
43351
|
EmptyState,
|
|
43022
43352
|
{
|
|
43023
43353
|
title: t("debug.noTransitionsRecorded"),
|
|
43024
|
-
description: "
|
|
43354
|
+
description: t("debug.transitionsProcessHint"),
|
|
43025
43355
|
className: "py-8"
|
|
43026
43356
|
}
|
|
43027
43357
|
);
|
|
@@ -43038,10 +43368,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43038
43368
|
const sorted = [...transitions].reverse();
|
|
43039
43369
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
43040
43370
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
43041
|
-
/* @__PURE__ */
|
|
43042
|
-
transitions.length,
|
|
43043
|
-
" transitions recorded"
|
|
43044
|
-
] }),
|
|
43371
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
43045
43372
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
43046
43373
|
/* @__PURE__ */ jsx(
|
|
43047
43374
|
Checkbox,
|
|
@@ -43050,7 +43377,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
43050
43377
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
43051
43378
|
}
|
|
43052
43379
|
),
|
|
43053
|
-
"
|
|
43380
|
+
t("debug.autoScroll")
|
|
43054
43381
|
] })
|
|
43055
43382
|
] }),
|
|
43056
43383
|
/* @__PURE__ */ jsx(
|
|
@@ -43093,15 +43420,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
43093
43420
|
variant: trace.guardResult ? "success" : "danger",
|
|
43094
43421
|
size: "sm",
|
|
43095
43422
|
children: [
|
|
43096
|
-
"
|
|
43423
|
+
t("debug.guardLabel"),
|
|
43424
|
+
" ",
|
|
43097
43425
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
43098
43426
|
]
|
|
43099
43427
|
}
|
|
43100
43428
|
),
|
|
43101
|
-
/* @__PURE__ */
|
|
43102
|
-
trace.effects.length,
|
|
43103
|
-
" effects"
|
|
43104
|
-
] })
|
|
43429
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
43105
43430
|
] }),
|
|
43106
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: [
|
|
43107
43432
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -43150,13 +43475,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43150
43475
|
EmptyState,
|
|
43151
43476
|
{
|
|
43152
43477
|
title: t("debug.noBridgeData"),
|
|
43153
|
-
description: "
|
|
43478
|
+
description: t("debug.bridgeInitHint"),
|
|
43154
43479
|
className: "py-8"
|
|
43155
43480
|
}
|
|
43156
43481
|
);
|
|
43157
43482
|
}
|
|
43158
43483
|
const formatTime4 = (ts) => {
|
|
43159
|
-
if (ts === 0) return "
|
|
43484
|
+
if (ts === 0) return t("debug.never");
|
|
43160
43485
|
const d = new Date(ts);
|
|
43161
43486
|
return d.toLocaleTimeString("en-US", {
|
|
43162
43487
|
hour12: false,
|
|
@@ -43169,14 +43494,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43169
43494
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
43170
43495
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
43171
43496
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
43172
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
43497
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
43173
43498
|
] }),
|
|
43174
43499
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
43175
43500
|
/* @__PURE__ */ jsx(
|
|
43176
43501
|
StatRow,
|
|
43177
43502
|
{
|
|
43178
43503
|
label: t("debug.status"),
|
|
43179
|
-
value: bridge.connected ? "
|
|
43504
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
43180
43505
|
variant: bridge.connected ? "success" : "danger"
|
|
43181
43506
|
}
|
|
43182
43507
|
),
|
|
@@ -43204,13 +43529,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
43204
43529
|
] })
|
|
43205
43530
|
] }),
|
|
43206
43531
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
43207
|
-
/* @__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") }),
|
|
43208
43533
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
43209
43534
|
] }),
|
|
43210
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
43211
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
43212
|
-
" total events processed"
|
|
43213
|
-
] }) })
|
|
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 }) }) })
|
|
43214
43536
|
] }) });
|
|
43215
43537
|
}
|
|
43216
43538
|
var init_ServerBridgeTab = __esm({
|
|
@@ -43320,7 +43642,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43320
43642
|
EmptyState,
|
|
43321
43643
|
{
|
|
43322
43644
|
title: t("debug.noActiveTraits"),
|
|
43323
|
-
description: "
|
|
43645
|
+
description: t("debug.traitsInitHint"),
|
|
43324
43646
|
className: "py-8"
|
|
43325
43647
|
}
|
|
43326
43648
|
);
|
|
@@ -43337,7 +43659,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43337
43659
|
};
|
|
43338
43660
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
43339
43661
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43340
|
-
/* @__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") }),
|
|
43341
43663
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43342
43664
|
trait.name,
|
|
43343
43665
|
": ",
|
|
@@ -43345,8 +43667,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43345
43667
|
] }, trait.id)) })
|
|
43346
43668
|
] }),
|
|
43347
43669
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43348
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
43349
|
-
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: [
|
|
43350
43672
|
/* @__PURE__ */ jsx(
|
|
43351
43673
|
Button,
|
|
43352
43674
|
{
|
|
@@ -43358,15 +43680,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43358
43680
|
}
|
|
43359
43681
|
),
|
|
43360
43682
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
43361
|
-
transitions.some((
|
|
43683
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
43362
43684
|
] }, event)) })
|
|
43363
43685
|
] }),
|
|
43364
43686
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
43365
|
-
/* @__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") }),
|
|
43366
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)) })
|
|
43367
43689
|
] }),
|
|
43368
43690
|
log12.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
43369
|
-
/* @__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") }),
|
|
43370
43692
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43371
43693
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43372
43694
|
" ",
|
|
@@ -43397,21 +43719,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
43397
43719
|
}
|
|
43398
43720
|
});
|
|
43399
43721
|
function ServerResponseRow({ sr }) {
|
|
43722
|
+
const { t } = useTranslate();
|
|
43400
43723
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43401
43724
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43402
43725
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43403
43726
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
43404
43727
|
sr.success ? "\u2713" : "\u2717",
|
|
43405
|
-
"
|
|
43728
|
+
" ",
|
|
43729
|
+
t("debug.server")
|
|
43406
43730
|
] }),
|
|
43407
43731
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
43408
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
43409
|
-
sr.clientEffects,
|
|
43410
|
-
" clientEffect",
|
|
43411
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
43412
|
-
] }),
|
|
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 }) }),
|
|
43413
43733
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
43414
|
-
"
|
|
43734
|
+
t("debug.emitLabel"),
|
|
43735
|
+
" ",
|
|
43415
43736
|
sr.emittedEvents.join(", ")
|
|
43416
43737
|
] }),
|
|
43417
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 })
|
|
@@ -43419,13 +43740,12 @@ function ServerResponseRow({ sr }) {
|
|
|
43419
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: [
|
|
43420
43741
|
name,
|
|
43421
43742
|
": ",
|
|
43422
|
-
count
|
|
43423
|
-
" row",
|
|
43424
|
-
count !== 1 ? "s" : ""
|
|
43743
|
+
t("debug.rowsCount", { count })
|
|
43425
43744
|
] }, name)) })
|
|
43426
43745
|
] });
|
|
43427
43746
|
}
|
|
43428
43747
|
function TransitionRow({ trace }) {
|
|
43748
|
+
const { t } = useTranslate();
|
|
43429
43749
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43430
43750
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43431
43751
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43433,7 +43753,7 @@ function TransitionRow({ trace }) {
|
|
|
43433
43753
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
43434
43754
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
43435
43755
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
43436
|
-
/* @__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") })
|
|
43437
43757
|
] }),
|
|
43438
43758
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
43439
43759
|
] });
|
|
@@ -43474,6 +43794,7 @@ function VerifyModePanel({
|
|
|
43474
43794
|
serverCount,
|
|
43475
43795
|
localCount
|
|
43476
43796
|
}) {
|
|
43797
|
+
const { t } = useTranslate();
|
|
43477
43798
|
const [expanded, setExpanded] = React85.useState(true);
|
|
43478
43799
|
const scrollRef = React85.useRef(null);
|
|
43479
43800
|
const prevCountRef = React85.useRef(0);
|
|
@@ -43504,30 +43825,20 @@ function VerifyModePanel({
|
|
|
43504
43825
|
onClick: () => setExpanded((v) => !v),
|
|
43505
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",
|
|
43506
43827
|
"aria-expanded": expanded,
|
|
43507
|
-
"aria-label": expanded ? "
|
|
43828
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
43508
43829
|
"data-testid": "debugger-verify-toggle",
|
|
43509
43830
|
children: [
|
|
43510
43831
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
43511
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
43512
|
-
/* @__PURE__ */
|
|
43513
|
-
|
|
43514
|
-
" local"
|
|
43515
|
-
] }),
|
|
43516
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
43517
|
-
serverCount,
|
|
43518
|
-
" server"
|
|
43519
|
-
] }),
|
|
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 }) }),
|
|
43520
43835
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
43521
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
43522
|
-
transitions.length,
|
|
43523
|
-
" transition",
|
|
43524
|
-
transitions.length !== 1 ? "s" : ""
|
|
43525
|
-
] })
|
|
43836
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
43526
43837
|
]
|
|
43527
43838
|
}
|
|
43528
43839
|
),
|
|
43529
43840
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
43530
|
-
/* @__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)) }) }) }),
|
|
43531
43842
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
43532
43843
|
] })
|
|
43533
43844
|
]
|
|
@@ -43543,6 +43854,7 @@ function RuntimeDebugger({
|
|
|
43543
43854
|
defaultTab,
|
|
43544
43855
|
schema
|
|
43545
43856
|
}) {
|
|
43857
|
+
const { t } = useTranslate();
|
|
43546
43858
|
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43547
43859
|
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43548
43860
|
const debugData = useDebugData();
|
|
@@ -43581,55 +43893,55 @@ function RuntimeDebugger({
|
|
|
43581
43893
|
const tabItems = [
|
|
43582
43894
|
{
|
|
43583
43895
|
id: "dispatch",
|
|
43584
|
-
label: "
|
|
43896
|
+
label: t("debug.tabDispatch"),
|
|
43585
43897
|
badge: debugData.traits.length || void 0,
|
|
43586
43898
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
43587
43899
|
},
|
|
43588
43900
|
{
|
|
43589
43901
|
id: "verify",
|
|
43590
|
-
label: failedChecks > 0 ? "
|
|
43902
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
43591
43903
|
badge: verification.summary.totalChecks || void 0,
|
|
43592
43904
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
43593
43905
|
},
|
|
43594
43906
|
{
|
|
43595
43907
|
id: "timeline",
|
|
43596
|
-
label: "
|
|
43908
|
+
label: t("debug.tabTimeline"),
|
|
43597
43909
|
badge: verification.transitions.length || void 0,
|
|
43598
43910
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
43599
43911
|
},
|
|
43600
43912
|
{
|
|
43601
43913
|
id: "bridge",
|
|
43602
|
-
label: "
|
|
43914
|
+
label: t("debug.tabBridge"),
|
|
43603
43915
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
43604
43916
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
43605
43917
|
},
|
|
43606
43918
|
{
|
|
43607
43919
|
id: "traits",
|
|
43608
|
-
label: "
|
|
43920
|
+
label: t("debug.tabTraits"),
|
|
43609
43921
|
badge: debugData.traits.length || void 0,
|
|
43610
43922
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
43611
43923
|
},
|
|
43612
43924
|
{
|
|
43613
43925
|
id: "ticks",
|
|
43614
|
-
label: "
|
|
43615
|
-
badge: debugData.ticks.filter((
|
|
43926
|
+
label: t("debug.tabTicks"),
|
|
43927
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
43616
43928
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
43617
43929
|
},
|
|
43618
43930
|
{
|
|
43619
43931
|
id: "entities",
|
|
43620
|
-
label: "
|
|
43932
|
+
label: t("debug.tabEntities"),
|
|
43621
43933
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
43622
43934
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
43623
43935
|
},
|
|
43624
43936
|
{
|
|
43625
43937
|
id: "events",
|
|
43626
|
-
label: "
|
|
43938
|
+
label: t("debug.tabEvents"),
|
|
43627
43939
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
43628
43940
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
43629
43941
|
},
|
|
43630
43942
|
{
|
|
43631
43943
|
id: "guards",
|
|
43632
|
-
label: "
|
|
43944
|
+
label: t("debug.tabGuards"),
|
|
43633
43945
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
43634
43946
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
43635
43947
|
}
|
|
@@ -43657,15 +43969,10 @@ function RuntimeDebugger({
|
|
|
43657
43969
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43658
43970
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
43659
43971
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
43660
|
-
"
|
|
43972
|
+
" ",
|
|
43973
|
+
t("debug.debugger")
|
|
43661
43974
|
] }),
|
|
43662
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43663
|
-
failedChecks,
|
|
43664
|
-
" failed"
|
|
43665
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
43666
|
-
debugData.traits.length,
|
|
43667
|
-
" traits"
|
|
43668
|
-
] }) : /* @__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") })
|
|
43669
43976
|
] })
|
|
43670
43977
|
}
|
|
43671
43978
|
),
|
|
@@ -43683,9 +43990,9 @@ function RuntimeDebugger({
|
|
|
43683
43990
|
);
|
|
43684
43991
|
}
|
|
43685
43992
|
if (mode === "verify") {
|
|
43686
|
-
const traitStates = debugData.traits.map((
|
|
43687
|
-
const serverEntries = verification.transitions.filter((
|
|
43688
|
-
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);
|
|
43689
43996
|
return /* @__PURE__ */ jsx(
|
|
43690
43997
|
VerifyModePanel,
|
|
43691
43998
|
{
|
|
@@ -43717,7 +44024,7 @@ function RuntimeDebugger({
|
|
|
43717
44024
|
variant: "secondary",
|
|
43718
44025
|
size: "sm",
|
|
43719
44026
|
className: "runtime-debugger__toggle",
|
|
43720
|
-
title: "
|
|
44027
|
+
title: t("debug.openDebugger"),
|
|
43721
44028
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
43722
44029
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
43723
44030
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -43727,11 +44034,8 @@ function RuntimeDebugger({
|
|
|
43727
44034
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
43728
44035
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
43729
44036
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
43730
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
43731
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
43732
|
-
failedChecks,
|
|
43733
|
-
" failed"
|
|
43734
|
-
] }) : 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") })
|
|
43735
44039
|
] }),
|
|
43736
44040
|
/* @__PURE__ */ jsx(
|
|
43737
44041
|
Button,
|
|
@@ -43739,7 +44043,7 @@ function RuntimeDebugger({
|
|
|
43739
44043
|
onClick: () => setIsCollapsed(true),
|
|
43740
44044
|
variant: "ghost",
|
|
43741
44045
|
size: "sm",
|
|
43742
|
-
title: "
|
|
44046
|
+
title: t("debug.close"),
|
|
43743
44047
|
children: "x"
|
|
43744
44048
|
}
|
|
43745
44049
|
)
|
|
@@ -43753,7 +44057,7 @@ function RuntimeDebugger({
|
|
|
43753
44057
|
className: "runtime-debugger__tabs"
|
|
43754
44058
|
}
|
|
43755
44059
|
) }),
|
|
43756
|
-
/* @__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") }) })
|
|
43757
44061
|
] })
|
|
43758
44062
|
}
|
|
43759
44063
|
);
|
|
@@ -43779,6 +44083,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43779
44083
|
init_TransitionTimeline();
|
|
43780
44084
|
init_ServerBridgeTab();
|
|
43781
44085
|
init_EventDispatcherTab();
|
|
44086
|
+
init_useTranslate();
|
|
43782
44087
|
init_RuntimeDebugger();
|
|
43783
44088
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43784
44089
|
}
|
|
@@ -45067,7 +45372,7 @@ var init_StatCard = __esm({
|
|
|
45067
45372
|
}
|
|
45068
45373
|
);
|
|
45069
45374
|
}
|
|
45070
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
45375
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
45071
45376
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
45072
45377
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
45073
45378
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -45110,7 +45415,7 @@ var init_StatCard = __esm({
|
|
|
45110
45415
|
]
|
|
45111
45416
|
}
|
|
45112
45417
|
),
|
|
45113
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
45418
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
45114
45419
|
] }),
|
|
45115
45420
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
45116
45421
|
] }),
|