@kvaser/canking-api 7.1.0-beta.231

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.
Files changed (554) hide show
  1. package/EULA.pdf +0 -0
  2. package/README.md +87 -0
  3. package/REDISTRIBUTABLES.txt +5 -0
  4. package/dist/ElectronAPIFake.js +1 -0
  5. package/dist/ElectronAPIFake.mjs +266 -0
  6. package/dist/controls/CanChannelSelectControl.d.ts +35 -0
  7. package/dist/controls/CanIdentifierControl.d.ts +176 -0
  8. package/dist/controls/CanKingDataProvider.d.ts +116 -0
  9. package/dist/controls/CheckboxControl.d.ts +30 -0
  10. package/dist/controls/ContextMenu.d.ts +44 -0
  11. package/dist/controls/DropdownButton.d.ts +73 -0
  12. package/dist/controls/DropdownPanel.d.ts +41 -0
  13. package/dist/controls/FillBox.d.ts +8 -0
  14. package/dist/controls/FormControlRow.d.ts +30 -0
  15. package/dist/controls/InlineEditor.d.ts +26 -0
  16. package/dist/controls/LocalizedStrings.d.ts +21 -0
  17. package/dist/controls/NumberRangeControl.d.ts +80 -0
  18. package/dist/controls/OneLineButton.d.ts +9 -0
  19. package/dist/controls/RadioControl.d.ts +25 -0
  20. package/dist/controls/RadioGroupControl.d.ts +31 -0
  21. package/dist/controls/SectionControl.d.ts +40 -0
  22. package/dist/controls/SelectControl.d.ts +55 -0
  23. package/dist/controls/SizedBox.d.ts +11 -0
  24. package/dist/controls/TableControl.d.ts +61 -0
  25. package/dist/controls/TabsPanel.d.ts +5 -0
  26. package/dist/controls/TextControl.d.ts +56 -0
  27. package/dist/controls/ToolbarControl.d.ts +143 -0
  28. package/dist/controls/ValidateableTextControl.d.ts +82 -0
  29. package/dist/controls/index.d.ts +103 -0
  30. package/dist/controls.js +1 -0
  31. package/dist/controls.mjs +1714 -0
  32. package/dist/grpc/index.d.ts +7 -0
  33. package/dist/grpc.js +1 -0
  34. package/dist/grpc.mjs +917 -0
  35. package/dist/hooks/index.d.ts +112 -0
  36. package/dist/hooks.js +1 -0
  37. package/dist/hooks.mjs +28 -0
  38. package/dist/icons/index.d.ts +121 -0
  39. package/dist/icons.js +1 -0
  40. package/dist/icons.mjs +1237 -0
  41. package/dist/index.d.ts +6 -0
  42. package/dist/index.js +1 -0
  43. package/dist/index.mjs +596 -0
  44. package/dist/ipc/index.d.ts +160 -0
  45. package/dist/ipc.js +1 -0
  46. package/dist/ipc.mjs +123 -0
  47. package/dist/measurement_settings.js +1 -0
  48. package/dist/measurement_settings.mjs +4132 -0
  49. package/dist/models/DataBuffer.d.ts +100 -0
  50. package/dist/models/ElectronAPIFake.d.ts +13 -0
  51. package/dist/models/Point.d.ts +30 -0
  52. package/dist/models/index.d.ts +95 -0
  53. package/dist/models.js +1 -0
  54. package/dist/models.mjs +448 -0
  55. package/dist/protos/app_params.d.ts +208 -0
  56. package/dist/protos/app_service.d.ts +354 -0
  57. package/dist/protos/common_params.d.ts +33 -0
  58. package/dist/protos/device_params.d.ts +271 -0
  59. package/dist/protos/device_service.d.ts +154 -0
  60. package/dist/protos/frame_params.d.ts +189 -0
  61. package/dist/protos/google/protobuf/empty.d.ts +35 -0
  62. package/dist/protos/measurement_params.d.ts +308 -0
  63. package/dist/protos/measurement_service.d.ts +1333 -0
  64. package/dist/protos/measurement_settings.d.ts +453 -0
  65. package/dist/protos/signal_params.d.ts +72 -0
  66. package/dist/protos/status_params.d.ts +118 -0
  67. package/dist/status_params.js +1 -0
  68. package/dist/status_params.mjs +5045 -0
  69. package/doc/.nojekyll +1 -0
  70. package/doc/assets/highlight.css +120 -0
  71. package/doc/assets/icons.js +18 -0
  72. package/doc/assets/icons.svg +1 -0
  73. package/doc/assets/main.js +60 -0
  74. package/doc/assets/material-style.css +247 -0
  75. package/doc/assets/navigation.js +1 -0
  76. package/doc/assets/search.js +1 -0
  77. package/doc/assets/style.css +1493 -0
  78. package/doc/classes/controls.LocalizedStrings.html +177 -0
  79. package/doc/classes/models.DataBuffer.html +205 -0
  80. package/doc/classes/models.DataBufferView.html +193 -0
  81. package/doc/classes/models.Point.html +187 -0
  82. package/doc/enums/models.AccessMode.html +188 -0
  83. package/doc/enums/models.AppEvent.html +179 -0
  84. package/doc/enums/models.CanChannelCap.html +217 -0
  85. package/doc/enums/models.CanFrameFlag.html +200 -0
  86. package/doc/enums/models.CanMode.html +180 -0
  87. package/doc/enums/models.DecimalChar.html +178 -0
  88. package/doc/enums/models.DeviceEvent.html +179 -0
  89. package/doc/enums/models.FileConflictAction.html +180 -0
  90. package/doc/enums/models.LinFrameFlag.html +185 -0
  91. package/doc/enums/models.LogFileFormat.html +221 -0
  92. package/doc/enums/models.LogLevel.html +195 -0
  93. package/doc/enums/models.LogReplayState.html +179 -0
  94. package/doc/enums/models.MeasurementEvent.html +185 -0
  95. package/doc/enums/models.MessageLoggerState.html +180 -0
  96. package/doc/enums/models.Protocols.html +182 -0
  97. package/doc/enums/models.Separator.html +178 -0
  98. package/doc/enums/models.SignalEncoding.html +178 -0
  99. package/doc/enums/models.SignalType.html +185 -0
  100. package/doc/enums/models.SignalValueTriggerOperator.html +186 -0
  101. package/doc/enums/models.StatusLevel.html +180 -0
  102. package/doc/enums/models.TimeReference.html +178 -0
  103. package/doc/enums/models.TriggerOperator.html +179 -0
  104. package/doc/functions/controls.CanChannelSelectControl.html +177 -0
  105. package/doc/functions/controls.CanIdentifierControl.html +177 -0
  106. package/doc/functions/controls.CanIdentifierFrameControl.html +177 -0
  107. package/doc/functions/controls.CanIdentifierGeneratorControl.html +177 -0
  108. package/doc/functions/controls.CanIdentifierGeneratorSettingsControl.html +178 -0
  109. package/doc/functions/controls.CanKingDataProvider.html +182 -0
  110. package/doc/functions/controls.CheckboxControl.html +177 -0
  111. package/doc/functions/controls.ContextMenu.html +177 -0
  112. package/doc/functions/controls.DropdownButton.html +177 -0
  113. package/doc/functions/controls.DropdownButtonTextItems.html +177 -0
  114. package/doc/functions/controls.DropdownPanel.html +177 -0
  115. package/doc/functions/controls.FillBox.html +206 -0
  116. package/doc/functions/controls.FormControlRow.html +177 -0
  117. package/doc/functions/controls.InlineEditor.html +177 -0
  118. package/doc/functions/controls.NumberRangeControl.html +177 -0
  119. package/doc/functions/controls.OneLineButton.html +205 -0
  120. package/doc/functions/controls.RadioControl.html +177 -0
  121. package/doc/functions/controls.RadioGroupControl.html +177 -0
  122. package/doc/functions/controls.SectionControl.html +177 -0
  123. package/doc/functions/controls.SelectControl.html +177 -0
  124. package/doc/functions/controls.SizedBox.html +206 -0
  125. package/doc/functions/controls.TableControl.html +177 -0
  126. package/doc/functions/controls.TabsPanel.html +205 -0
  127. package/doc/functions/controls.TextControl.html +177 -0
  128. package/doc/functions/controls.ToolbarControl.html +177 -0
  129. package/doc/functions/controls.ValidateableTextControl.html +177 -0
  130. package/doc/functions/hooks.useDevices.html +176 -0
  131. package/doc/functions/hooks.useIsOnline.html +176 -0
  132. package/doc/functions/hooks.useLanguage.html +176 -0
  133. package/doc/functions/hooks.useLocalizedStrings.html +176 -0
  134. package/doc/functions/hooks.useLogMessages.html +176 -0
  135. package/doc/functions/hooks.useMaxDataBytes.html +175 -0
  136. package/doc/functions/hooks.useMeasurementSetup.html +176 -0
  137. package/doc/functions/hooks.useMeasurementStatus.html +176 -0
  138. package/doc/functions/hooks.useMessageLogFileFormats.html +175 -0
  139. package/doc/functions/hooks.useNewMeasurementData.html +178 -0
  140. package/doc/functions/hooks.useNodeStatus.html +176 -0
  141. package/doc/functions/hooks.useNumericRadix.html +176 -0
  142. package/doc/functions/hooks.useOnlineStatus.html +176 -0
  143. package/doc/functions/hooks.useOverallStatusLevel.html +176 -0
  144. package/doc/functions/hooks.useProjectData.html +178 -0
  145. package/doc/functions/hooks.useRecentProjectFiles.html +175 -0
  146. package/doc/functions/hooks.useRunningPeriodicTransmissions.html +176 -0
  147. package/doc/functions/hooks.useSessionData.html +178 -0
  148. package/doc/functions/hooks.useUserSettings.html +176 -0
  149. package/doc/functions/hooks.useWorkspacePaneWithId.html +175 -0
  150. package/doc/functions/icons.AddIcon.html +175 -0
  151. package/doc/functions/icons.ArrowDownIcon.html +175 -0
  152. package/doc/functions/icons.ArrowLeftIcon.html +175 -0
  153. package/doc/functions/icons.ArrowRightIcon.html +175 -0
  154. package/doc/functions/icons.ArrowUpIcon.html +175 -0
  155. package/doc/functions/icons.BusIsOffIcon.html +175 -0
  156. package/doc/functions/icons.BusIsOnIcon.html +175 -0
  157. package/doc/functions/icons.CloseIcon.html +175 -0
  158. package/doc/functions/icons.CopyIcon.html +175 -0
  159. package/doc/functions/icons.DarkModeIcon.html +175 -0
  160. package/doc/functions/icons.DeleteIcon.html +175 -0
  161. package/doc/functions/icons.DisableIcon.html +175 -0
  162. package/doc/functions/icons.EditIcon.html +175 -0
  163. package/doc/functions/icons.FilterIcon.html +175 -0
  164. package/doc/functions/icons.FixedPositionIcon.html +175 -0
  165. package/doc/functions/icons.LeaveFullScreenIcon.html +175 -0
  166. package/doc/functions/icons.LightModeIcon.html +175 -0
  167. package/doc/functions/icons.LineArrowDownIcon.html +175 -0
  168. package/doc/functions/icons.LineArrowUpIcon.html +175 -0
  169. package/doc/functions/icons.MaximizeWindowIcon.html +175 -0
  170. package/doc/functions/icons.MeasurementSetupIcon.html +175 -0
  171. package/doc/functions/icons.MoreHorizIcon.html +175 -0
  172. package/doc/functions/icons.MoreVertIcon.html +175 -0
  173. package/doc/functions/icons.NewIcon.html +175 -0
  174. package/doc/functions/icons.OpenExternallyIcon.html +175 -0
  175. package/doc/functions/icons.OpenIcon.html +175 -0
  176. package/doc/functions/icons.PauseIcon.html +175 -0
  177. package/doc/functions/icons.PlayIcon.html +175 -0
  178. package/doc/functions/icons.PlaySolidIcon.html +175 -0
  179. package/doc/functions/icons.SaveIcon.html +175 -0
  180. package/doc/functions/icons.SelectAllIcon.html +175 -0
  181. package/doc/functions/icons.ServiceIconActive.html +175 -0
  182. package/doc/functions/icons.ServiceIconInactive.html +175 -0
  183. package/doc/functions/icons.SettingsIcon.html +175 -0
  184. package/doc/functions/icons.StopIcon.html +175 -0
  185. package/doc/functions/icons.StopSolidIcon.html +175 -0
  186. package/doc/functions/icons.ToolsPanelHiddenIcon.html +175 -0
  187. package/doc/functions/icons.ToolsPanelVisibleIcon.html +175 -0
  188. package/doc/functions/icons.UnmaximizeWindowIcon.html +175 -0
  189. package/doc/functions/icons.WorkspacesIcon.html +175 -0
  190. package/doc/functions/ipc.addDataProcessor.html +178 -0
  191. package/doc/functions/ipc.addSource.html +176 -0
  192. package/doc/functions/ipc.addTarget.html +176 -0
  193. package/doc/functions/ipc.connectNodes.html +177 -0
  194. package/doc/functions/ipc.deleteDataProcessor.html +176 -0
  195. package/doc/functions/ipc.deleteSource.html +176 -0
  196. package/doc/functions/ipc.deleteTarget.html +176 -0
  197. package/doc/functions/ipc.disableNode.html +176 -0
  198. package/doc/functions/ipc.disconnectNodes.html +177 -0
  199. package/doc/functions/ipc.enableNode.html +176 -0
  200. package/doc/functions/ipc.getFrameDefinitions.html +178 -0
  201. package/doc/functions/ipc.getLogger.html +177 -0
  202. package/doc/functions/ipc.getMessageLogFileFormats.html +176 -0
  203. package/doc/functions/ipc.sendCanMessage.html +179 -0
  204. package/doc/functions/ipc.sendMessage.html +177 -0
  205. package/doc/functions/ipc.showMessageBox.html +177 -0
  206. package/doc/functions/ipc.showQuestionBox.html +183 -0
  207. package/doc/functions/ipc.startLogReplay.html +176 -0
  208. package/doc/functions/ipc.startMeasurement.html +175 -0
  209. package/doc/functions/ipc.startPeriodicTransmission.html +177 -0
  210. package/doc/functions/ipc.stopLogReplay.html +176 -0
  211. package/doc/functions/ipc.stopMeasurement.html +175 -0
  212. package/doc/functions/ipc.stopPeriodicTransmission.html +176 -0
  213. package/doc/functions/ipc.updateDataProcessor.html +176 -0
  214. package/doc/functions/ipc.updateSource.html +176 -0
  215. package/doc/functions/ipc.updateTarget.html +176 -0
  216. package/doc/functions/models.accessModeFromJSON.html +174 -0
  217. package/doc/functions/models.accessModeToJSON.html +174 -0
  218. package/doc/functions/models.appEventFromJSON.html +174 -0
  219. package/doc/functions/models.appEventToJSON.html +174 -0
  220. package/doc/functions/models.canChannelCapFromJSON.html +174 -0
  221. package/doc/functions/models.canChannelCapToJSON.html +174 -0
  222. package/doc/functions/models.canFrameFlagFromJSON.html +174 -0
  223. package/doc/functions/models.canFrameFlagToJSON.html +174 -0
  224. package/doc/functions/models.canModeFromJSON.html +174 -0
  225. package/doc/functions/models.canModeToJSON.html +174 -0
  226. package/doc/functions/models.createElectronApiFake.html +177 -0
  227. package/doc/functions/models.decimalCharFromJSON.html +174 -0
  228. package/doc/functions/models.decimalCharToJSON.html +174 -0
  229. package/doc/functions/models.decimalToFixed.html +174 -0
  230. package/doc/functions/models.decimalToHex.html +174 -0
  231. package/doc/functions/models.deviceEventFromJSON.html +174 -0
  232. package/doc/functions/models.deviceEventToJSON.html +174 -0
  233. package/doc/functions/models.fileConflictActionFromJSON.html +174 -0
  234. package/doc/functions/models.fileConflictActionToJSON.html +174 -0
  235. package/doc/functions/models.linFrameFlagFromJSON.html +174 -0
  236. package/doc/functions/models.linFrameFlagToJSON.html +174 -0
  237. package/doc/functions/models.logFileFormatFromJSON.html +174 -0
  238. package/doc/functions/models.logFileFormatToJSON.html +174 -0
  239. package/doc/functions/models.logLevelFromJSON.html +174 -0
  240. package/doc/functions/models.logLevelToJSON.html +174 -0
  241. package/doc/functions/models.logReplayStateFromJSON.html +174 -0
  242. package/doc/functions/models.logReplayStateToJSON.html +174 -0
  243. package/doc/functions/models.longToNumber.html +174 -0
  244. package/doc/functions/models.measurementEventFromJSON.html +174 -0
  245. package/doc/functions/models.measurementEventToJSON.html +174 -0
  246. package/doc/functions/models.messageLoggerStateFromJSON.html +174 -0
  247. package/doc/functions/models.messageLoggerStateToJSON.html +174 -0
  248. package/doc/functions/models.protocolsFromJSON.html +174 -0
  249. package/doc/functions/models.protocolsToJSON.html +174 -0
  250. package/doc/functions/models.separatorFromJSON.html +174 -0
  251. package/doc/functions/models.separatorToJSON.html +174 -0
  252. package/doc/functions/models.signalEncodingFromJSON.html +174 -0
  253. package/doc/functions/models.signalEncodingToJSON.html +174 -0
  254. package/doc/functions/models.signalTypeFromJSON.html +174 -0
  255. package/doc/functions/models.signalTypeToJSON.html +174 -0
  256. package/doc/functions/models.signalValueTriggerOperatorFromJSON.html +174 -0
  257. package/doc/functions/models.signalValueTriggerOperatorToJSON.html +174 -0
  258. package/doc/functions/models.statusLevelFromJSON.html +174 -0
  259. package/doc/functions/models.statusLevelToJSON.html +174 -0
  260. package/doc/functions/models.timeReferenceFromJSON.html +174 -0
  261. package/doc/functions/models.timeReferenceToJSON.html +174 -0
  262. package/doc/functions/models.triggerOperatorFromJSON.html +174 -0
  263. package/doc/functions/models.triggerOperatorToJSON.html +174 -0
  264. package/doc/hierarchy.html +174 -0
  265. package/doc/index.html +244 -0
  266. package/doc/interfaces/controls.ButtonGroupProps.html +183 -0
  267. package/doc/interfaces/controls.ButtonProps.html +195 -0
  268. package/doc/interfaces/controls.CanChannelSelectControlProps.html +194 -0
  269. package/doc/interfaces/controls.CanIdentifierControlProps.html +195 -0
  270. package/doc/interfaces/controls.CanIdentifierFrameControlProps.html +190 -0
  271. package/doc/interfaces/controls.CanIdentifierGeneratorControlProps.html +208 -0
  272. package/doc/interfaces/controls.CanIdentifierGeneratorSettingsControlProps.html +194 -0
  273. package/doc/interfaces/controls.CheckboxControlProps.html +190 -0
  274. package/doc/interfaces/controls.ContextMenuProps.html +182 -0
  275. package/doc/interfaces/controls.DropdownButtonChildrenProps.html +177 -0
  276. package/doc/interfaces/controls.DropdownButtonProps.html +193 -0
  277. package/doc/interfaces/controls.DropdownButtonTextItemsProps.html +183 -0
  278. package/doc/interfaces/controls.DropdownPanelProps.html +193 -0
  279. package/doc/interfaces/controls.FormControlRowProps.html +181 -0
  280. package/doc/interfaces/controls.ILocalizedStrings.html +176 -0
  281. package/doc/interfaces/controls.InlineEditorProps.html +186 -0
  282. package/doc/interfaces/controls.LabelProps.html +179 -0
  283. package/doc/interfaces/controls.NumberRangeControlProps.html +225 -0
  284. package/doc/interfaces/controls.RadioControlProps.html +187 -0
  285. package/doc/interfaces/controls.RadioGroupControlProps.html +182 -0
  286. package/doc/interfaces/controls.SectionControlProps.html +190 -0
  287. package/doc/interfaces/controls.SelectControlProps.html +205 -0
  288. package/doc/interfaces/controls.TableColumn.html +185 -0
  289. package/doc/interfaces/controls.TableControlProps.html +197 -0
  290. package/doc/interfaces/controls.TextControlProps.html +214 -0
  291. package/doc/interfaces/controls.ToggleButtonGroupProps.html +190 -0
  292. package/doc/interfaces/controls.ToggleButtonProps.html +187 -0
  293. package/doc/interfaces/controls.ToolbarControlProps.html +191 -0
  294. package/doc/interfaces/controls.ValidateableTextControlProps.html +233 -0
  295. package/doc/interfaces/controls.toolbarItem.html +185 -0
  296. package/doc/interfaces/ipc.ILogger.html +181 -0
  297. package/doc/interfaces/models.AboutInformation.html +181 -0
  298. package/doc/interfaces/models.ActivateLicenseRequest.html +181 -0
  299. package/doc/interfaces/models.AddAllConnectedCanChannelsRequest.html +177 -0
  300. package/doc/interfaces/models.AddAllConnectedLinChannelsRequest.html +177 -0
  301. package/doc/interfaces/models.AddOrUpdateDataProcessorRequest.html +185 -0
  302. package/doc/interfaces/models.AddOrUpdateSourceRequest.html +181 -0
  303. package/doc/interfaces/models.AddOrUpdateTargetRequest.html +181 -0
  304. package/doc/interfaces/models.ApiPreferences.html +183 -0
  305. package/doc/interfaces/models.AppEventArgs.html +179 -0
  306. package/doc/interfaces/models.BaseNodeProperties.html +181 -0
  307. package/doc/interfaces/models.BusStatus.html +190 -0
  308. package/doc/interfaces/models.CanBusParamLimits.html +180 -0
  309. package/doc/interfaces/models.CanBusParams.html +197 -0
  310. package/doc/interfaces/models.CanBusSpeed.html +187 -0
  311. package/doc/interfaces/models.CanBusSpeedInfo.html +193 -0
  312. package/doc/interfaces/models.CanChannelCapacity.html +180 -0
  313. package/doc/interfaces/models.CanChannelConfiguration.html +185 -0
  314. package/doc/interfaces/models.CanFDBusSpeedCombination.html +177 -0
  315. package/doc/interfaces/models.CanFDBusSpeedInfo.html +191 -0
  316. package/doc/interfaces/models.CanFrameFlags.html +177 -0
  317. package/doc/interfaces/models.CanMessageFilterSettings.html +178 -0
  318. package/doc/interfaces/models.Channel.html +180 -0
  319. package/doc/interfaces/models.ChannelSettings.html +193 -0
  320. package/doc/interfaces/models.ClearLinMessageRequest.html +180 -0
  321. package/doc/interfaces/models.ConnectNodesRequest.html +178 -0
  322. package/doc/interfaces/models.DataProcessingStatus.html +179 -0
  323. package/doc/interfaces/models.DataProcessorNodeProperties.html +181 -0
  324. package/doc/interfaces/models.DatabasesSettings.html +176 -0
  325. package/doc/interfaces/models.Device.html +182 -0
  326. package/doc/interfaces/models.DeviceEventArgs.html +177 -0
  327. package/doc/interfaces/models.Devices.html +175 -0
  328. package/doc/interfaces/models.DisconnectNodesRequest.html +178 -0
  329. package/doc/interfaces/models.Empty.html +182 -0
  330. package/doc/interfaces/models.ErrorStatus.html +177 -0
  331. package/doc/interfaces/models.Frame.html +203 -0
  332. package/doc/interfaces/models.FrameDefinition.html +185 -0
  333. package/doc/interfaces/models.FrameDefinitions.html +175 -0
  334. package/doc/interfaces/models.FramePropertyValue.html +177 -0
  335. package/doc/interfaces/models.FrameReceivedTrigger.html +179 -0
  336. package/doc/interfaces/models.Frame_PropertiesEntry.html +176 -0
  337. package/doc/interfaces/models.Frames.html +175 -0
  338. package/doc/interfaces/models.GetCanChannelBusSpeedsRequest.html +177 -0
  339. package/doc/interfaces/models.GetCanChannelBusSpeedsResponse.html +179 -0
  340. package/doc/interfaces/models.GetCanFdBusSpeedsRequest.html +179 -0
  341. package/doc/interfaces/models.GetCanFdBusSpeedsResponse.html +177 -0
  342. package/doc/interfaces/models.GetChannelsFromLogFileRequest.html +178 -0
  343. package/doc/interfaces/models.GetChannelsFromLogFileResponse.html +177 -0
  344. package/doc/interfaces/models.GetClassicCanBusSpeedsRequest.html +178 -0
  345. package/doc/interfaces/models.GetClassicCanBusSpeedsResponse.html +177 -0
  346. package/doc/interfaces/models.GetDataProcessorResponse.html +176 -0
  347. package/doc/interfaces/models.GetDevicesRequest.html +177 -0
  348. package/doc/interfaces/models.GetDevicesResponse.html +176 -0
  349. package/doc/interfaces/models.GetFrameDefinitionsFromDatabaseFilesRequest.html +178 -0
  350. package/doc/interfaces/models.GetLicensesResponse.html +177 -0
  351. package/doc/interfaces/models.GetLogFileFormatsRequest.html +180 -0
  352. package/doc/interfaces/models.GetLogFileFormatsResponse.html +183 -0
  353. package/doc/interfaces/models.GetLogLevelResponse.html +177 -0
  354. package/doc/interfaces/models.GetScheduleTablesFromDatabaseFilesRequest.html +178 -0
  355. package/doc/interfaces/models.GetScheduleTablesFromDatabaseFilesResponse.html +177 -0
  356. package/doc/interfaces/models.GetServiceExtensionInfoRequest.html +181 -0
  357. package/doc/interfaces/models.GetServiceExtensionInfoResponse.html +187 -0
  358. package/doc/interfaces/models.GetSignalDataFromMessageDataRequest.html +180 -0
  359. package/doc/interfaces/models.GetSignalDataFromMessageDataResponse.html +177 -0
  360. package/doc/interfaces/models.GetSourceResponse.html +176 -0
  361. package/doc/interfaces/models.GetTargetResponse.html +176 -0
  362. package/doc/interfaces/models.ILogFileFormat.html +179 -0
  363. package/doc/interfaces/models.IProject.html +179 -0
  364. package/doc/interfaces/models.IUserSettings.html +187 -0
  365. package/doc/interfaces/models.IWorkspaceComponentPaneData.html +177 -0
  366. package/doc/interfaces/models.IWorkspaceContainerPaneData.html +178 -0
  367. package/doc/interfaces/models.IWorkspaceData.html +178 -0
  368. package/doc/interfaces/models.IWorkspacePaneData.html +178 -0
  369. package/doc/interfaces/models.IdentifierRequest.html +178 -0
  370. package/doc/interfaces/models.IdentifiersRequest.html +178 -0
  371. package/doc/interfaces/models.InstallServiceExtensionRequest.html +181 -0
  372. package/doc/interfaces/models.InterpreterSettings.html +177 -0
  373. package/doc/interfaces/models.J1939InterpreterSettings.html +175 -0
  374. package/doc/interfaces/models.LicenseInformation.html +191 -0
  375. package/doc/interfaces/models.Licenses.html +177 -0
  376. package/doc/interfaces/models.LinChannelConfiguration.html +185 -0
  377. package/doc/interfaces/models.LinFrameFlags.html +177 -0
  378. package/doc/interfaces/models.LogMessage.html +185 -0
  379. package/doc/interfaces/models.LogMessages.html +177 -0
  380. package/doc/interfaces/models.LogReplaySettings.html +199 -0
  381. package/doc/interfaces/models.LogReplaySettings_ChannelIdentifiersEntry.html +176 -0
  382. package/doc/interfaces/models.LogReplayStatus.html +176 -0
  383. package/doc/interfaces/models.MeasurementEventArgs.html +179 -0
  384. package/doc/interfaces/models.MeasurementSetup.html +179 -0
  385. package/doc/interfaces/models.MessageLoggerSettings.html +213 -0
  386. package/doc/interfaces/models.MessageLoggerStatus.html +176 -0
  387. package/doc/interfaces/models.NodeStatus.html +191 -0
  388. package/doc/interfaces/models.NodeStatuses.html +176 -0
  389. package/doc/interfaces/models.OnlineStatus.html +176 -0
  390. package/doc/interfaces/models.PeriodicTransmissionSettings.html +209 -0
  391. package/doc/interfaces/models.RequestLinMessageRequest.html +180 -0
  392. package/doc/interfaces/models.ScheduleTable.html +181 -0
  393. package/doc/interfaces/models.ScheduleTableEntry.html +179 -0
  394. package/doc/interfaces/models.SendLinWakeupFrameRequest.html +182 -0
  395. package/doc/interfaces/models.SendMessageRequest.html +178 -0
  396. package/doc/interfaces/models.ServiceExtensionSettings.html +177 -0
  397. package/doc/interfaces/models.SetLogLevelRequest.html +179 -0
  398. package/doc/interfaces/models.SetMeasurementSetupRequest.html +177 -0
  399. package/doc/interfaces/models.SetSignalDataToMessageDataRequest.html +182 -0
  400. package/doc/interfaces/models.SetSignalDataToMessageDataResponse.html +180 -0
  401. package/doc/interfaces/models.SignalDefinition.html +188 -0
  402. package/doc/interfaces/models.SignalDefinition_EnumValuesEntry.html +176 -0
  403. package/doc/interfaces/models.SignalDefinitions.html +175 -0
  404. package/doc/interfaces/models.SignalValue.html +180 -0
  405. package/doc/interfaces/models.SignalValueTrigger.html +189 -0
  406. package/doc/interfaces/models.SourceNodeProperties.html +180 -0
  407. package/doc/interfaces/models.StartPeriodicTransmissionRequest.html +178 -0
  408. package/doc/interfaces/models.StartPeriodicTransmissionResponse.html +176 -0
  409. package/doc/interfaces/models.TargetNodeProperties.html +178 -0
  410. package/doc/interfaces/models.TriggerSettings.html +181 -0
  411. package/doc/interfaces/models.UninstallServiceExtensionRequest.html +179 -0
  412. package/doc/interfaces/models.UpdateLinMessageRequest.html +181 -0
  413. package/doc/interfaces/models.WriteFrame.html +183 -0
  414. package/doc/modules/controls.html +242 -0
  415. package/doc/modules/hooks.html +201 -0
  416. package/doc/modules/icons.html +216 -0
  417. package/doc/modules/ipc.html +202 -0
  418. package/doc/modules/models.html +478 -0
  419. package/doc/modules.html +179 -0
  420. package/doc/types/controls.ContextMenuOption.html +179 -0
  421. package/doc/types/controls.SelectOption.html +177 -0
  422. package/doc/types/controls.StringsMap.html +175 -0
  423. package/doc/types/controls.canIdentifierType.html +175 -0
  424. package/doc/types/models.IReadOnlyDataBuffer.html +174 -0
  425. package/doc/types/models.themes.html +174 -0
  426. package/doc/variables/models.AboutInformation-1.html +174 -0
  427. package/doc/variables/models.ActivateLicenseRequest-1.html +174 -0
  428. package/doc/variables/models.AddAllConnectedCanChannelsRequest-1.html +174 -0
  429. package/doc/variables/models.AddAllConnectedLinChannelsRequest-1.html +174 -0
  430. package/doc/variables/models.AddOrUpdateDataProcessorRequest-1.html +174 -0
  431. package/doc/variables/models.AddOrUpdateSourceRequest-1.html +174 -0
  432. package/doc/variables/models.AddOrUpdateTargetRequest-1.html +174 -0
  433. package/doc/variables/models.ApiPreferences-1.html +174 -0
  434. package/doc/variables/models.AppEventArgs-1.html +174 -0
  435. package/doc/variables/models.BaseNodeProperties-1.html +174 -0
  436. package/doc/variables/models.BusStatus-1.html +174 -0
  437. package/doc/variables/models.CanBusParamLimits-1.html +174 -0
  438. package/doc/variables/models.CanBusParams-1.html +174 -0
  439. package/doc/variables/models.CanBusSpeed-1.html +174 -0
  440. package/doc/variables/models.CanBusSpeedInfo-1.html +174 -0
  441. package/doc/variables/models.CanChannelCapacity-1.html +174 -0
  442. package/doc/variables/models.CanChannelConfiguration-1.html +174 -0
  443. package/doc/variables/models.CanFDBusSpeedCombination-1.html +174 -0
  444. package/doc/variables/models.CanFDBusSpeedInfo-1.html +174 -0
  445. package/doc/variables/models.CanFrameFlags-1.html +174 -0
  446. package/doc/variables/models.CanMessageFilterSettings-1.html +174 -0
  447. package/doc/variables/models.Channel-1.html +174 -0
  448. package/doc/variables/models.ChannelSettings-1.html +174 -0
  449. package/doc/variables/models.ClearLinMessageRequest-1.html +174 -0
  450. package/doc/variables/models.ConnectNodesRequest-1.html +174 -0
  451. package/doc/variables/models.DataProcessingStatus-1.html +174 -0
  452. package/doc/variables/models.DataProcessorNodeProperties-1.html +174 -0
  453. package/doc/variables/models.DatabasesSettings-1.html +174 -0
  454. package/doc/variables/models.Device-1.html +174 -0
  455. package/doc/variables/models.DeviceEventArgs-1.html +174 -0
  456. package/doc/variables/models.Devices-1.html +174 -0
  457. package/doc/variables/models.DisconnectNodesRequest-1.html +174 -0
  458. package/doc/variables/models.Empty-1.html +174 -0
  459. package/doc/variables/models.ErrorStatus-1.html +174 -0
  460. package/doc/variables/models.Frame-1.html +174 -0
  461. package/doc/variables/models.FrameDefinition-1.html +174 -0
  462. package/doc/variables/models.FrameDefinitions-1.html +174 -0
  463. package/doc/variables/models.FramePropertyValue-1.html +174 -0
  464. package/doc/variables/models.FrameReceivedTrigger-1.html +174 -0
  465. package/doc/variables/models.Frame_PropertiesEntry-1.html +174 -0
  466. package/doc/variables/models.Frames-1.html +174 -0
  467. package/doc/variables/models.GetCanChannelBusSpeedsRequest-1.html +174 -0
  468. package/doc/variables/models.GetCanChannelBusSpeedsResponse-1.html +174 -0
  469. package/doc/variables/models.GetCanFdBusSpeedsRequest-1.html +174 -0
  470. package/doc/variables/models.GetCanFdBusSpeedsResponse-1.html +174 -0
  471. package/doc/variables/models.GetChannelsFromLogFileRequest-1.html +174 -0
  472. package/doc/variables/models.GetChannelsFromLogFileResponse-1.html +174 -0
  473. package/doc/variables/models.GetClassicCanBusSpeedsRequest-1.html +174 -0
  474. package/doc/variables/models.GetClassicCanBusSpeedsResponse-1.html +174 -0
  475. package/doc/variables/models.GetDataProcessorResponse-1.html +174 -0
  476. package/doc/variables/models.GetDevicesRequest-1.html +174 -0
  477. package/doc/variables/models.GetDevicesResponse-1.html +174 -0
  478. package/doc/variables/models.GetFrameDefinitionsFromDatabaseFilesRequest-1.html +174 -0
  479. package/doc/variables/models.GetLicensesResponse-1.html +174 -0
  480. package/doc/variables/models.GetLogFileFormatsRequest-1.html +174 -0
  481. package/doc/variables/models.GetLogFileFormatsResponse-1.html +174 -0
  482. package/doc/variables/models.GetLogLevelResponse-1.html +174 -0
  483. package/doc/variables/models.GetScheduleTablesFromDatabaseFilesRequest-1.html +174 -0
  484. package/doc/variables/models.GetScheduleTablesFromDatabaseFilesResponse-1.html +174 -0
  485. package/doc/variables/models.GetServiceExtensionInfoRequest-1.html +174 -0
  486. package/doc/variables/models.GetServiceExtensionInfoResponse-1.html +174 -0
  487. package/doc/variables/models.GetSignalDataFromMessageDataRequest-1.html +174 -0
  488. package/doc/variables/models.GetSignalDataFromMessageDataResponse-1.html +174 -0
  489. package/doc/variables/models.GetSourceResponse-1.html +174 -0
  490. package/doc/variables/models.GetTargetResponse-1.html +174 -0
  491. package/doc/variables/models.IdentifierRequest-1.html +174 -0
  492. package/doc/variables/models.IdentifiersRequest-1.html +174 -0
  493. package/doc/variables/models.InstallServiceExtensionRequest-1.html +174 -0
  494. package/doc/variables/models.InterpreterSettings-1.html +174 -0
  495. package/doc/variables/models.J1939InterpreterSettings-1.html +174 -0
  496. package/doc/variables/models.LicenseInformation-1.html +174 -0
  497. package/doc/variables/models.Licenses-1.html +174 -0
  498. package/doc/variables/models.LinChannelConfiguration-1.html +174 -0
  499. package/doc/variables/models.LinFrameFlags-1.html +174 -0
  500. package/doc/variables/models.LogMessage-1.html +174 -0
  501. package/doc/variables/models.LogMessages-1.html +174 -0
  502. package/doc/variables/models.LogReplaySettings-1.html +174 -0
  503. package/doc/variables/models.LogReplaySettings_ChannelIdentifiersEntry-1.html +174 -0
  504. package/doc/variables/models.LogReplayStatus-1.html +174 -0
  505. package/doc/variables/models.MeasurementEventArgs-1.html +174 -0
  506. package/doc/variables/models.MeasurementSetup-1.html +174 -0
  507. package/doc/variables/models.MessageLoggerSettings-1.html +174 -0
  508. package/doc/variables/models.MessageLoggerStatus-1.html +174 -0
  509. package/doc/variables/models.NodeStatus-1.html +174 -0
  510. package/doc/variables/models.NodeStatuses-1.html +174 -0
  511. package/doc/variables/models.OnlineStatus-1.html +174 -0
  512. package/doc/variables/models.PeriodicTransmissionSettings-1.html +174 -0
  513. package/doc/variables/models.RequestLinMessageRequest-1.html +174 -0
  514. package/doc/variables/models.ScheduleTable-1.html +174 -0
  515. package/doc/variables/models.ScheduleTableEntry-1.html +174 -0
  516. package/doc/variables/models.SendLinWakeupFrameRequest-1.html +174 -0
  517. package/doc/variables/models.SendMessageRequest-1.html +174 -0
  518. package/doc/variables/models.ServiceExtensionSettings-1.html +174 -0
  519. package/doc/variables/models.SetLogLevelRequest-1.html +174 -0
  520. package/doc/variables/models.SetMeasurementSetupRequest-1.html +174 -0
  521. package/doc/variables/models.SetSignalDataToMessageDataRequest-1.html +174 -0
  522. package/doc/variables/models.SetSignalDataToMessageDataResponse-1.html +174 -0
  523. package/doc/variables/models.SignalDefinition-1.html +174 -0
  524. package/doc/variables/models.SignalDefinition_EnumValuesEntry-1.html +174 -0
  525. package/doc/variables/models.SignalDefinitions-1.html +174 -0
  526. package/doc/variables/models.SignalValue-1.html +174 -0
  527. package/doc/variables/models.SignalValueTrigger-1.html +174 -0
  528. package/doc/variables/models.SourceNodeProperties-1.html +174 -0
  529. package/doc/variables/models.StartPeriodicTransmissionRequest-1.html +174 -0
  530. package/doc/variables/models.StartPeriodicTransmissionResponse-1.html +174 -0
  531. package/doc/variables/models.TargetNodeProperties-1.html +174 -0
  532. package/doc/variables/models.TriggerSettings-1.html +174 -0
  533. package/doc/variables/models.UninstallServiceExtensionRequest-1.html +174 -0
  534. package/doc/variables/models.UpdateLinMessageRequest-1.html +174 -0
  535. package/doc/variables/models.WriteFrame-1.html +174 -0
  536. package/doc/variables/models.defaultUserSettings.html +175 -0
  537. package/package.json +129 -0
  538. package/scripts/createCanKingExtension.js +403 -0
  539. package/scripts/index.js +39 -0
  540. package/scripts/template/_.eslintrc.cjs +38 -0
  541. package/scripts/template/_.gitignore +24 -0
  542. package/scripts/template/_.npmrc +2 -0
  543. package/scripts/template/_.prettierrc +8 -0
  544. package/scripts/template/_.vscode/_launch.json +28 -0
  545. package/scripts/template/_index.html +15 -0
  546. package/scripts/template/_tsconfig.app.json +27 -0
  547. package/scripts/template/_tsconfig.json +11 -0
  548. package/scripts/template/_tsconfig.node.json +13 -0
  549. package/scripts/template/_vite.config.ts +7 -0
  550. package/scripts/template/src/App.tsx +12 -0
  551. package/scripts/template/src/WorkspaceView/index.tsx +47 -0
  552. package/scripts/template/src/main.css +9 -0
  553. package/scripts/template/src/main.tsx +19 -0
  554. package/scripts/template/src/vite-env.d.ts +1 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * This module includes a table UI control.
3
+ *
4
+ * To be able to use these controls the CanKingDataProvider component must be present in the
5
+ * component tree above your component. Normally the CanKingDataProvider is added
6
+ * at the root of the component tree.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import React from 'react';
11
+ import { TableCellProps } from '@mui/material';
12
+ import { Variant } from '@mui/material/styles/createTypography';
13
+ /**
14
+ * TableColumn definition.
15
+ */
16
+ export interface TableColumn<T> {
17
+ /** A unique key. */
18
+ key: React.Key;
19
+ /** Header cell properties. */
20
+ headProps: Partial<TableCellProps>;
21
+ /** Header cell content. */
22
+ headCell: React.ReactNode;
23
+ /** Data cell properties. */
24
+ dataProps: Partial<TableCellProps>;
25
+ /** A callback to get the data cell content for the specified row. */
26
+ dataCell: (row: T) => React.ReactNode;
27
+ }
28
+ /**
29
+ * Properties of the TableControl React component.
30
+ */
31
+ export interface TableControlProps<T> {
32
+ /** Data rows to be displayed. */
33
+ data: T[];
34
+ /** Callback to get a unique data key for the specified row. */
35
+ dataKey: (row: T) => React.Key;
36
+ /** The key of the currently selected data row. */
37
+ selectedKey?: React.Key;
38
+ /** Callback to inform that a data row has been clicked. */
39
+ onClickRow?: (row: T) => void;
40
+ /** Column definitions. */
41
+ columns: TableColumn<T>[];
42
+ /** An optional table label. */
43
+ label?: string;
44
+ /** An optional Typography variant to be used for the label. */
45
+ labelVariant?: Variant;
46
+ /** Optional max height. */
47
+ maxHeight?: string | number;
48
+ /** Table size, defaults to 'medium'. */
49
+ size?: 'small' | 'medium';
50
+ /** Set the header sticky, defaults to false. */
51
+ stickyHeader?: boolean;
52
+ /** If true, the table row will shade on hover, defaults to false. */
53
+ hover?: boolean;
54
+ }
55
+ /**
56
+ * Creates a table control.
57
+ * @param props Component properties.
58
+ * @returns The TableControl React component.
59
+ */
60
+ declare function TableControl<T>({ data, dataKey, selectedKey, onClickRow, columns, label, labelVariant, maxHeight, size, stickyHeader, hover, }: TableControlProps<T>): import("react/jsx-runtime").JSX.Element;
61
+ export default TableControl;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A TabsPanel UI control.
3
+ */
4
+ declare const TabsPanel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export default TabsPanel;
@@ -0,0 +1,56 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ /**
3
+ * Properties of the TextControl React component.
4
+ */
5
+ export interface TextControlProps {
6
+ /** The component id. */
7
+ id?: string;
8
+ /** The label of this input control. */
9
+ label?: string;
10
+ /** Any helper text that should be displayed. */
11
+ helperText?: string;
12
+ /** The current value. */
13
+ value: string;
14
+ /**
15
+ * Callback that will be called when the value has been changed.
16
+ * @param value The new value.
17
+ */
18
+ onChange?: (value: string) => void;
19
+ /**
20
+ * Callback that will be called when the control has lost focus.
21
+ */
22
+ onBlur?: () => void;
23
+ /** Set to true to disable this control. */
24
+ disabled?: boolean;
25
+ /** The current error state. */
26
+ error?: boolean;
27
+ /** Set to true if this control's value is required. */
28
+ required?: boolean;
29
+ /** Margins between controls inside this control. */
30
+ margin?: 'dense' | 'normal' | 'none';
31
+ /** The component size. */
32
+ size?: 'small' | 'medium';
33
+ /** Set to true to expand this control to use the full widht of its parent. */
34
+ fullWidth?: boolean;
35
+ /** Input mode. */
36
+ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
37
+ /** Regex pattern of the value in this control. */
38
+ pattern?: string;
39
+ /** A text to be displayed in front of the value. */
40
+ startAdornment?: string;
41
+ /** A text to be displayed after the value. */
42
+ endAdornment?: string;
43
+ /** Optional sx properties. */
44
+ sx?: SxProps<Theme>;
45
+ /** Optional sx properties for the start adornment. */
46
+ sxStartAdornment?: SxProps<Theme>;
47
+ /** Optional sx properties for the end adornment. */
48
+ sxEndAdornment?: SxProps<Theme>;
49
+ }
50
+ /**
51
+ * Creates a text control.
52
+ * @param props Component properties.
53
+ * @returns The TextControl React component.
54
+ */
55
+ declare function TextControl({ id, label, helperText, value, onChange, onBlur, disabled, error, required, margin, size, fullWidth, inputMode, pattern, startAdornment, endAdornment, sx, sxStartAdornment, sxEndAdornment, }: TextControlProps): import("react/jsx-runtime").JSX.Element;
56
+ export default TextControl;
@@ -0,0 +1,143 @@
1
+ /**
2
+ * This module includes a toolbar UI control.
3
+ *
4
+ * To be able to use these controls the CanKingDataProvider component must be present in the
5
+ * component tree above your component. Normally the CanKingDataProvider is added
6
+ * at the root of the component tree.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import React from 'react';
11
+ import { Variant } from '@mui/material/styles/createTypography';
12
+ import { DropdownButtonChildrenProps } from './DropdownButton';
13
+ /**
14
+ * Properties of a Label component displayed by the toolbar.
15
+ */
16
+ export interface LabelProps {
17
+ /** The label text. */
18
+ text: string;
19
+ /** The label variant. */
20
+ variant?: Variant;
21
+ }
22
+ /**
23
+ * Properties of a ToggleButton component displayed by the toolbar.
24
+ */
25
+ export interface ToggleButtonProps {
26
+ /** The value represented by this toggle button. */
27
+ value: string;
28
+ /** An icon that will be displayed in this button. */
29
+ icon: React.ReactNode;
30
+ /** The button size. */
31
+ size?: 'small' | 'medium' | 'large' | number;
32
+ /** A tooltip of this button. */
33
+ tooltip?: string;
34
+ /** Aria label. */
35
+ ariaLabel?: string;
36
+ /** Set to true to disable this button. */
37
+ disabled?: boolean;
38
+ }
39
+ /**
40
+ * Properties of a ToggleButtonGroup component displayed by the toolbar.
41
+ */
42
+ export interface ToggleButtonGroupProps {
43
+ /** Value of the selected buttons in this group. */
44
+ value: string[];
45
+ /**
46
+ * Callback that will be called when any button in this group has been selected/deselected.
47
+ * @param value The new value.
48
+ */
49
+ onChange: (value: string[]) => void;
50
+ /** The buttons in this group. */
51
+ buttons: ToggleButtonProps[];
52
+ /** Size of the buttons in this group. */
53
+ size?: 'small' | 'medium' | 'large';
54
+ /** Set to true if only one of the buttons can be selected at the time. */
55
+ exclusive?: boolean;
56
+ /** Aria label. */
57
+ ariaLabel?: string;
58
+ /** Orientation of this group. */
59
+ orientation?: 'vertical' | 'horizontal';
60
+ }
61
+ /**
62
+ * Properties of a Button component displayed by the toolbar.
63
+ */
64
+ export interface ButtonProps {
65
+ /**
66
+ * Callback that will be called when this button has been clicked.
67
+ */
68
+ onClick: () => void;
69
+ /** Icon to be displayed in this button. */
70
+ icon?: React.ReactNode;
71
+ /** Text to be displayed in this button. */
72
+ text?: string;
73
+ /** Size of this button. */
74
+ size?: 'small' | 'medium' | 'large' | number;
75
+ /** The button variant. */
76
+ variant?: 'text' | 'contained' | 'outlined';
77
+ /** The button color. */
78
+ color?: 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
79
+ /** A tooltip of this button. */
80
+ tooltip?: string;
81
+ /** Aria label. */
82
+ ariaLabel?: string;
83
+ /** Set to true to disable this button. */
84
+ disabled?: boolean;
85
+ /** Chidren to be displayed in this button if this button should be a {@link DropdownButton} */
86
+ children?: React.ReactElement<DropdownButtonChildrenProps>;
87
+ }
88
+ /**
89
+ * Properties of a ButtonGroup component displayed by the toolbar.
90
+ */
91
+ export interface ButtonGroupProps {
92
+ /** The buttons in this group. */
93
+ buttons: ButtonProps[];
94
+ /** Size of the buttons in this group. */
95
+ size?: 'small' | 'medium' | 'large';
96
+ /** Aria label. */
97
+ ariaLabel?: string;
98
+ /** Orientation of this group. */
99
+ orientation?: 'vertical' | 'horizontal';
100
+ }
101
+ /**
102
+ * A toolbar item. Could be one of its properties.
103
+ */
104
+ export interface toolbarItem {
105
+ /** A label. */
106
+ label?: LabelProps;
107
+ /** A toggle button group. */
108
+ toggleButtonGroup?: ToggleButtonGroupProps;
109
+ /** A button. */
110
+ button?: ButtonProps;
111
+ /** A button group. */
112
+ buttonGroup?: ButtonGroupProps;
113
+ /** A custom node. */
114
+ other?: React.ReactNode;
115
+ }
116
+ /**
117
+ * Properties of a ToolbarControl component.
118
+ */
119
+ export interface ToolbarControlProps {
120
+ /** The toolbar items. */
121
+ items: toolbarItem[];
122
+ /** The toolbar height. */
123
+ height?: number;
124
+ /** The toolbar width. */
125
+ width?: number;
126
+ /** How to justify the items. */
127
+ justifyContent?: 'left' | 'center' | 'right' | 'space-between';
128
+ /** The border size. */
129
+ borderSize?: number;
130
+ /** The padding. */
131
+ padding?: number;
132
+ /** The background color. */
133
+ backgroundColor?: string;
134
+ /** The orientation. */
135
+ orientation?: 'vertical' | 'horizontal';
136
+ }
137
+ /**
138
+ * Creates a toolbar control.
139
+ * @param props Component properties.
140
+ * @returns The ToolbarControl React component.
141
+ */
142
+ declare function ToolbarControl({ items, height, width, justifyContent, borderSize, padding, backgroundColor, orientation, }: ToolbarControlProps): import("react/jsx-runtime").JSX.Element;
143
+ export default ToolbarControl;
@@ -0,0 +1,82 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ /**
3
+ * Properties of the ValidateableTextControl React component.
4
+ */
5
+ export interface ValidateableTextControlProps {
6
+ /** The component id. */
7
+ id?: string;
8
+ /** The label of this input control. */
9
+ label?: string;
10
+ /** Any helper text that should be displayed. */
11
+ helperText?: string;
12
+ /** The current value. */
13
+ value: string;
14
+ /**
15
+ * Callback that will be called when the value has been changed.
16
+ * @param value The new value.
17
+ */
18
+ onChange?: (value: string) => void;
19
+ /**
20
+ * Callback that will be called when the control has lost focus.
21
+ * @param value The new value.
22
+ */
23
+ onBlur?: (value: string) => void;
24
+ /** Set to true to disable this control. */
25
+ disabled?: boolean;
26
+ /** Set to true if this control's value is required. */
27
+ required?: boolean;
28
+ /** Margins between controls inside this control. */
29
+ margin?: 'dense' | 'normal' | 'none';
30
+ /** The component size. */
31
+ size?: 'small' | 'medium';
32
+ /** Set to true to expand this control to use the full widht of its parent. */
33
+ fullWidth?: boolean;
34
+ /** Input mode. */
35
+ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
36
+ /** Regex pattern of the value in this control. */
37
+ pattern?: string;
38
+ /** A text to be displayed in front of the value. */
39
+ startAdornment?: string;
40
+ /** A text to be displayed after the value. */
41
+ endAdornment?: string;
42
+ /** Optional sx properties. */
43
+ sx?: SxProps<Theme>;
44
+ /** Optional sx properties for the start adornment. */
45
+ sxStartAdornment?: SxProps<Theme>;
46
+ /** Optional sx properties for the end adornment. */
47
+ sxEndAdornment?: SxProps<Theme>;
48
+ /** The current error state. */
49
+ error?: boolean;
50
+ /**
51
+ * Callback that is called when the error state has changed.
52
+ * @param error The new error state.
53
+ */
54
+ onErrorChange?: (error: boolean) => void;
55
+ /**
56
+ * Callback that will be called when the value has been changed or the control has lost focus.
57
+ * This callback is called before onChange and if the returned err value is true then onChange
58
+ * won't be called.
59
+ * The implemtation of this callback is allowed to modify the specified text value and return
60
+ * the modified value in the val property of the returned object.
61
+ * @param text The new text value.
62
+ * @param trigger The trigger of this callback, either on 'change' or on 'blur'.
63
+ * @returns An object with the validated value (val) and an error state (err).
64
+ */
65
+ onValidate?: (text: string, trigger: 'change' | 'blur') => {
66
+ val: string;
67
+ err: boolean;
68
+ };
69
+ /** Number type if the expected value is a number, if left undefined then the value is expected to be a string. */
70
+ numberType?: 'int' | 'float';
71
+ /** The min value if numberType is set. */
72
+ minValue?: number;
73
+ /** The max value if numberType is set. */
74
+ maxValue?: number;
75
+ }
76
+ /**
77
+ * Creates a text control.
78
+ * @param props Component properties.
79
+ * @returns The ValidateableTextControl React component.
80
+ */
81
+ declare function ValidateableTextControl({ id, label, helperText, value, onChange, onBlur, disabled, required, margin, size, fullWidth, inputMode, pattern, startAdornment, endAdornment, sx, sxStartAdornment, sxEndAdornment, error, onErrorChange, onValidate, numberType, minValue, maxValue, }: ValidateableTextControlProps): import("react/jsx-runtime").JSX.Element;
82
+ export default ValidateableTextControl;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * This module includes UI controls implemented as React components.
3
+ *
4
+ * To be able to use these controls the CanKingDataProvider component must be present in the
5
+ * component tree above your component. Normally the CanKingDataProvider is added
6
+ * at the root of the component tree.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { useSearchParams } from 'react-router-dom';
11
+ * import { useProjectData } from '@kvaser/canking-api/canking';
12
+ * import { CanChannelSelectControl, FillBox } from '@kvaser/canking-api/controls';
13
+ *
14
+ * // If any data should be stored in the project file then add it to this interface
15
+ * interface IProjectViewData {
16
+ * // This is an example showing how to store the selected channel id to the project file
17
+ * channelId: string;
18
+ * }
19
+ *
20
+ * // Define any default values for the project data that will be used when the component is created
21
+ * const defaultProjectViewData: IProjectViewData = {
22
+ * channelId: '',
23
+ * };
24
+ *
25
+ * function WorkspaceView() {
26
+ * // Get this view's unique id from search params
27
+ * const [searchParams] = useSearchParams();
28
+ * const idString = searchParams.get('id');
29
+ * const id = idString !== null ? Number.parseInt(idString, 10) : -1;
30
+ *
31
+ * // Use the useProjectData hook to serialize/deserialize your view data to the project
32
+ * const [projectData, setProjectData] = useProjectData<IProjectViewData>(id, defaultProjectViewData);
33
+ *
34
+ * // A callback that will get the new selected channel id and save it to the project data
35
+ * const onChannelIdentifierChange = (channelId: string) => {
36
+ * const data = { ...projectData };
37
+ * data.channelId = channelId;
38
+ * setProjectData(data);
39
+ * };
40
+ *
41
+ * return (
42
+ * <FillBox component="form">
43
+ * <div>Add your elements here!</div>
44
+ * <div>This is an example how to use the CanChannelSelectControl:</div>
45
+ * <CanChannelSelectControl
46
+ * channelIdentifier={projectData.channelId}
47
+ * onChannelIdentifierChange={onChannelIdentifierChange}
48
+ * hideSectionControl
49
+ * />
50
+ * </FillBox>
51
+ * );
52
+ * }
53
+ *
54
+ * export default WorkspaceView;
55
+ * ```
56
+ *
57
+ * @packageDocumentation
58
+ */
59
+ export { type ILocalizedStrings, LocalizedStrings, type StringsMap } from './LocalizedStrings';
60
+ export * from './CheckboxControl';
61
+ export { default as CheckboxControl } from './CheckboxControl';
62
+ export * from './DropdownButton';
63
+ export { default as OneLineButton } from './OneLineButton';
64
+ export * from './OneLineButton';
65
+ export { default as DropdownButton } from './DropdownButton';
66
+ export * from './DropdownPanel';
67
+ export { default as DropdownPanel } from './DropdownPanel';
68
+ export * from './FormControlRow';
69
+ export { default as FormControlRow } from './FormControlRow';
70
+ export * from './InlineEditor';
71
+ export { default as InlineEditor } from './InlineEditor';
72
+ export * from './NumberRangeControl';
73
+ export { default as NumberRangeControl } from './NumberRangeControl';
74
+ export * from './RadioControl';
75
+ export { default as RadioControl } from './RadioControl';
76
+ export * from './RadioGroupControl';
77
+ export { default as RadioGroupControl } from './RadioGroupControl';
78
+ export * from './SectionControl';
79
+ export { default as SectionControl } from './SectionControl';
80
+ export * from './SelectControl';
81
+ export { default as SelectControl } from './SelectControl';
82
+ export * from './SizedBox';
83
+ export { default as SizedBox } from './SizedBox';
84
+ export * from './TableControl';
85
+ export { default as TableControl } from './TableControl';
86
+ export * from './TabsPanel';
87
+ export { default as TabsPanel } from './TabsPanel';
88
+ export * from './TextControl';
89
+ export { default as TextControl } from './TextControl';
90
+ export * from './ToolbarControl';
91
+ export { default as ToolbarControl } from './ToolbarControl';
92
+ export * from './ValidateableTextControl';
93
+ export { default as ValidateableTextControl } from './ValidateableTextControl';
94
+ export * from './ContextMenu';
95
+ export { default as ContextMenu } from './ContextMenu';
96
+ export * from './CanIdentifierControl';
97
+ export { default as CanIdentifierControl } from './CanIdentifierControl';
98
+ export * from './CanChannelSelectControl';
99
+ export { default as CanChannelSelectControl } from './CanChannelSelectControl';
100
+ export * from './FillBox';
101
+ export { default as FillBox } from './FillBox';
102
+ export * from './CanKingDataProvider';
103
+ export { default as CanKingDataProvider } from './CanKingDataProvider';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index.js"),s=require("react/jsx-runtime"),o=require("react"),f=require("@mui/material"),H=require("./icons.js"),Q=require("fast-deep-equal");require("long");const O=require("./measurement_settings.js");function Z({id:e=void 0,label:t,checked:a,onChange:r,disabled:l=!1,size:i="small",sx:u=void 0}){const g=o.useCallback(n=>{if(n.key==="Enter"&&!n.ctrlKey&&!n.altKey&&!n.shiftKey){n.preventDefault();return}},[]);return s.jsx(f.FormControlLabel,{id:e,"aria-label":e,disabled:l,"aria-disabled":l,control:s.jsx(f.Checkbox,{size:i,checked:a,onChange:(n,d)=>r(d),onKeyDown:g}),label:t,slotProps:{typography:{noWrap:!0}},sx:u})}const X=f.styled(f.Button)(()=>({whiteSpace:"nowrap",minWidth:"max-content"}));function le({items:e,onSelect:t,onClose:a=void 0}){const r=o.useCallback(l=>{t(l),a&&a()},[a,t]);return s.jsx(s.Fragment,{children:e.map(l=>s.jsx(f.MenuItem,{onClick:()=>r(l.key),children:l.text},l.key))})}function V({id:e="dropdown-button",startIcon:t=void 0,endIcon:a=void 0,text:r=void 0,variant:l="outlined",color:i=void 0,size:u="medium",disabled:g=!1,children:n}){const[d,C]=o.useState(null),m=!!d,p=o.useCallback(L=>{C(L.currentTarget)},[]),h=o.useCallback(()=>{C(null)},[]),S=o.cloneElement(o.Children.only(n),{onClose:h});return s.jsxs(s.Fragment,{children:[!r&&s.jsx(f.IconButton,{id:e,"data-testid":e,"aria-controls":m?`${e}-popover`:void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:p,size:u,color:i,disabled:g,children:t}),r&&s.jsx(X,{id:e,"data-testid":e,"aria-controls":m?`${e}-popover`:void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,variant:l,disableElevation:!0,onClick:p,startIcon:t,endIcon:a??s.jsx(H.LineArrowDownIcon,{}),size:u,color:i,disabled:g,children:r}),s.jsx(f.Popover,{id:`${e}-popover`,"aria-labelledby":e,anchorEl:d,open:m,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:S})]})}const oe=f.styled("div")(({top:e,left:t,width:a,height:r})=>({top:e,left:t,width:a,height:r,position:"absolute",zIndex:1})),ie=f.styled("div")(({top:e,left:t,width:a,height:r,position:l,theme:i})=>({top:e,left:t,width:a,height:r,position:"absolute",zIndex:2,color:i.palette.primary.contrastText,backgroundColor:i.palette.primary.main,display:"flex",flexDirection:l==="left"||l==="right"?"column":"row",borderTopLeftRadius:l==="top"||l==="left"?0:8,borderTopRightRadius:l==="top"||l==="right"?0:8,borderBottomRightRadius:l==="bottom"||l==="right"?0:8,borderBottomLeftRadius:l==="bottom"||l==="left"?0:8})),q=8;function ce({id:e=void 0,position:t,parentWidth:a,parentHeight:r,maxLength:l,dropDownSize:i,autoHideTimeout:u=0,forceShow:g=!1,children:n=null}){const d=o.useMemo(()=>{switch(t){case"left":case"right":return Math.min(l,r);case"top":case"bottom":return Math.min(l,a);default:return l}},[l,r,a,t]),C=o.useMemo(()=>{switch(t){case"left":case"right":return(r-d)/2;case"top":return 0;case"bottom":return r-q;default:return 0}},[d,r,t]),m=o.useMemo(()=>{switch(t){case"left":return 0;case"right":return a-q;case"top":case"bottom":return(a-d)/2;default:return 0}},[d,a,t]),p=o.useMemo(()=>{switch(t){case"left":case"right":return q;case"top":case"bottom":return d;default:return 0}},[d,t]),h=o.useMemo(()=>{switch(t){case"left":case"right":return d;case"top":case"bottom":return q;default:return 0}},[d,t]),S=o.useMemo(()=>{switch(t){case"left":case"right":return(r-d)/2;case"top":return 0;case"bottom":return r-i;default:return 0}},[i,d,r,t]),L=o.useMemo(()=>{switch(t){case"left":return 0;case"right":return a-i;case"top":case"bottom":return(a-d)/2;default:return 0}},[i,d,a,t]),M=o.useMemo(()=>{switch(t){case"left":case"right":return i;case"top":case"bottom":return d;default:return 0}},[i,d,t]),A=o.useMemo(()=>{switch(t){case"left":case"right":return d;case"top":case"bottom":return i;default:return 0}},[i,d,t]),[j,v]=o.useState(!1),c=o.useCallback(F=>{F.buttons===0&&u&&v(!0)},[u]),y=o.useCallback(()=>{v(!1)},[]);return o.useEffect(()=>{let F;return j&&u&&(F=setTimeout(()=>v(!1),u)),()=>{F&&clearTimeout(F)}},[u,j]),s.jsxs(s.Fragment,{children:[s.jsx(oe,{id:e,top:C,left:m,width:p,height:h,"aria-haspopup":"true",onMouseEnter:c}),(j||g===!0)&&s.jsx(ie,{top:S,left:L,width:M,height:A,position:t,onMouseLeave:y,children:n})]})}function z({children:e,fullWidth:t=!0,spacing:a="4px",alignItems:r="center"}){return s.jsx(f.FormControl,{margin:"dense",fullWidth:t,variant:"standard",children:s.jsx(f.Stack,{direction:"row",spacing:a,alignItems:r,children:e})})}const de=f.styled("input")(({variant:e,theme:t})=>({...t.typography[e]})),ue=f.styled("span")(({variant:e,theme:t})=>({...t.typography[e]}));function fe({value:e,onChange:t,ariaLabel:a=void 0,variant:r="body1"}){const l=o.useRef(null),[i,u]=o.useState(e),g=o.useCallback(C=>u(C.target.value),[]),n=o.useCallback(C=>{(C.key==="Enter"||C.key==="Escape")&&(C.key==="Escape"&&(u(e),C.currentTarget.value=e),C.currentTarget.blur())},[e]),d=o.useCallback(C=>{t(C.target.value)},[t]);return o.useEffect(()=>{var C;(C=l.current)==null||C.focus()},[]),s.jsx(de,{ref:l,variant:r??"body1",type:"text","aria-label":a,value:i,onChange:g,onKeyDown:n,onBlur:d})}function ge({editMode:e,value:t,onValueChange:a,ariaLabel:r=void 0,variant:l="body1"}){return s.jsxs(s.Fragment,{children:[e&&s.jsx(fe,{ariaLabel:r,value:t,onChange:a,variant:l}),!e&&s.jsx(ue,{variant:l??"body1",children:t})]})}function ee({id:e=void 0,label:t=void 0,helperText:a="",value:r,onChange:l=void 0,onBlur:i=void 0,disabled:u=!1,error:g=!1,required:n=!1,margin:d="dense",size:C="small",fullWidth:m=!1,inputMode:p=void 0,pattern:h=void 0,startAdornment:S=void 0,endAdornment:L=void 0,sx:M=void 0,sxStartAdornment:A=void 0,sxEndAdornment:j=void 0}){const v=o.useCallback(R=>{l&&l(R.target.value)},[l]),c=o.useCallback(R=>{if(R.key==="Enter"&&!R.ctrlKey&&!R.altKey&&!R.shiftKey){R.preventDefault(),R.stopPropagation(),document.activeElement instanceof HTMLElement&&document.activeElement.blur();return}},[]),y=A??{marginBottom:1},F=j??{marginBottom:1};return s.jsx(f.TextField,{id:e,"aria-label":e,type:"text",label:t,helperText:a,margin:d,size:C,fullWidth:m,variant:"standard",value:r,onChange:v,onBlur:i,disabled:u,"aria-disabled":u,error:g,required:n,slotProps:{input:{startAdornment:S?s.jsx(f.InputAdornment,{position:"start",sx:{...y},children:S}):null,endAdornment:L?s.jsx(f.InputAdornment,{position:"end",sx:{...F},children:L}):null},htmlInput:{inputMode:p,pattern:h}},sx:M,onKeyDown:c})}function W({id:e,label:t=void 0,helperText:a="",value:r,onChange:l=void 0,onBlur:i=void 0,disabled:u=!1,required:g=!1,margin:n="dense",size:d="small",fullWidth:C=!1,inputMode:m=void 0,pattern:p=void 0,startAdornment:h=void 0,endAdornment:S=void 0,sx:L=void 0,sxStartAdornment:M=void 0,sxEndAdornment:A=void 0,error:j=void 0,onErrorChange:v=void 0,onValidate:c=void 0,numberType:y="int",minValue:F=void 0,maxValue:R=void 0}){const[$,_]=o.useState(r),[D,P]=o.useState(j!==void 0?j:!1);o.useEffect(()=>{_(x=>r!==x?r:x)},[r]),o.useEffect(()=>{P(x=>j!==void 0&&j!==x?j:x)},[j]);const U=o.useCallback(x=>{const E=Number.parseInt(x,x.startsWith("0x")?16:10);let T=Number.isNaN(E);return T||(T=F!==void 0&&E<F),T||(T=R!==void 0&&E>R),{val:x,err:T}},[R,F]),k=o.useCallback(x=>{let E=!1;if(x.endsWith(",")||x.endsWith("."))return E=!0,{val:x,err:E};const T=Number.parseFloat(x.replace(",","."));return E=Number.isNaN(T),E||(E=F!==void 0&&T<F),E||(E=R!==void 0&&T>R),{val:T.toString(),err:E}},[R,F]),I=o.useCallback(x=>y==="int"?U(x):k(x),[y,k,U]),B=o.useCallback((x,E)=>{let T=x,K=!1;return!g&&(T===void 0||T==="")?{val:T,err:K}:(y!==void 0&&({val:T,err:K}=I(x)),!K&&c&&({val:T,err:K}=c(T,E)),{val:T,err:K})},[c,I]),b=o.useCallback(x=>{const{val:E,err:T}=B(x,"change");(j===void 0||j===!1)&&P(T),_(T?x:E),!T&&l&&l(E)},[l,B]),N=o.useCallback(()=>{const{val:x,err:E}=B($,"blur");(j===void 0||j===!1)&&P(E),!E&&i&&i(x)},[i,B,$]);return o.useEffect(()=>{v&&v(D)},[D,v]),s.jsx(ee,{id:e,label:t,helperText:a,value:$,onChange:b,onBlur:N,disabled:u,error:D,required:g,margin:n,size:d,fullWidth:C,inputMode:m,pattern:p,startAdornment:h,endAdornment:S,sx:L,sxStartAdornment:M,sxEndAdornment:A})}function xe({minValue:e,maxValue:t,onChange:a=void 0,onBlur:r=void 0,minError:l=void 0,onMinErrorChange:i=void 0,maxError:u=void 0,onMaxErrorChange:g=void 0,onMinValidate:n=void 0,onMaxValidate:d=void 0,minDisabled:C=!1,maxDisabled:m=!1,unit:p=void 0,lowerLimit:h=void 0,upperLimit:S=void 0}){const L=w.useLocalizedStrings(),M=Number.parseInt(e),A=Number.parseInt(t),[j,v]=o.useState(e.toString()),[c,y]=o.useState(t.toString()),[F,R]=o.useState(l===!0||Number.isNaN(M)||M<(h??0)||S&&M>S||!Number.isNaN(A)&&M>=A),[$,_]=o.useState(u===!0||Number.isNaN(A)||A<(h??0)||S&&A>S||!Number.isNaN(M)&&M>=A);o.useEffect(()=>{v(b=>e.toString()!==b?e.toString():b)},[e]),o.useEffect(()=>{R(b=>l!==void 0&&l!==b?l:b)},[l]),o.useEffect(()=>{y(b=>t.toString()!==b?t.toString():b)},[t]),o.useEffect(()=>{_(b=>u!==void 0&&u!==b?u:b)},[u]);const D=o.useCallback(b=>{const N=Number.parseInt(b,b.startsWith("0x")?16:10),x=Number.parseInt(c),E=Number.isNaN(N)||N<(h??0)||S&&N>S||!Number.isNaN(x)&&N>=x;return{val:b,err:E}},[c,h,S]),P=o.useCallback(b=>{const N=Number.parseInt(b,b.startsWith("0x")?16:10),x=Number.parseInt(j),E=Number.isNaN(N)||N<(h??0)||S&&N>S||!Number.isNaN(x)&&x>=N;return{val:b,err:E}},[j,h,S]),U=o.useCallback(b=>{let{val:N,err:x}=D(b);if(!x&&n&&({val:N,err:x}=n(b,"change")),(l===void 0||l===!1)&&R(x),x)a&&a(b,c);else{const E=Number.parseInt(N,N.startsWith("0x")?16:10).toString();v(E),a&&a(E,c)}},[D,n,l,a,c]),k=o.useCallback(b=>{let{val:N,err:x}=D(b);!x&&n&&({val:N,err:x}=n(N,"blur")),R(x),!x&&r&&r(N,c)},[D,n,r,c]),I=o.useCallback(b=>{let{val:N,err:x}=P(b);if(!x&&d&&({val:N,err:x}=d(b,"change")),(u===void 0||u===!1)&&_(x),x)a&&a(j,b);else{const E=Number.parseInt(N,N.startsWith("0x")?16:10).toString();y(E),a&&a(j,E)}},[P,d,u,a,j]),B=o.useCallback(b=>{let{val:N,err:x}=P(b);!x&&d&&({val:N,err:x}=d(N,"blur")),_(x),!x&&r&&r(j,N)},[P,d,r,j]);return o.useEffect(()=>{i&&i(F),g&&g($)},[$,F,g,i]),s.jsxs(s.Fragment,{children:[s.jsx(W,{id:"min-value",disabled:C,inputMode:"numeric",fullWidth:!0,value:j,onChange:U,onBlur:k,startAdornment:L.getString("LabelFrom"),endAdornment:p,numberType:"int",error:F,onErrorChange:R}),s.jsx(W,{id:"max-value",disabled:m,inputMode:"numeric",fullWidth:!0,value:c,onChange:I,onBlur:B,startAdornment:L.getString("LabelTo"),endAdornment:p,numberType:"int",error:$,onErrorChange:_})]})}function G({id:e=void 0,label:t,value:a,disabled:r=!1,size:l="small",sx:i=void 0}){return s.jsx(f.FormControlLabel,{id:e,"aria-label":e,value:a,disabled:r,"aria-disabled":r,control:s.jsx(f.Radio,{size:l}),label:t,componentsProps:{typography:{noWrap:!0}},sx:i})}function te({children:e,id:t=void 0,value:a,onChange:r}){return s.jsx(f.RadioGroup,{id:t,"aria-label":t,value:a,onChange:(l,i)=>r(i),children:e})}const be=f.styled(f.Box,{shouldForwardProp:e=>e!=="collapsed"})(({collapsed:e,theme:t})=>({paddingTop:e?"4px":"8px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:e?"0px":"2px",marginTop:"2px","&:hover, &:focus-within":{background:t.palette.action.hover}})),ne=f.styled("span")(({theme:e})=>({color:e.palette.divider})),he=f.styled(ne)(()=>({"&:hover":{cursor:"pointer"}})),ve=f.styled(f.IconButton)(({theme:e})=>({color:e.palette.divider,padding:"0px"}));function Y({textAlign:e="left",text:t=void 0,summary:a=void 0,children:r=void 0,collapsible:l=!1,collapsed:i=!1,collapsedChange:u=void 0}){const g=w.useLanguage(),n=w.useLocalizedStrings(),[d,C]=o.useState(i);o.useEffect(()=>C(i),[i]);const m=o.useCallback(p=>{u?u(p):C(p)},[u]);return s.jsxs(be,{collapsed:d,children:[t&&s.jsx(f.Divider,{textAlign:e,variant:"fullWidth",children:l?s.jsxs(f.Stack,{direction:"row",spacing:1,alignItems:"center",children:[s.jsxs(he,{onClick:()=>m(!d),children:[t.toLocaleUpperCase(g),d&&a?` (${a})`:""]}),s.jsx(f.Tooltip,{title:d?n==null?void 0:n.getString("TooltipExpandSection",t):n==null?void 0:n.getString("TooltipCollapseSection",t),children:s.jsx(ve,{onClick:()=>m(!d),children:d?s.jsx(H.LineArrowDownIcon,{}):s.jsx(H.LineArrowUpIcon,{})})})]}):s.jsx(ne,{children:t.toLocaleUpperCase(g)})}),!d&&r]})}function J({id:e,label:t,showLabel:a=!1,helperText:r="",options:l,value:i,onChange:u,disabled:g=!1,required:n=!1,margin:d="dense",size:C="small",fullWidth:m=!1,minWidth:p=void 0,prefixTextWithValue:h=!1}){const S=o.useCallback(v=>{typeof v.target.value=="string"?u(""):u(v.target.value)},[u]),L=o.useCallback(v=>v.map(c=>s.jsx(f.MenuItem,{"aria-label":`menu-item-${c.value}`,value:c.value,children:h?`${c.value} - ${c.displayText}`:c.displayText},c.value)),[h]),M=o.useCallback((v,c)=>{const y=[s.jsx(f.ListSubheader,{color:"primary",children:v},v)];return y.push(...L(c)),y},[L]),A=o.useCallback(v=>{const c=[];return v.forEach((y,F)=>{c.push(...M(F,y))}),c},[M]),j=o.useCallback(v=>{let c="";if(l instanceof Map)l.forEach((y,F)=>{if(c===""){const R=y.find($=>$.value===v);R&&(c=h?`${R.value} - ${F} - ${R.displayText}`:`${F} - ${R.displayText}`)}});else{const y=l.find(F=>F.value===v);y&&(c=h?`${y.value} - ${y.displayText}`:y.displayText)}return c===""&&(c=n?`${t} *`:t),c},[t,l,h,n]);return s.jsxs(f.FormControl,{fullWidth:m,variant:"standard",sx:{minWidth:p},margin:d,size:C,children:[a&&s.jsx(f.InputLabel,{id:`${e}-label`,children:n?`${t} *`:t}),s.jsxs(f.Select,{labelId:`${e}-label`,"aria-label":e,id:e,value:i,renderValue:j,onChange:S,displayEmpty:!a,disabled:g,"aria-disabled":g,children:[l instanceof Map&&A(l),l instanceof Array&&L(l)]}),r&&s.jsx(f.FormHelperText,{children:r})]})}const pe=f.styled(f.Box)(({height:e,width:t})=>({height:e,width:t,padding:"4px",overflow:"auto"}));function Ce({label:e,variant:t="h6"}){return s.jsx(f.Toolbar,{children:s.jsx(f.Typography,{sx:{flex:"1 1 100%"},variant:t,id:"tableTitle",component:"div",children:e})})}function me({data:e,dataKey:t,selectedKey:a=void 0,onClickRow:r=void 0,columns:l,label:i=void 0,labelVariant:u="h6",maxHeight:g=void 0,size:n="medium",stickyHeader:d=!1,hover:C=!1}){const m=o.useCallback(p=>{r&&r(p)},[r]);return s.jsxs(f.Box,{children:[i&&s.jsx(Ce,{label:i,variant:u}),s.jsx(f.TableContainer,{children:s.jsxs(f.Table,{"aria-labelledby":"tableTitle",size:n,stickyHeader:d,sx:{maxHeight:g},padding:"none",children:[s.jsx(f.TableHead,{children:s.jsx(f.TableRow,{children:l.map(p=>s.jsx(f.TableCell,{...p.headProps,children:p.headCell},p.key))})}),s.jsx(f.TableBody,{children:e.map(p=>{const h=t(p);return s.jsx(f.TableRow,{hover:C,selected:h===a,onClick:()=>m(p),children:l.map(S=>s.jsx(f.TableCell,{...S.dataProps,children:S.dataCell(p)},`${h}-${S.key}`))},h)})})]})})]})}const Se=f.styled("div")(({theme:e})=>({borderBottom:"1px solid",borderColor:e.palette.divider})),je=f.styled(f.ToggleButtonGroup)(({theme:e})=>({[`& .${f.toggleButtonGroupClasses.grouped}`]:{margin:e.spacing(.5),padding:e.spacing(1.25),minWidth:24,color:e.palette.action.active,border:0,borderRadius:e.shape.borderRadius,[`&.${f.toggleButtonGroupClasses.disabled}`]:{border:0}}})),Fe=f.styled(f.ButtonGroup)(({theme:e})=>({[`& .${f.buttonGroupClasses.grouped}`]:{margin:e.spacing(.5),padding:e.spacing(1.25),minWidth:24,color:e.palette.action.active,border:0,borderRadius:e.shape.borderRadius,[`&.${f.buttonGroupClasses.disabled}`]:{border:0}},[`& .${f.buttonGroupClasses.middleButton},& .${f.buttonGroupClasses.lastButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent"}}));function ae({onClick:e,icon:t=void 0,text:a=void 0,size:r="small",variant:l=void 0,color:i="inherit",tooltip:u=void 0,ariaLabel:g=void 0,children:n=void 0,disabled:d=!1}){return n?s.jsx(V,{size:typeof r=="string"?r:"small",variant:l,color:i,startIcon:t,text:a,disabled:d,children:n}):a?s.jsxs(X,{size:typeof r=="string"?r:"small",variant:l,color:i,"aria-label":g,onClick:e,startIcon:t,disabled:d,children:[u&&s.jsx(f.Tooltip,{placement:"bottom-start",title:u,children:s.jsx("span",{children:a})}),!u&&a]}):s.jsxs(X,{size:typeof r=="string"?r:"small",variant:l,color:i,"aria-label":g,onClick:e,disabled:d,sx:{height:typeof r=="number"?`${r}px`:void 0,width:typeof r=="number"?`${r}px`:void 0},children:[u&&s.jsx(f.Tooltip,{placement:"bottom-start",title:u,children:s.jsx("span",{children:t})}),!u&&t]})}function Ne({buttons:e,size:t="small",ariaLabel:a=void 0,orientation:r="horizontal"}){return s.jsx(Fe,{size:t,"aria-label":a,orientation:r,children:e.map((l,i)=>s.jsx(ae,{onClick:l.onClick,icon:l.icon,text:l.text,size:l.size,variant:l.variant,color:l.color,tooltip:l.tooltip,ariaLabel:l.ariaLabel,disabled:l.disabled,children:l.children},i))})}function Me({value:e,onChange:t,size:a="small",ariaLabel:r=void 0,exclusive:l=void 0,buttons:i,orientation:u="horizontal"}){return s.jsx(je,{size:a,value:e,onChange:(g,n)=>t(n),"aria-label":r,exclusive:l,orientation:u,children:i.map((g,n)=>s.jsxs(f.ToggleButton,{size:typeof a=="string"?a:"small",value:g.value,"aria-label":g.ariaLabel,sx:{height:typeof a=="number"?`${a}px`:void 0,width:typeof a=="number"?`${a}px`:void 0,padding:g.size==="small"||typeof a=="number"?1:void 0,margin:g.size==="small"||typeof a=="number"?0:void 0},disabled:g.disabled,children:[g.tooltip&&s.jsx(f.Tooltip,{placement:"bottom-start",title:g.tooltip,children:s.jsx("span",{children:g.icon})}),!g.tooltip&&g.icon]},n))})}function ke({items:e,height:t=34,width:a=34,justifyContent:r="left",borderSize:l=1,padding:i=1,backgroundColor:u=void 0,orientation:g="horizontal"}){return s.jsx(f.Paper,{elevation:0,sx:{display:"flex",alignItems:"center",justifyContent:r,border:n=>`${l}px solid ${n.palette.divider}`,flexWrap:"wrap",height:g==="horizontal"?`${t}px`:"100%",minHeight:g==="horizontal"?`${t}px`:void 0,width:g==="vertical"?`${a}px`:"100%",minWidth:g==="vertical"?`${a}px`:void 0,paddingLeft:g==="horizontal"?i:0,paddingRight:g==="horizontal"?i:0,paddingTop:g==="vertical"?i:0,paddingBottom:g==="vertical"?i:0,borderRadius:"0px",backgroundColor:u},children:e.map((n,d)=>n.label?s.jsx(f.Typography,{variant:n.label.variant,component:"div",children:n.label.text},d):n.toggleButtonGroup?s.jsx(Me,{value:n.toggleButtonGroup.value,onChange:n.toggleButtonGroup.onChange,ariaLabel:n.toggleButtonGroup.ariaLabel,exclusive:n.toggleButtonGroup.exclusive,buttons:n.toggleButtonGroup.buttons,orientation:g},d):n.button?s.jsx(ae,{onClick:n.button.onClick,icon:n.button.icon,text:n.button.text,variant:n.button.variant,color:n.button.color,tooltip:n.button.tooltip,ariaLabel:n.button.ariaLabel,disabled:n.button.disabled},d):n.buttonGroup?s.jsx(Ne,{ariaLabel:n.buttonGroup.ariaLabel,buttons:n.buttonGroup.buttons,orientation:g},d):n.other)})}function Ie({options:e,onSelect:t,children:a=void 0}){const[r,l]=o.useState(null),i=o.useCallback(n=>{e.length!==0&&(n.preventDefault(),l(r===null?{mouseX:n.clientX+2,mouseY:n.clientY-6}:null))},[r,e.length]),u=o.useCallback(()=>{l(null)},[]),g=o.useCallback(n=>{t(n),u()},[u,t]);return s.jsxs("div",{onContextMenu:i,style:{cursor:"context-menu"},children:[a,s.jsx(f.Menu,{open:r!==null,onClose:u,anchorReference:"anchorPosition",anchorPosition:r!==null?{top:r.mouseY,left:r.mouseX}:void 0,children:e.map(n=>s.jsxs(f.MenuItem,{onClick:()=>g(n.value),children:[n.icon&&s.jsx(f.ListItemIcon,{children:n.icon}),s.jsx(f.ListItemText,{children:n.displayText}),n.shortcut&&s.jsx(f.ListItemText,{sx:{pl:2,textAlign:"right"},children:n.shortcut})]},n.value))})]})}function re({canIdentifier:e,canIdentifierType:t,onCanIdentifierChange:a,onErrorsChange:r=void 0,hideSection:l=!1,disabled:i=!1,collapsible:u=!1,collapsed:g=!1,collapsedChange:n=void 0}){const d=w.useLocalizedStrings(),C=w.useNumericRadix(),[m,p]=o.useState(!1);o.useEffect(()=>{r&&r(m)},[m,r]);const[h,S]=o.useState(t);o.useEffect(()=>{S(t)},[t]);const L=o.useCallback(v=>{S(v?"extended":"standard")},[]),M=o.useCallback(v=>{let c=v,y=!1;if(c.length>2&&c.toLowerCase().startsWith("0x")&&(c=c.substring(2),y=!0),c=c.toUpperCase(),h==="extended"){const F=parseInt(c,y?16:C);if(Number.isNaN(F)||F<0||F>536870911)return a(v,h),{val:v,err:!0};c=`${F.toString(C).toUpperCase()}`}else if(h==="standard"){const F=parseInt(c,y?16:C);if(Number.isNaN(F)||F<0||F>2047)return a(v,h),{val:v,err:!0};c=`${F.toString(C).toUpperCase()}`}return a(c,h),{val:v,err:!1}},[h,C,a]),A=o.useCallback(v=>{if(v!==h){let c=!1,y=e;if(v==="standard"){const F=parseInt(y,C);(Number.isNaN(F)||F<0||F>2047)&&(c=!0)}else if(v==="extended"){const F=parseInt(y,C);(Number.isNaN(F)||F<0||F>536870911)&&(c=!0)}a(y,v),p(c)}},[h,e,a,C]),j=o.useMemo(()=>s.jsxs(z,{spacing:4,children:[s.jsx(W,{id:"constant-id",fullWidth:!0,value:e,onBlur:M,error:m,onErrorChange:p,disabled:i}),s.jsx(Z,{id:"id-type",label:d.getString("LabelUseExtendedIdentifier"),checked:h==="extended",onChange:v=>{L(v),A(v?"extended":"standard")},disabled:i})]}),[e,h,i,m,d,A,M]);return l?j:s.jsx(Y,{text:d.getString("LabelCanIdentifier"),summary:e,collapsible:u,collapsed:g,collapsedChange:n,children:j})}function ye({frame:e,onFrameChange:t,onErrorsChange:a=void 0,collapsible:r=!1,collapsed:l=!1,collapsedChange:i=void 0}){var C;const u=w.useNumericRadix(),g=o.useMemo(()=>{var m,p;return((p=(m=e.canFrameFlags)==null?void 0:m.flags)==null?void 0:p.includes(O.CanFrameFlag.CAN_FRAME_FLAG_EXT))===!0?"extended":"standard"},[(C=e.canFrameFlags)==null?void 0:C.flags]),n=o.useMemo(()=>`${(e.id??0).toString(u).toUpperCase()}`,[g,e.id,u]),d=o.useCallback((m,p)=>{var A;let h=e.id??0;h=parseInt(m,u);const S=(A=e.canFrameFlags)!=null&&A.flags?{flags:[...e.canFrameFlags.flags]}:{flags:[]},L=S.flags.indexOf(O.CanFrameFlag.CAN_FRAME_FLAG_STD);L!==-1&&S.flags.splice(L,1);const M=S.flags.indexOf(O.CanFrameFlag.CAN_FRAME_FLAG_EXT);if(M!==-1&&S.flags.splice(M,1),p==="extended"?S.flags.push(O.CanFrameFlag.CAN_FRAME_FLAG_EXT):p==="standard"&&S.flags.push(O.CanFrameFlag.CAN_FRAME_FLAG_STD),h!==e.id||!Q(S,e.canFrameFlags)){const j={...e};j.id=h,j.canFrameFlags=S,t(j)}},[e,u,t]);return s.jsx(re,{canIdentifier:n,canIdentifierType:g,onCanIdentifierChange:d,onErrorsChange:a,collapsible:r,collapsed:l,collapsedChange:i})}function se({canIdentifier:e,identifierGeneratorType:t,minCanIdentifier:a,maxCanIdentifier:r,canIdentifierType:l,onChange:i,onErrorsChange:u=void 0,canIdentifierGeneratorSettingsError:g=void 0,disabled:n=!1,collapsible:d=!1,collapsed:C=!1,collapsedChange:m=void 0}){const p=w.useLocalizedStrings(),h=w.useNumericRadix(),[S,L]=o.useState(!1),[M,A]=o.useState(!1),[j,v]=o.useState(!1),[c,y]=o.useState(l);o.useEffect(()=>{y(l)},[l]);const F=o.useCallback(k=>{y(k?"extended":"standard")},[]),R=o.useCallback(k=>{let I=k,B=!1;if(I.length>2&&I.toLowerCase().startsWith("0x")&&(I=I.substring(2),B=!0),I=I.toUpperCase(),c==="extended"){const b=parseInt(I,B?16:h);if(Number.isNaN(b)||b<0||b>536870911)return i(k,t,a,r,c),{val:k,err:!0};I=`${b.toString(h).toUpperCase()}`}else if(c==="standard"){const b=parseInt(I,B?16:h);if(Number.isNaN(b)||b<0||b>2047)return i(k,t,a,r,c),{val:k,err:!0};I=`${b.toString(h).toUpperCase()}`}return i(I,t,a,r,c),{val:k,err:!1}},[c,t,r,a,h,i]),$=o.useCallback((k,I,B)=>{let b=k,N=-1,x=!1;if(b.length>2&&b.toLowerCase().startsWith("0x")&&(b=b.substring(2),x=!0),b=b.toUpperCase(),I==="extended"){if(N=parseInt(b,x?16:h),Number.isNaN(N)||N<0||N>536870911)return B(k),{val:k,err:!0,id:N};b=`${N.toString(h).toUpperCase()}`}else if(I==="standard"){if(N=parseInt(b,x?16:h),Number.isNaN(N)||N<0||N>2047)return B(k),{val:k,err:!0,id:N};b=`${N.toString(h).toUpperCase()}`}return B(b),{val:b,err:!1,id:N}},[h]),_=o.useCallback(k=>{const I=$(k,c,b=>i(e,t,b,r,c)),B=$(r,c,()=>{});return!I.err&&!B.err&&(I.id>=B.id?(I.err=!0,A(!0)):A(!1)),{val:I.val,err:I.err}},[e,c,t,r,i,$]),D=o.useCallback(k=>{const I=$(k,c,b=>i(e,t,a,b,c)),B=$(a,c,()=>{});return!B.err&&!I.err&&(B.id>=I.id?(I.err=!0,v(!0)):v(!1)),{val:I.val,err:I.err}},[e,c,t,a,i,$]),P=o.useCallback(k=>{if(k!==c){let I=e;const B=$(a,k,()=>{}),b=$(r,k,()=>{});i(I,t,B.val,b.val,k)}},[c,e,$,a,r,i,t,h]),U=o.useCallback(k=>{let I=e;const B=$(a,c,()=>{}),b=$(r,c,()=>{});i(I,k,B.val,b.val,c)},[c,e,$,a,r,i,t,h]);return o.useEffect(()=>{u&&u(t==="constant"&&S||(t==="random"||t==="scan")&&(M||j)),g&&(g.current=t==="constant"&&S||(t==="random"||t==="scan")&&(M||j))},[S,g,t,j,M,u]),s.jsx(Y,{text:p.getString("LabelCanIdentifier"),summary:t==="constant"?e:t==="random"?`${p.getString("LabelRandom")} ${a}-${r}`:`${p.getString("LabelScan")} ${a}-${r}`,collapsible:d,collapsed:C,collapsedChange:m,children:s.jsxs(te,{id:"identifier-radio-group",value:t,onChange:k=>{U(k)},children:[s.jsxs(z,{spacing:4,children:[s.jsx(G,{id:"constant-id-radio",value:"constant",label:p.getString("LabelConstantIdentifier"),sx:{marginLeft:"-11px !important"},disabled:n}),s.jsx(W,{id:"constant-id",fullWidth:!0,value:e,error:S,onErrorChange:L,disabled:n||t!=="constant",required:t==="constant",onBlur:R}),s.jsx(Z,{id:"id-type",label:p.getString("LabelUseExtendedIdentifier"),checked:c==="extended",onChange:k=>{F(k),P(k?"extended":"standard")},disabled:n})]}),s.jsxs(z,{spacing:4,children:[s.jsx(G,{id:"random-identifier-radio",value:"random",label:p.getString("LabelRandomIdentifier"),sx:{marginLeft:"-11px !important"},disabled:n}),s.jsx(G,{id:"scan-identifier-radio",value:"scan",label:p.getString("LabelScanIdentifier"),disabled:n}),s.jsx(W,{id:"identifier-min",disabled:n||t!=="random"&&t!=="scan",required:t==="random"||t==="scan",fullWidth:!0,value:a??"",error:M,onErrorChange:A,startAdornment:p.getString("LabelFrom"),onBlur:_,sxStartAdornment:{marginBottom:.8}}),s.jsx(W,{id:"identifier-max",disabled:n||t!=="random"&&t!=="scan",required:t==="random"||t==="scan",fullWidth:!0,value:r??"",error:j,onErrorChange:v,startAdornment:p.getString("LabelTo"),onBlur:D,sxStartAdornment:{marginBottom:.8}})]})]})})}function Le({settings:e,onSettingsChange:t,onErrorsChange:a=void 0,canIdentifierGeneratorSettingsError:r=void 0,disabled:l=!1,collapsible:i=!1,collapsed:u=!1,collapsedChange:g=void 0}){var L,M,A;const n=w.useNumericRadix(),d=o.useMemo(()=>{var j,v,c;return((c=(v=(j=e.frame)==null?void 0:j.canFrameFlags)==null?void 0:v.flags)==null?void 0:c.includes(O.CanFrameFlag.CAN_FRAME_FLAG_EXT))===!0?"extended":"standard"},[(M=(L=e.frame)==null?void 0:L.canFrameFlags)==null?void 0:M.flags]),C=o.useMemo(()=>{var v;return`${(((v=e.frame)==null?void 0:v.id)??0).toString(n).toUpperCase()}`},[n,(A=e.frame)==null?void 0:A.id]),m=o.useMemo(()=>`${(e.identifierMin??0).toString(n).toUpperCase()}`,[n,e.identifierMin]),p=o.useMemo(()=>`${(e.identifierMax??0).toString(n).toUpperCase()}`,[n,e.identifierMax]),h=o.useMemo(()=>e.randomIdentifier===!0?"random":e.scanIdentifier===!0?"scan":"constant",[e.randomIdentifier,e.scanIdentifier]),S=o.useCallback((j,v,c,y,F)=>{var I,B,b,N;const R=F,$=parseInt(j,n),_=(B=(I=e.frame)==null?void 0:I.canFrameFlags)!=null&&B.flags?{flags:[...e.frame.canFrameFlags.flags]}:{flags:[]},D=_.flags.indexOf(O.CanFrameFlag.CAN_FRAME_FLAG_STD),P=parseInt(c,n),U=parseInt(y,n),k=_.flags.indexOf(O.CanFrameFlag.CAN_FRAME_FLAG_EXT);if(D!==-1&&_.flags.splice(D,1),k!==-1&&_.flags.splice(k,1),R==="extended"?_.flags.push(O.CanFrameFlag.CAN_FRAME_FLAG_EXT):R==="standard"&&_.flags.push(O.CanFrameFlag.CAN_FRAME_FLAG_STD),$!==((b=e.frame)==null?void 0:b.id)||!Q(_,(N=e.frame)==null?void 0:N.canFrameFlags)||v!==h||P!==e.identifierMin||U!==e.identifierMax){const x={...e};x.frame=e.frame?{...e.frame}:O.WriteFrame.fromPartial({id:0,canFrameFlags:{flags:[O.CanFrameFlag.CAN_FRAME_FLAG_STD]},data:Array.from({length:8},()=>0)}),x.frame.id=$,x.frame.canFrameFlags=_,v==="constant"?(x.randomIdentifier=!1,x.scanIdentifier=!1):v==="random"?(x.randomIdentifier=!0,x.scanIdentifier=!1):v==="scan"&&(x.randomIdentifier=!1,x.scanIdentifier=!0),x.identifierMin=P,x.identifierMax=U,t(x)}},[h,n,t,e]);return s.jsx(se,{canIdentifier:C,identifierGeneratorType:h,minCanIdentifier:m,maxCanIdentifier:p,canIdentifierType:d,onChange:S,onErrorsChange:a,canIdentifierGeneratorSettingsError:r,disabled:l,collapsible:i,collapsed:u,collapsedChange:g})}function Re(e,t,a,r){const[l,i]=o.useState(""),[u,g]=o.useState([]);return o.useEffect(()=>{g(n=>{var C;const d=(C=a==null?void 0:a.sources)==null?void 0:C.filter(m=>{var h,S;const p=(S=(h=r==null?void 0:r.find(L=>{var M;return L.nodeId===((M=m.baseNode)==null?void 0:M.identifier)}))==null?void 0:h.errorStatus)==null?void 0:S.errors;return p===void 0||p===""?m.baseNode&&m.channelSettings&&m.channelSettings.canConfiguration&&(!t||m.channelSettings.canConfiguration.silentMode!==!0):!1}).map(m=>({value:m.channelSettings.channelNumber,displayText:m.baseNode.name,canFdMode:m.channelSettings.canConfiguration.canMode>0,identifier:m.baseNode.identifier}));return!d||Q(n,d)?n:d})},[t,a==null?void 0:a.sources,r]),o.useEffect(()=>{const n=u.find(d=>d.identifier===e);i(n?d=>n.value===d?d:n.value:"")},[e,u]),{channelOptions:u,selectedChannelOption:l}}function Ae({channelIdentifier:e,onChannelIdentifierChange:t,hideSilentChannels:a=!1,hideSectionControl:r=!1,disabled:l=!1,collapsible:i=!1,collapsed:u=!1,collapsedChange:g=void 0}){var S;const n=w.useMeasurementSetup(),d=w.useMeasurementStatus(),C=w.useLocalizedStrings(),{channelOptions:m,selectedChannelOption:p}=Re(e,a===!0,n,d),h=o.useCallback(L=>{const M=m.find(v=>v.value===L),A=(M==null?void 0:M.identifier)??"",j=(M==null?void 0:M.canFdMode)===!0;t(A,j)},[m,t]);return r===!0?s.jsx(J,{id:"channel",label:C.getString("LabelChannel"),fullWidth:!0,value:p,onChange:h,options:m,required:!0,disabled:l}):s.jsx(Y,{text:C.getString("LabelChannel"),summary:p===""||(S=m.find(L=>L.value===p))==null?void 0:S.displayText,collapsible:i,collapsed:u,collapsedChange:g,children:s.jsx(J,{id:"channel",label:C.getString("LabelChannel"),fullWidth:!0,value:p,onChange:h,options:m,required:!0,disabled:l})})}const Ee=f.styled(f.Box)(()=>({height:"100%",width:"100%",padding:"4px",overflow:"auto"}));exports.CanKingDataProvider=w.CanKingDataProvider;exports.DevicesContext=w.DevicesContext;exports.LocalizedStrings=w.LocalizedStrings;exports.LogMessagesContext=w.LogMessagesContext;exports.MeasurementSetupContext=w.MeasurementSetupContext;exports.MeasurementStatusContext=w.MeasurementStatusContext;exports.OnlineStatusContext=w.OnlineStatusContext;exports.RunningPeriodicTransmissionsContext=w.RunningPeriodicTransmissionsContext;exports.UserSettingsContext=w.UserSettingsContext;exports.WorkspacePanesContext=w.WorkspacePanesContext;exports.addEventListener=w.addEventListener;exports.removeEventListener=w.removeEventListener;exports.CanChannelSelectControl=Ae;exports.CanIdentifierControl=re;exports.CanIdentifierFrameControl=ye;exports.CanIdentifierGeneratorControl=se;exports.CanIdentifierGeneratorSettingsControl=Le;exports.CheckboxControl=Z;exports.ContextMenu=Ie;exports.DropdownButton=V;exports.DropdownButtonTextItems=le;exports.DropdownPanel=ce;exports.FillBox=Ee;exports.FormControlRow=z;exports.InlineEditor=ge;exports.NumberRangeControl=xe;exports.OneLineButton=X;exports.RadioControl=G;exports.RadioGroupControl=te;exports.SectionControl=Y;exports.SelectControl=J;exports.SizedBox=pe;exports.TableControl=me;exports.TabsPanel=Se;exports.TextControl=ee;exports.ToolbarControl=ke;exports.ValidateableTextControl=W;