@adcops/autocore-react 3.0.39 → 3.1.1
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/additional-docs/AutoCoreTagContext.md +441 -0
- package/dist/assets/BlocklyLogo.d.ts +1 -0
- package/dist/assets/BlocklyLogo.d.ts.map +1 -0
- package/dist/assets/Distance.d.ts +1 -0
- package/dist/assets/Distance.d.ts.map +1 -0
- package/dist/assets/JogLong.d.ts +1 -0
- package/dist/assets/JogLong.d.ts.map +1 -0
- package/dist/assets/JogMedium.d.ts +1 -0
- package/dist/assets/JogMedium.d.ts.map +1 -0
- package/dist/assets/JogShort.d.ts +1 -0
- package/dist/assets/JogShort.d.ts.map +1 -0
- package/dist/assets/PythonLogo.d.ts +1 -0
- package/dist/assets/PythonLogo.d.ts.map +1 -0
- package/dist/assets/Rotation3D.d.ts +1 -0
- package/dist/assets/Rotation3D.d.ts.map +1 -0
- package/dist/assets/RotationCcw.d.ts +1 -0
- package/dist/assets/RotationCcw.d.ts.map +1 -0
- package/dist/assets/RotationCcwA.d.ts +1 -0
- package/dist/assets/RotationCcwA.d.ts.map +1 -0
- package/dist/assets/RotationCcwB.d.ts +1 -0
- package/dist/assets/RotationCcwB.d.ts.map +1 -0
- package/dist/assets/RotationCcwC.d.ts +1 -0
- package/dist/assets/RotationCcwC.d.ts.map +1 -0
- package/dist/assets/RotationCw.d.ts +1 -0
- package/dist/assets/RotationCw.d.ts.map +1 -0
- package/dist/assets/RotationCwA.d.ts +1 -0
- package/dist/assets/RotationCwA.d.ts.map +1 -0
- package/dist/assets/RotationCwB.d.ts +1 -0
- package/dist/assets/RotationCwB.d.ts.map +1 -0
- package/dist/assets/RotationCwC.d.ts +1 -0
- package/dist/assets/RotationCwC.d.ts.map +1 -0
- package/dist/assets/Run.d.ts +1 -0
- package/dist/assets/Run.d.ts.map +1 -0
- package/dist/assets/Speed.d.ts +1 -0
- package/dist/assets/Speed.d.ts.map +1 -0
- package/dist/assets/SpeedFast.d.ts +1 -0
- package/dist/assets/SpeedFast.d.ts.map +1 -0
- package/dist/assets/SpeedMedium.d.ts +1 -0
- package/dist/assets/SpeedMedium.d.ts.map +1 -0
- package/dist/assets/SpeedNone.d.ts +1 -0
- package/dist/assets/SpeedNone.d.ts.map +1 -0
- package/dist/assets/SpeedSlow.d.ts +1 -0
- package/dist/assets/SpeedSlow.d.ts.map +1 -0
- package/dist/assets/Walk.d.ts +1 -0
- package/dist/assets/Walk.d.ts.map +1 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/components/AutoCoreDevPanel.d.ts +144 -0
- package/dist/components/AutoCoreDevPanel.d.ts.map +1 -0
- package/dist/components/AutoCoreDevPanel.js +1 -0
- package/dist/components/BlocklyEditor.d.ts +1 -0
- package/dist/components/BlocklyEditor.d.ts.map +1 -0
- package/dist/components/BlocklyEditor.js +1 -1
- package/dist/components/CodeEditor.d.ts +2 -1
- package/dist/components/CodeEditor.d.ts.map +1 -0
- package/dist/components/CodeEditor.js +1 -1
- package/dist/components/FileList.d.ts +1 -0
- package/dist/components/FileList.d.ts.map +1 -0
- package/dist/components/FileList.js +1 -1
- package/dist/components/FileSelect.d.ts +1 -0
- package/dist/components/FileSelect.d.ts.map +1 -0
- package/dist/components/FileSelect.js +1 -1
- package/dist/components/FitText.d.ts +1 -0
- package/dist/components/FitText.d.ts.map +1 -0
- package/dist/components/FitText.js +1 -1
- package/dist/components/Indicator.d.ts +2 -1
- package/dist/components/Indicator.d.ts.map +1 -0
- package/dist/components/Indicator.js +1 -1
- package/dist/components/IndicatorButton.d.ts +23 -137
- package/dist/components/IndicatorButton.d.ts.map +1 -0
- package/dist/components/IndicatorButton.js +1 -1
- package/dist/components/IndicatorRect.d.ts +2 -1
- package/dist/components/IndicatorRect.d.ts.map +1 -0
- package/dist/components/JogPanel.d.ts +1 -0
- package/dist/components/JogPanel.d.ts.map +1 -0
- package/dist/components/Lamp.d.ts +2 -1
- package/dist/components/Lamp.d.ts.map +1 -0
- package/dist/components/Lamp.js +1 -1
- package/dist/components/Osk.d.ts +1 -0
- package/dist/components/Osk.d.ts.map +1 -0
- package/dist/components/Osk.js +1 -1
- package/dist/components/OskDialog.d.ts +1 -0
- package/dist/components/OskDialog.d.ts.map +1 -0
- package/dist/components/ProgressBarWithValue.d.ts +1 -0
- package/dist/components/ProgressBarWithValue.d.ts.map +1 -0
- package/dist/components/ProgressBarWithValue.js +1 -1
- package/dist/components/TextInput.d.ts +62 -103
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput.js +1 -1
- package/dist/components/ToggleGroup.d.ts +2 -1
- package/dist/components/ToggleGroup.d.ts.map +1 -0
- package/dist/components/ToggleGroup.js +1 -1
- package/dist/components/ValueDisplay.d.ts +3 -2
- package/dist/components/ValueDisplay.d.ts.map +1 -0
- package/dist/components/ValueDisplay.js +1 -1
- package/dist/components/ValueIndicator.d.ts +2 -1
- package/dist/components/ValueIndicator.d.ts.map +1 -0
- package/dist/components/ValueIndicator.js +1 -1
- package/dist/components/ValueInput.d.ts +2 -1
- package/dist/components/ValueInput.d.ts.map +1 -0
- package/dist/components/ValueInput.js +1 -1
- package/dist/core/ActionMode.d.ts +1 -0
- package/dist/core/ActionMode.d.ts.map +1 -0
- package/dist/core/AutoCoreTagContext.d.ts +224 -0
- package/dist/core/AutoCoreTagContext.d.ts.map +1 -0
- package/dist/core/AutoCoreTagContext.js +1 -0
- package/dist/core/AutoCoreTagTypes.d.ts +162 -0
- package/dist/core/AutoCoreTagTypes.d.ts.map +1 -0
- package/dist/core/AutoCoreTagTypes.js +1 -0
- package/dist/core/EventEmitterContext.d.ts +295 -2
- package/dist/core/EventEmitterContext.d.ts.map +1 -0
- package/dist/core/EventEmitterContext.js +1 -1
- package/dist/core/IndicatorButtonState.d.ts +1 -0
- package/dist/core/IndicatorButtonState.d.ts.map +1 -0
- package/dist/core/IndicatorColor.d.ts +1 -0
- package/dist/core/IndicatorColor.d.ts.map +1 -0
- package/dist/core/MaskPatterns.d.ts +1 -0
- package/dist/core/MaskPatterns.d.ts.map +1 -0
- package/dist/core/NumerableTypes.d.ts +1 -0
- package/dist/core/NumerableTypes.d.ts.map +1 -0
- package/dist/core/NumerableTypes.js +1 -1
- package/dist/core/PositionContext.d.ts +1 -1
- package/dist/core/PositionContext.d.ts.map +1 -0
- package/dist/core/UniqueId.d.ts +1 -0
- package/dist/core/UniqueId.d.ts.map +1 -0
- package/dist/core/ValueSimulator.d.ts +2 -1
- package/dist/core/ValueSimulator.d.ts.map +1 -0
- package/dist/core/ValueSimulator.js +1 -1
- package/dist/core/hoc.d.ts +1 -0
- package/dist/core/hoc.d.ts.map +1 -0
- package/dist/core/hoc.js +1 -1
- package/dist/hooks/adsHooks.d.ts +1 -0
- package/dist/hooks/adsHooks.d.ts.map +1 -0
- package/dist/hooks/adsHooks.js +1 -1
- package/dist/hooks/commandHooks.d.ts +1 -0
- package/dist/hooks/commandHooks.d.ts.map +1 -0
- package/dist/hooks/commandHooks.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useAutoCoreTag.d.ts +26 -0
- package/dist/hooks/useAutoCoreTag.d.ts.map +1 -0
- package/dist/hooks/useAutoCoreTag.js +1 -0
- package/dist/hooks/useScaledValue.d.ts +1 -0
- package/dist/hooks/useScaledValue.d.ts.map +1 -0
- package/dist/hooks/useScaledValue.js +1 -1
- package/dist/hub/CommandMessage.d.ts +1 -0
- package/dist/hub/CommandMessage.d.ts.map +1 -0
- package/dist/hub/HubBase.d.ts +3 -2
- package/dist/hub/HubBase.d.ts.map +1 -0
- package/dist/hub/HubSimulate.d.ts +2 -1
- package/dist/hub/HubSimulate.d.ts.map +1 -0
- package/dist/hub/HubSimulate.js +1 -1
- package/dist/hub/HubTauri.d.ts +2 -1
- package/dist/hub/HubTauri.d.ts.map +1 -0
- package/dist/hub/HubTauri.js +1 -1
- package/dist/hub/HubWebSocket.d.ts +2 -1
- package/dist/hub/HubWebSocket.d.ts.map +1 -0
- package/dist/hub/HubWebSocket.js +1 -1
- package/dist/hub/index.d.ts +2 -1
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +134 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/components_CodeEditor.CodeEditor.html +108 -101
- package/docs/classes/components_Indicator.Indicator.html +122 -0
- package/docs/classes/components_IndicatorRect.IndicatorRect.html +121 -0
- package/docs/classes/components_JogPanel.JogPanel.html +104 -106
- package/docs/classes/components_Lamp.Lamp.html +96 -79
- package/docs/classes/components_OskDialog.OskDialog.html +125 -0
- package/docs/classes/components_TextInput.TextInput.html +99 -89
- package/docs/classes/components_ValueDisplay.ValueDisplay.html +148 -0
- package/docs/classes/components_ValueIndicator.ValueIndicator.html +98 -91
- package/docs/classes/core_ValueSimulator.ValueSimulator.html +51 -0
- package/docs/classes/hub_HubBase.HubBase.html +106 -0
- package/docs/classes/hub_HubSimulate.HubSimulate.html +75 -0
- package/docs/classes/hub_HubTauri.HubTauri.html +93 -0
- package/docs/classes/hub_HubWebSocket.HubWebSocket.html +75 -69
- package/docs/documents/core_AutoCoreTagContext.AutoCoreTagContext.html +148 -0
- package/docs/enums/components_JogPanel.JogDistanceAction.html +5 -5
- package/docs/enums/components_JogPanel.JogPanelAction.html +18 -18
- package/docs/enums/components_JogPanel.JogSpeedAction.html +5 -5
- package/docs/enums/core_ActionMode.ActionMode.html +6 -6
- package/docs/enums/core_IndicatorColor.IndicatorColor.html +22 -22
- package/docs/functions/assets.BlocklyLogo.html +1 -0
- package/docs/functions/assets.Distance.html +1 -0
- package/docs/functions/assets.JogLong.html +1 -0
- package/docs/functions/assets.JogMedium.html +1 -0
- package/docs/functions/assets.JogShort.html +1 -0
- package/docs/functions/assets.PythonLogo.html +1 -0
- package/docs/functions/assets.Rotation3D.html +1 -0
- package/docs/functions/assets.RotationCcw.html +1 -0
- package/docs/functions/assets.RotationCcwA.html +1 -0
- package/docs/functions/assets.RotationCcwB.html +1 -0
- package/docs/functions/assets.RotationCcwC.html +1 -0
- package/docs/functions/assets.RotationCw.html +1 -0
- package/docs/functions/assets.RotationCwA.html +1 -0
- package/docs/functions/assets.RotationCwB.html +1 -0
- package/docs/functions/assets.RotationCwC.html +1 -0
- package/docs/functions/assets.Run.html +1 -0
- package/docs/functions/assets.Speed.html +1 -0
- package/docs/functions/assets.SpeedFast.html +1 -0
- package/docs/functions/assets.SpeedMedium.html +1 -0
- package/docs/functions/assets.SpeedNone.html +1 -0
- package/docs/functions/assets.SpeedSlow.html +1 -0
- package/docs/functions/assets.Walk.html +1 -0
- package/docs/functions/components_BlocklyEditor.createCustomToolbox.html +5 -5
- package/docs/functions/core_UniqueId.UniqueId.html +9 -0
- package/docs/functions/core_hoc.hocAddSubscription.html +6 -0
- package/docs/functions/hooks_adsHooks.useAdsRegisterSymbols.html +16 -0
- package/docs/functions/hooks_adsHooks.useAdsTapValue.html +8 -0
- package/docs/functions/hooks_adsHooks.useAdsWriteScaledValue.html +18 -0
- package/docs/functions/hooks_adsHooks.useAdsWriteValue.html +9 -0
- package/docs/functions/hooks_commandHooks.useRegisterSymbols.html +16 -0
- package/docs/functions/hooks_commandHooks.useTapValue.html +10 -0
- package/docs/functions/hooks_commandHooks.useWriteScaledValue.html +18 -0
- package/docs/functions/hooks_commandHooks.useWriteValue.html +11 -0
- package/docs/functions/hooks_useAutoCoreTag.ts.makeAutoCoreTagHooks.html +12 -0
- package/docs/functions/hooks_useScaledValue.useScaledValue.html +18 -0
- package/docs/functions/hub.createHub.html +3 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +148 -0
- package/docs/interfaces/components_IndicatorButton.IndicatorButtonProps.html +654 -0
- package/docs/interfaces/components_IndicatorRect.IndicatorRectProps.html +37 -0
- package/docs/interfaces/components_JogPanel.JogPanelButtonDefinition.html +5 -5
- package/docs/interfaces/components_ToggleGroup.ToggleGroupProps.html +545 -519
- package/docs/interfaces/core_AutoCoreTagTypes.BaseContextValue.html +12 -0
- package/docs/interfaces/core_AutoCoreTagTypes.ScaleConfig.html +13 -0
- package/docs/interfaces/core_EventEmitterContext.Action.html +8 -0
- package/docs/interfaces/core_EventEmitterContext.EventEmitterContextType.html +33 -0
- package/docs/interfaces/core_EventEmitterContext.State.html +8 -0
- package/docs/interfaces/core_EventEmitterContext.Subscription.html +6 -0
- package/docs/interfaces/core_IndicatorButtonState.IndicatorButtonState.html +10 -10
- package/docs/interfaces/core_PositionContext.IPositionContext.html +17 -0
- package/docs/interfaces/hub_CommandMessage.CommandMessage.html +6 -6
- package/docs/interfaces/hub_CommandMessage.CommandMessageResult.html +4 -4
- package/docs/modules/assets.html +1 -23
- package/docs/modules/assets_BlocklyLogo.html +1 -2
- package/docs/modules/assets_Distance.html +1 -2
- package/docs/modules/assets_JogLong.html +1 -2
- package/docs/modules/assets_JogMedium.html +1 -2
- package/docs/modules/assets_JogShort.html +1 -2
- package/docs/modules/assets_PythonLogo.html +1 -2
- package/docs/modules/assets_Rotation3D.html +1 -2
- package/docs/modules/assets_RotationCcw.html +1 -2
- package/docs/modules/assets_RotationCcwA.html +1 -2
- package/docs/modules/assets_RotationCcwB.html +1 -2
- package/docs/modules/assets_RotationCcwC.html +1 -2
- package/docs/modules/assets_RotationCw.html +1 -2
- package/docs/modules/assets_RotationCwA.html +1 -2
- package/docs/modules/assets_RotationCwB.html +1 -2
- package/docs/modules/assets_RotationCwC.html +1 -2
- package/docs/modules/assets_Run.html +1 -2
- package/docs/modules/assets_Speed.html +1 -2
- package/docs/modules/assets_SpeedFast.html +1 -2
- package/docs/modules/assets_SpeedMedium.html +1 -2
- package/docs/modules/assets_SpeedNone.html +1 -2
- package/docs/modules/assets_SpeedSlow.html +1 -2
- package/docs/modules/assets_Walk.html +1 -2
- package/docs/modules/components_AutoCoreDevPanel.html +20 -0
- package/docs/modules/components_BlocklyEditor.html +1 -5
- package/docs/modules/components_CodeEditor.html +1 -3
- package/docs/modules/components_FileList.html +1 -3
- package/docs/modules/components_FileSelect.html +1 -0
- package/docs/modules/components_FitText.html +1 -3
- package/docs/modules/components_Indicator.html +1 -0
- package/docs/modules/components_IndicatorButton.html +1 -0
- package/docs/modules/components_IndicatorRect.html +1 -0
- package/docs/modules/components_JogPanel.html +1 -9
- package/docs/modules/components_Lamp.html +1 -4
- package/docs/modules/components_Osk.html +1 -0
- package/docs/modules/components_OskDialog.html +1 -0
- package/docs/modules/components_ProgressBarWithValue.html +1 -0
- package/docs/modules/components_TextInput.html +1 -2
- package/docs/modules/components_ToggleGroup.html +1 -6
- package/docs/modules/components_ValueDisplay.html +1 -0
- package/docs/modules/components_ValueIndicator.html +1 -4
- package/docs/modules/components_ValueInput.html +1 -2
- package/docs/modules/core_ActionMode.html +1 -2
- package/docs/modules/core_AutoCoreTagContext.html +11 -0
- package/docs/modules/core_AutoCoreTagTypes.html +1 -0
- package/docs/modules/core_EventEmitterContext.html +53 -0
- package/docs/modules/core_IndicatorButtonState.html +1 -2
- package/docs/modules/core_IndicatorColor.html +1 -2
- package/docs/modules/core_MaskPatterns.html +1 -0
- package/docs/modules/core_NumerableTypes.html +1 -0
- package/docs/modules/core_PositionContext.html +1 -0
- package/docs/modules/core_UniqueId.html +1 -0
- package/docs/modules/core_ValueSimulator.html +1 -0
- package/docs/modules/core_hoc.html +1 -0
- package/docs/modules/hooks.html +1 -0
- package/docs/modules/hooks_adsHooks.html +1 -0
- package/docs/modules/hooks_commandHooks.html +1 -0
- package/docs/modules/hooks_useAutoCoreTag.ts.html +52 -0
- package/docs/modules/hooks_useScaledValue.html +1 -0
- package/docs/modules/hub.html +1 -0
- package/docs/modules/hub_CommandMessage.html +1 -3
- package/docs/modules/hub_HubBase.html +1 -0
- package/docs/modules/hub_HubSimulate.html +1 -0
- package/docs/modules/hub_HubTauri.html +1 -0
- package/docs/modules/hub_HubWebSocket.html +1 -2
- package/docs/modules.html +23 -0
- package/docs/types/components_IndicatorButton.IndicatorButtonOptionsType.html +1 -1
- package/docs/types/core_AutoCoreTagTypes.ExtractByTag.html +2 -0
- package/docs/types/core_AutoCoreTagTypes.PrimitiveKind.html +1 -0
- package/docs/types/core_AutoCoreTagTypes.TagConfig.html +16 -0
- package/docs/types/core_AutoCoreTagTypes.TagValueMap.html +1 -0
- package/docs/types/core_AutoCoreTagTypes.TagValueOf.html +1 -0
- package/docs/types/core_EventEmitterContext.EmitterDispatchFunction.html +3 -0
- package/docs/types/core_EventEmitterContext.EmitterSubscribeFunction.html +3 -0
- package/docs/types/core_EventEmitterContext.EmitterUnsubscribeFunction.html +3 -0
- package/docs/types/core_NumerableTypes.NumerableFormatOptions.html +4 -0
- package/docs/types/core_hoc.HocAddSubscriptionProps.html +6 -0
- package/docs/variables/components_AutoCoreDevPanel.AutoCoreDevPanel.html +43 -0
- package/docs/variables/components_BlocklyEditor.BlocklyEditor.html +13 -0
- package/docs/variables/components_BlocklyEditor.StandardToolbox.html +1 -1
- package/docs/variables/components_FileList.FileList.html +23 -0
- package/docs/variables/components_FileSelect.FileSelect.html +1 -0
- package/docs/variables/components_FitText.FitText.html +4 -0
- package/docs/variables/components_IndicatorButton.IndicatorButton.html +1 -0
- package/docs/variables/components_JogPanel.DefaultLinearJogButtons.html +2 -2
- package/docs/variables/components_JogPanel.DefaultRotationJogButtons.html +2 -2
- package/docs/variables/components_Osk.Osk.html +1 -0
- package/docs/variables/components_ProgressBarWithValue.ProgressBarWithValue.html +1 -0
- package/docs/variables/components_ToggleGroup.ToggleGroup.html +1 -0
- package/docs/variables/components_ValueInput.ValueInput.html +4 -0
- package/docs/variables/core_AutoCoreTagContext.AutoCoreTagContext.html +1 -0
- package/docs/variables/core_AutoCoreTagContext.AutoCoreTagProvider.html +7 -0
- package/docs/variables/core_EventEmitterContext.EventEmitterContext.html +64 -0
- package/docs/variables/core_EventEmitterContext.EventEmitterProvider.html +10 -0
- package/docs/variables/core_MaskPatterns.PrimeReactMaskPatterns.html +14 -0
- package/docs/variables/core_MaskPatterns.RegExMaskPatterns.html +15 -0
- package/docs/variables/core_PositionContext.DimensionsContext.html +6 -0
- package/docs/variables/hooks_useScaledValue.kMillimeters2Inches.html +2 -0
- package/docs/variables/hooks_useScaledValue.kNewtons2Pounds.html +2 -0
- package/package.json +32 -27
- package/readme.md +193 -22
- package/src/components/AutoCoreDevPanel.tsx +411 -0
- package/src/components/CodeEditor.tsx +2 -2
- package/src/components/FileList.tsx +2 -2
- package/src/components/Indicator.tsx +2 -2
- package/src/components/IndicatorButton.tsx +187 -333
- package/src/components/IndicatorRect.tsx +2 -2
- package/src/components/Lamp.tsx +3 -3
- package/src/components/TextInput.tsx +159 -240
- package/src/components/ToggleGroup.tsx +3 -3
- package/src/components/ValueDisplay.tsx +4 -4
- package/src/components/ValueIndicator.tsx +2 -2
- package/src/components/ValueInput.tsx +2 -2
- package/src/core/AutoCoreTagContext.tsx +698 -0
- package/src/core/AutoCoreTagTypes.ts +202 -0
- package/src/core/EventEmitterContext.tsx +582 -225
- package/src/core/ValueSimulator.ts +2 -2
- package/src/hooks/useAutoCoreTag.ts +103 -0
- package/src/hub/HubBase.ts +3 -3
- package/src/hub/HubSimulate.ts +2 -2
- package/src/hub/HubTauri.ts +3 -3
- package/src/hub/HubWebSocket.ts +29 -32
- package/src/hub/index.ts +2 -2
- package/tsconfig.json +43 -28
- package/docs/classes/components_BlocklyEditor.BlocklyEditor.html +0 -124
- package/docs/classes/components_ValueInput.ValueInput.html +0 -113
- package/docs/functions/assets_BlocklyLogo.default.html +0 -1
- package/docs/functions/assets_Distance.default.html +0 -1
- package/docs/functions/assets_JogLong.default.html +0 -1
- package/docs/functions/assets_JogMedium.default.html +0 -1
- package/docs/functions/assets_JogShort.default.html +0 -1
- package/docs/functions/assets_PythonLogo.default.html +0 -1
- package/docs/functions/assets_Rotation3D.default.html +0 -1
- package/docs/functions/assets_RotationCcw.default.html +0 -1
- package/docs/functions/assets_RotationCcwA.default.html +0 -1
- package/docs/functions/assets_RotationCcwB.default.html +0 -1
- package/docs/functions/assets_RotationCcwC.default.html +0 -1
- package/docs/functions/assets_RotationCw.default.html +0 -1
- package/docs/functions/assets_RotationCwA.default.html +0 -1
- package/docs/functions/assets_RotationCwB.default.html +0 -1
- package/docs/functions/assets_RotationCwC.default.html +0 -1
- package/docs/functions/assets_Run.default.html +0 -1
- package/docs/functions/assets_Speed.default.html +0 -1
- package/docs/functions/assets_SpeedFast.default.html +0 -1
- package/docs/functions/assets_SpeedMedium.default.html +0 -1
- package/docs/functions/assets_SpeedNone.default.html +0 -1
- package/docs/functions/assets_SpeedSlow.default.html +0 -1
- package/docs/functions/assets_Walk.default.html +0 -1
- package/docs/functions/components_FileList.FileList.html +0 -21
- package/docs/functions/components_FitText.FitText.html +0 -8
- package/docs/functions/components_ToggleGroup.ToggleGroup.html +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndicatorButton.d.ts","sourceRoot":"","sources":["../../src/components/IndicatorButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAK7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,MAAM,CAAC,OAAO,MAAM,0BAA0B,GAC1C,MAAM,EAAE,GACR,SAAS,EAAE,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IACtE,2GAA2G;IAC3G,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAElC,mDAAmD;IACnD,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,0BAA0B,CAAC;IAErC,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,GAAG,CAAC;IAElB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAKD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiJ1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import React,{useCallback,useContext,useEffect,useState}from"react";import{Button}from"primereact/button";import{EventEmitterContext}from"../core/EventEmitterContext";import{IndicatorColor}from"../core/IndicatorColor";export{IndicatorColor};import{ActionMode}from"../core/ActionMode";export{ActionMode};const toPrimeIcon=o=>o?o.includes("pi ")?o:`pi ${o}`:void 0;export const IndicatorButton=({topic:o,value:t,onColor:e=IndicatorColor.IndicatorGreen,offColor:n="gray",options:r,icon:i,onIcon:c,offIcon:a,command:s,commandTopic:l,commandArgs:d,actionMode:u,invert:m,className:f,label:p,style:C,disabled:b,hidden:I,...x})=>{const{subscribe:g,unsubscribe:v,dispatch:h}=useContext(EventEmitterContext),[M,E]=useState(void 0),[y,A]=useState(!1);useEffect(()=>{if(!o||!g)return;const t=g(o,o=>E(o));return()=>{try{v&&void 0!==t&&v(t)}catch{}}},[o,g,v]);const S=void 0!==t?t:M,k=(()=>{if(!r||0===r.length)return p;if(r.length>2){if("number"==typeof S){const o=Math.trunc(S);if(o>=0&&o<r.length&&null!=r[o])return String(r[o])}else if("string"==typeof S){const o=r.findIndex(o=>o===S);if(o>=0)return String(r[o])}return p}const o=S?r[1]:r[0];return null!=o&&String(o).length>0?String(o):p})(),T=toPrimeIcon((S?c:a)??i);let j=S?e:n;void 0===S&&(j=IndicatorColor.IndicatorInvalid);const B=useCallback(o=>{if(!s||!h)return;const t={topic:l,value:m?!o:o,...d??{}};h({topic:s,payload:t})},[s,h,m,d,l]),P=useCallback(()=>{y||(A(!0),u!==ActionMode.Tap&&u!==ActionMode.Pressed||B(!0))},[y,u,B]),w=useCallback(()=>{y&&(A(!1),u===ActionMode.Tap?B(!1):u===ActionMode.Released&&B(!0))},[y,u,B]),N={color:"white",backgroundColor:j,display:I?"none":"block",...C??{}};return _jsx(Button,{...x,label:k,icon:T,className:f,style:N,disabled:!!b,onMouseDown:P,onTouchStart:P,onMouseUp:w,onTouchEnd:w})};export default IndicatorButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { EventEmitterContextType } from '../core/EventEmitterContext';
|
|
2
|
+
import { type EventEmitterContextType } from '../core/EventEmitterContext';
|
|
3
3
|
import { IndicatorColor } from "../core/IndicatorColor";
|
|
4
4
|
export { IndicatorColor };
|
|
5
5
|
/**
|
|
@@ -85,3 +85,4 @@ export declare class IndicatorRect extends Component<IndicatorRectProps, Indicat
|
|
|
85
85
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
86
86
|
}
|
|
87
87
|
export default IndicatorRect;
|
|
88
|
+
//# sourceMappingURL=IndicatorRect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndicatorRect.d.ts","sourceRoot":"","sources":["../../src/components/IndicatorRect.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,kBAAkB;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAE/B;AAED,UAAU,kBAAkB;IACxB,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5C;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChF,MAAM,CAAC,WAAW,mDAAuB;IAGzC,MAAM,CAAC,YAAY;;;MAGjB;gBAEU,KAAK,EAAE,kBAAkB;IAOrC,iBAAiB;IAIjB,oBAAoB;IAIpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAEvB;IAEF,MAAM;CAuCT;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JogPanel.d.ts","sourceRoot":"","sources":["../../src/components/JogPanel.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,gBAAgB,CAAC;AAQxB;;GAEG;AACH,oBAAY,cAAc;IACtB,mCAAmC;IACnC,OAAO,IAAO;IAEd,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,KAAO;IAEhB,SAAS,KAAO;IAEhB,SAAS,KAAO;IAEhB,2BAA2B;IAC3B,IAAI,MAAO;CACd;AAGD;;GAEG;AACH,oBAAY,iBAAiB;IACzB,KAAK,IAAO;IACZ,MAAM,KAAO;IACb,IAAI,KAAO;CACd;AAED;;GAEG;AACH,oBAAY,cAAc;IACtB,IAAI,IAAO;IACX,MAAM,KAAO;IACb,IAAI,KAAO;CACd;AAGD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,cAAc,CAAA;CACzB;AAkBD;;GAEG;AACH,UAAU,aAAa;IACnB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC3D,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACrD,iBAAiB,EAAE,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IAC1E,kBAAkB,EAAG,iBAAiB,CAAC;IACvC,eAAe,EAAG,cAAc,CAAC;IACjC,mBAAmB,EAAG,OAAO,CAAC;IAC9B,gBAAgB,EAAG,OAAO,CAAC;CAC9B;AAGD,UAAU,aAAa;IACnB,WAAW,EAAG,iBAAiB,CAAC;IAChC,QAAQ,EAAG,cAAc,CAAA;CAC5B;AAGD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,EAI9E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,EAIhF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEvE,MAAM,CAAC,YAAY,EAAG,aAAa,CAQjC;IAGF,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,aAAa,CAInB;gBAGU,KAAK,EAAE,aAAa;IAUhC;;;OAGG;IACH,OAAO,CAAC,aAAa;IAWrB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,kBAAkB;IAQ1B,QAAQ;IAQR,OAAO,CAAC,YAAY;IAiDpB,cAAc,CAAC,GAAG,EAAG,MAAM,EAAE,GAAG,EAAG,MAAM;IAmCzC,MAAM;CAiIT;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { EventEmitterContextType } from '../core/EventEmitterContext';
|
|
2
|
+
import { type EventEmitterContextType } from '../core/EventEmitterContext';
|
|
3
3
|
import { IndicatorColor } from "../core/IndicatorColor";
|
|
4
4
|
export { IndicatorColor };
|
|
5
5
|
interface LampProps {
|
|
@@ -79,3 +79,4 @@ export declare class Lamp extends Component<LampProps, LampState> {
|
|
|
79
79
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
80
80
|
}
|
|
81
81
|
export default Lamp;
|
|
82
|
+
//# sourceMappingURL=Lamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lamp.d.ts","sourceRoot":"","sources":["../../src/components/Lamp.tsx"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEhG,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,CAAA;AAKvB,UAAU,SAAS;IACf;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,UAAU,SAAS;IACf,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,qBAAa,IAAK,SAAQ,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrD,MAAM,CAAC,WAAW,yCAAuB;IACzC,SAAS,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGnD,MAAM,CAAC,YAAY;;;;;;;MAOjB;gBAEU,KAAK,EAAE,SAAS;IAQ5B,iBAAiB;IAUjB,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAMvC,oBAAoB;IAQpB,MAAM;CA6CT;AAED,eAAe,IAAI,CAAC"}
|
package/dist/components/Lamp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{Component}from"react";import clsx from"clsx";import{EventEmitterContext}from"../core/EventEmitterContext";import{IndicatorColor}from"../core/IndicatorColor";export{IndicatorColor};export class Lamp extends Component{constructor(e){super(e),Object.defineProperty(this,"unsubscribeTopicId",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.state={subscribedValue:e.value,fontSize:"100%"}}componentDidMount(){const{topic:e}=this.props;if(e&&null===this.unsubscribeTopicId){const{subscribe:t}=this.context;this.unsubscribeTopicId=t(e,
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import React,{Component}from"react";import clsx from"clsx";import{EventEmitterContext}from"../core/EventEmitterContext";import{IndicatorColor}from"../core/IndicatorColor";export{IndicatorColor};export class Lamp extends Component{constructor(e){super(e),Object.defineProperty(this,"unsubscribeTopicId",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.state={subscribedValue:e.value,fontSize:"100%"}}componentDidMount(){const{topic:e}=this.props;if(e&&null===this.unsubscribeTopicId){const{subscribe:t}=this.context;this.unsubscribeTopicId=t(e,e=>{this.setState({subscribedValue:e})})}}componentDidUpdate(e){e.value!==this.props.value&&this.setState({subscribedValue:this.props.value})}componentWillUnmount(){if(null!==this.unsubscribeTopicId){const{unsubscribe:e}=this.context;e(this.unsubscribeTopicId),this.unsubscribeTopicId=null}}render(){const{x:e,y:t,width:o,height:i,className:s,onColor:r,offColor:n,invalidColor:l,useAbsolutePositioning:c}=this.props,{scale:a,xOffset:u,yOffset:p}=this.context,{subscribedValue:b}=this.state;let d=o||10;d<10&&(d=10);let m=i||10;m<10&&(m=10);let h,f=a||1;switch(0===f&&(f=1),b){case!0:h=r;break;case!1:h=n;break;default:h=l}const x={position:c?"absolute":"relative",display:c?"":"inline-block",verticalAlign:"middle",top:c&&t?`${p+f*t}px`:void 0,left:c&&e?`${u+f*e}px`:void 0,width:d?d*f+"px":void 0,height:m?m*f+"px":void 0,lineHeight:m?m*f+"px":void 0,backgroundColor:h,borderRadius:"20px"};return _jsx("div",{className:clsx(s),style:x})}}Object.defineProperty(Lamp,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:EventEmitterContext}),Object.defineProperty(Lamp,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{width:22,height:22,onColor:"green",offColor:"gray",invalidColor:"black",useAbsolutePositioning:!1}});export default Lamp;
|
package/dist/components/Osk.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Osk.d.ts","sourceRoot":"","sources":["../../src/components/Osk.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,WAAW,CAAC;AA+CnB,UAAU,QAAQ;IACd,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAiIlC,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
package/dist/components/Osk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useEffect,useRef}from"react";import{InputText}from"primereact/inputtext";import Keyboard from"react-simple-keyboard";import"./osk.css";import{RegExMaskPatterns}from"../core/MaskPatterns";const numpadLayout={numbers:["1 2 3","4 5 6","7 8 9","- 0 .","{symbols} {backspace}"],default:["! / #","$ % ^","& * (","= ) +","{numbers} {backspace}"]},englishLayout={default:["q w e r t y u i o p","a s d f g h j k l","{shift} z x c v b n m {backspace}","{numbers} {space} {ent}"],shift:["Q W E R T Y U I O P","A S D F G H J K L","{shift} Z X C V B N M {backspace}","{numbers} {space} {ent}"],numbers:["1 2 3","4 5 6","7 8 9","{abc} 0 {backspace}"]},keyboardDisplay={"{numbers}":"123","{ent}":"return","{escape}":"esc ⎋","{tab}":"tab ⇥","{backspace}":"⌫","{capslock}":"caps lock ⇪","{shift}":"⇧","{controlleft}":"ctrl ⌃","{controlright}":"ctrl ⌃","{altleft}":"alt ⌥","{altright}":"alt ⌥","{metaleft}":"cmd ⌘","{metaright}":"cmd ⌘","{abc}":"ABC","{space}":"space","{symbols}":"#+="};export const Osk=({onAccept:e,onChange:t,isNumPad:s=!1,input:a="",label:r="",inputPattern:n,checkValue:i,description:o})=>{const[u,c]=useState({isVisible:!1,layoutName:s?"numbers":"default",minWidth:500,maxWidth:800,input:a,label:r,isNumPad:s,inputPattern:n||RegExMaskPatterns.IntegerPositive,checkValue:i,description:o,firstKeyPressed:!1,onAccept:e||void 0,onChange:t||void 0}),l=useRef(null);useEffect((
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useRef}from"react";import{InputText}from"primereact/inputtext";import Keyboard from"react-simple-keyboard";import"./osk.css";import{RegExMaskPatterns}from"../core/MaskPatterns";const numpadLayout={numbers:["1 2 3","4 5 6","7 8 9","- 0 .","{symbols} {backspace}"],default:["! / #","$ % ^","& * (","= ) +","{numbers} {backspace}"]},englishLayout={default:["q w e r t y u i o p","a s d f g h j k l","{shift} z x c v b n m {backspace}","{numbers} {space} {ent}"],shift:["Q W E R T Y U I O P","A S D F G H J K L","{shift} Z X C V B N M {backspace}","{numbers} {space} {ent}"],numbers:["1 2 3","4 5 6","7 8 9","{abc} 0 {backspace}"]},keyboardDisplay={"{numbers}":"123","{ent}":"return","{escape}":"esc ⎋","{tab}":"tab ⇥","{backspace}":"⌫","{capslock}":"caps lock ⇪","{shift}":"⇧","{controlleft}":"ctrl ⌃","{controlright}":"ctrl ⌃","{altleft}":"alt ⌥","{altright}":"alt ⌥","{metaleft}":"cmd ⌘","{metaright}":"cmd ⌘","{abc}":"ABC","{space}":"space","{symbols}":"#+="};export const Osk=({onAccept:e,onChange:t,isNumPad:s=!1,input:a="",label:r="",inputPattern:n,checkValue:i,description:o})=>{const[u,c]=useState({isVisible:!1,layoutName:s?"numbers":"default",minWidth:500,maxWidth:800,input:a,label:r,isNumPad:s,inputPattern:n||RegExMaskPatterns.IntegerPositive,checkValue:i,description:o,firstKeyPressed:!1,onAccept:e||void 0,onChange:t||void 0}),l=useRef(null);useEffect(()=>()=>{l.current&&l.current.destroy()},[]);const p=()=>{let e="default"===u.layoutName?"shift":"default";c(t=>({...t,layoutName:e}))},m=()=>{let e="numbers"!==u.layoutName?"numbers":"default";c(t=>({...t,layoutName:e}))};return _jsxs("div",{children:[_jsx(InputText,{value:u.input,readOnly:!0,tooltip:u.description}),_jsx("br",{}),_jsx(Keyboard,{keyboardRef:e=>l.current=e,name:"keyboard",layoutName:u.layoutName,layout:(()=>{if(u.isNumPad)return u.isNumPad?(void 0!==u.inputPattern&&null!==u.inputPattern||c(e=>({...e,inputPattern:RegExMaskPatterns.IntegerPositive})),numpadLayout):englishLayout})(),display:keyboardDisplay,physicalKeyboardHighlight:!0,physicalKeyboardHighlightPress:!0,onChange:e=>(e=>{let t=e;u.firstKeyPressed||(t=u.input+e,l.current.setInput(t)),u.onChange&&u.onChange(t),c(e=>({...e,input:t,firstKeyPressed:!0}))})(e),onKeyPress:e=>(e=>{"{shift}"!==e&&"{lock}"!==e&&"{symbols}"!=e||p(),"{numbers}"!==e&&"{abc}"!==e||m(),"{backspace}"===e&&(u.firstKeyPressed||c(e=>({...e,input:"",firstKeyPressed:!0})))})(e)})]})};export default Osk;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OskDialog.d.ts","sourceRoot":"","sources":["../../src/components/OskDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,cAAc;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,OAAO,CAAC,SAAS,CAA+B;gBAEpC,KAAK,EAAE,cAAc;IAQjC,oBAAoB;IAMpB,UAAU,GAAI,OAAO,MAAM,KAAG,MAAM,CAoDnC;IAED,UAAU,aAQT;IAED,SAAS,GAAI,KAAK,MAAM,UAKvB;IAED,WAAW,aAMV;IAED,IAAI,aAgCH;IAED,MAAM;CAIT;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBarWithValue.d.ts","sourceRoot":"","sources":["../../src/components/ProgressBarWithValue.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,4BAA4B,CAAC;AAEpC,UAAU,yBAAyB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAG,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0BpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{ProgressBar}from"primereact/progressbar";import"./ProgressBarWithValue.css";export const ProgressBarWithValue=({value:r,max:e,label:s})=>{let a=r,t=!1;return void 0!==e&&(e>0?a=r/e*100:(a=0,t=!0)),_jsxs("div",{className:"custom-progress-bar",children:[_jsx(ProgressBar,{showValue:!1,value:a,mode:t?"indeterminate":"determinate"}),_jsxs("div",{className:"centered-value",children:[s?`${s} `:""," ",r," ",e?`of ${e}`:""]})]})};export default ProgressBarWithValue;
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React from"react";import{ProgressBar}from"primereact/progressbar";import"./ProgressBarWithValue.css";export const ProgressBarWithValue=({value:r,max:e,label:s})=>{let a=r,t=!1;return void 0!==e&&(e>0?a=r/e*100:(a=0,t=!0)),_jsxs("div",{className:"custom-progress-bar",children:[_jsx(ProgressBar,{showValue:!1,value:a,mode:t?"indeterminate":"determinate"}),_jsxs("div",{className:"centered-value",children:[s?`${s} `:""," ",r," ",e?`of ${e}`:""]})]})};export default ProgressBarWithValue;
|
|
@@ -1,111 +1,70 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { InputTextProps } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The label for the field.
|
|
11
|
-
*/
|
|
12
|
-
label: React.ReactNode | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* The value for the field.
|
|
15
|
-
*/
|
|
16
|
-
value: string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Optional filter for key entry. Not a validator, but won't accept keystrokes outside the filter.
|
|
19
|
-
* @type {RegExp | "pint" | "int" | "pnum" | "money" | "num" | "hex" | "email" | "alpha" | "alphanum"}
|
|
20
|
-
*/
|
|
21
|
-
keyFilter: KeyFilterType | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* An optional prefix before the data entry field.
|
|
24
|
-
*/
|
|
25
|
-
prefix: React.ReactNode | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* An optional suffix after the data entry field.
|
|
28
|
-
*/
|
|
29
|
-
suffix: React.ReactNode | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* A small, advisory text below the field.
|
|
32
|
-
*/
|
|
33
|
-
description: React.ReactNode | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* If true, all functions of the field will be disabled.
|
|
36
|
-
*/
|
|
37
|
-
disabled: boolean | undefined;
|
|
38
|
-
/** Topic on which the value will be dispatched through the user interfave on successful data entry. */
|
|
39
|
-
dispatchTopic: string | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* Placeholder string to display if the value is empty.
|
|
42
|
-
*/
|
|
43
|
-
placeholder: string | undefined;
|
|
2
|
+
import { type InputTextProps } from "primereact/inputtext";
|
|
3
|
+
import type { KeyFilterType } from "primereact/keyfilter";
|
|
4
|
+
interface TextInputProps extends Omit<InputTextProps, "prefix" | "value" | "onChange"> {
|
|
5
|
+
/** The label for the field (shown in an addon). */
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
/** Controlled value from parent. */
|
|
8
|
+
value?: string;
|
|
44
9
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
10
|
+
* PrimeReact key filter (lowercase) or RegExp.
|
|
11
|
+
* Examples: "pint" | "int" | "pnum" | "money" | "num" | "hex" | "email" | "alpha" | "alphanum"
|
|
47
12
|
*/
|
|
13
|
+
keyfilter?: KeyFilterType;
|
|
14
|
+
/** Optional prefix addon before the input. */
|
|
15
|
+
prefix?: React.ReactNode;
|
|
16
|
+
/** Optional suffix addon after the input. */
|
|
17
|
+
suffix?: React.ReactNode;
|
|
18
|
+
/** Small, advisory text below the field. */
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
/** Disable entire control. */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Placeholder string. */
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
/** Called when the user ACCEPTS a new value (Enter or ✔). */
|
|
48
25
|
onValueChanged?(newValue: string): void;
|
|
49
|
-
/**
|
|
50
|
-
validator
|
|
26
|
+
/** Regex validation used on accept (not on each keystroke). */
|
|
27
|
+
validator?: RegExp;
|
|
51
28
|
}
|
|
52
29
|
/**
|
|
53
|
-
*
|
|
30
|
+
* A styled text input field with support for labels, prefixes/suffixes,
|
|
31
|
+
* validation, key filters, and accept/reset actions.
|
|
32
|
+
*
|
|
33
|
+
* This component wraps PrimeReact's <InputText> in a p-inputgroup with
|
|
34
|
+
* optional ✔ and ✖ buttons for committing or cancelling edits.
|
|
35
|
+
*
|
|
36
|
+
* Features:
|
|
37
|
+
* - Label, prefix, and suffix addons for context
|
|
38
|
+
* - Optional `keyfilter` for keystroke-level restrictions (PrimeReact presets or RegExp)
|
|
39
|
+
* - Optional `validator` RegExp applied when accepting a value
|
|
40
|
+
* - Calls `onValueChanged(newValue)` only when the user accepts (Enter key or ✔ button)
|
|
41
|
+
* - Escape key or ✖ button reverts to the last accepted value
|
|
42
|
+
* - Controlled input: always provide a string `value` (defaults to `""`)
|
|
43
|
+
*
|
|
44
|
+
* ## Example
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* import { useState } from "react";
|
|
48
|
+
* import { TextInput } from "./TextInput";
|
|
49
|
+
*
|
|
50
|
+
* export function ExampleForm() {
|
|
51
|
+
* const [partNumber, setPartNumber] = useState("ADC-0001");
|
|
52
|
+
*
|
|
53
|
+
* return (
|
|
54
|
+
* <TextInput
|
|
55
|
+
* label="Part Number"
|
|
56
|
+
* value={partNumber}
|
|
57
|
+
* onValueChanged={setPartNumber}
|
|
58
|
+
* placeholder="Enter part number"
|
|
59
|
+
* keyfilter="alphanum"
|
|
60
|
+
* validator={/^[A-Z0-9-]+$/}
|
|
61
|
+
* description="Use only uppercase letters, digits, and dashes."
|
|
62
|
+
* prefix={<i className="pi pi-tag" />}
|
|
63
|
+
* />
|
|
64
|
+
* );
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
54
67
|
*/
|
|
55
|
-
|
|
56
|
-
entryValue: string | undefined;
|
|
57
|
-
isValid: boolean;
|
|
58
|
-
editing: boolean;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* A convenient field with all the usual features of inputing values.
|
|
62
|
-
* Wraps the common features of use of a InputText, p-inputgroup, some icon buttons,
|
|
63
|
-
* accepting and rejecting values and keyboard management.
|
|
64
|
-
*/
|
|
65
|
-
export declare class TextInput extends React.Component<TextInputProps, TextInputState> {
|
|
66
|
-
static contextType: React.Context<import("../core/EventEmitterContext.js").EventEmitterContextType>;
|
|
67
|
-
context: React.ContextType<typeof EventEmitterContext>;
|
|
68
|
-
/**
|
|
69
|
-
* Default properties for the component.
|
|
70
|
-
*/
|
|
71
|
-
static defaultProps: {
|
|
72
|
-
label: string;
|
|
73
|
-
value: undefined;
|
|
74
|
-
keyFilter: undefined;
|
|
75
|
-
writeTopic: undefined;
|
|
76
|
-
onValueChanged: undefined;
|
|
77
|
-
description: undefined;
|
|
78
|
-
prefix: undefined;
|
|
79
|
-
suffix: undefined;
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
dispatchTopic: undefined;
|
|
82
|
-
placeholder: undefined;
|
|
83
|
-
validator: undefined;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @param {FooterViewProps} props
|
|
88
|
-
*/
|
|
89
|
-
constructor(props: TextInputProps);
|
|
90
|
-
/**
|
|
91
|
-
* The component has been loaded into the DOM.
|
|
92
|
-
*/
|
|
93
|
-
componentDidMount(): void;
|
|
94
|
-
componentDidUpdate(prevProps: TextInputProps): void;
|
|
95
|
-
/**
|
|
96
|
-
* Check the new value against the validator RegEx, if one was specified.
|
|
97
|
-
* @param val The new value.
|
|
98
|
-
* @returns True if no validator specified or the value is valid, false if not valid.
|
|
99
|
-
*/
|
|
100
|
-
private validateValue;
|
|
101
|
-
/**
|
|
102
|
-
* The user has elected to accept the input value. Validate and store, if valid.
|
|
103
|
-
*/
|
|
104
|
-
private onAcceptValue;
|
|
105
|
-
/**
|
|
106
|
-
* The user wishes to reset/cancel the previous value.
|
|
107
|
-
*/
|
|
108
|
-
private onResetValue;
|
|
109
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
110
|
-
}
|
|
68
|
+
export declare const TextInput: React.FC<TextInputProps>;
|
|
111
69
|
export {};
|
|
70
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":"AASA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,UAAU,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;IAClF,mDAAmD;IACnD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,6DAA6D;IAC7D,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqG9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useEffect,useMemo,useState}from"react";import{InputText}from"primereact/inputtext";import{Button}from"primereact/button";function toStr(e){return e??""}export const TextInput=e=>{const{label:t,value:s,keyfilter:n,prefix:a,suffix:i,description:o,disabled:r=!1,placeholder:c,onValueChanged:l,validator:u,...p}=e,[d,m]=useState(toStr(s)),[x,f]=useState(!1),[j,v]=useState(!s||h(s,u));function h(e,t){return!t||t.test(e)}function _(){const e=d,t=h(e,u);v(t),t&&(f(!1),l?.(e))}function b(){const e=toStr(s);m(e),f(!1),v(!e||h(e,u))}useEffect(()=>{m(toStr(s)),f(!1),v(!s||h(s,u))},[s,u]);const N=useMemo(()=>toStr(d),[d]);return _jsxs("div",{children:[_jsxs("div",{className:"p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:t}),void 0!==a&&_jsx("span",{className:"p-inputgroup-addon",children:a}),_jsx(InputText,{...p,keyfilter:n,placeholder:c,value:N,onChange:e=>{m(e.target.value),f(!0)},className:j?p.className??"":`${p.className??""} p-invalid`,onKeyDown:e=>{"Enter"===e.key?_():"Escape"===e.key&&b()},disabled:r}),void 0!==i&&_jsx("span",{className:"p-inputgroup-addon",children:i}),_jsx(Button,{icon:"pi pi-check",disabled:r||!x,className:"p-button-success",onClick:_,visible:x}),_jsx(Button,{icon:"pi pi-times",disabled:r||!x,className:"p-button-danger",onClick:b,visible:x})]}),void 0!==o&&_jsx("small",{children:o})]})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SelectButtonProps } from 'primereact/selectbutton';
|
|
2
|
+
import { type SelectButtonProps } from 'primereact/selectbutton';
|
|
3
3
|
import { IndicatorColor } from "../core/IndicatorColor";
|
|
4
4
|
export { IndicatorColor };
|
|
5
5
|
import { ActionMode } from '../core/ActionMode';
|
|
@@ -20,3 +20,4 @@ export interface ToggleGroupProps extends SelectButtonProps {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const ToggleGroup: React.FC<ToggleGroupProps>;
|
|
22
22
|
export default ToggleGroup;
|
|
23
|
+
//# sourceMappingURL=ToggleGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../src/components/ToggleGroup.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI/E,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,CAAC;AAMpB,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAG,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;CACvD;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyRlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useEffect,useContext}from"react";import{SelectButton}from"primereact/selectbutton";import{EventEmitterContext}from"../core/EventEmitterContext";import{IndicatorColor}from"../core/IndicatorColor";export{IndicatorColor};import{ActionMode}from"../core/ActionMode";export{ActionMode};import clsx from"clsx";export const ToggleGroup=({label:o,topic:t,onColor:e,offColor:n,command:r,commandTopic:i,commandArgs:l,disableTopic:s,invisibleTopic:a,actionMode:c,invert:d,onValueChanged:u,...p})=>{const[m]=useState((
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import{SelectButton}from"primereact/selectbutton";import{EventEmitterContext}from"../core/EventEmitterContext";import{IndicatorColor}from"../core/IndicatorColor";export{IndicatorColor};import{ActionMode}from"../core/ActionMode";export{ActionMode};import clsx from"clsx";export const ToggleGroup=({label:o,topic:t,onColor:e,offColor:n,command:r,commandTopic:i,commandArgs:l,disableTopic:s,invisibleTopic:a,actionMode:c,invert:d,onValueChanged:u,...p})=>{const[m]=useState(()=>`toggleGroup-${Math.random().toString(36).substr(2,9)}`),[f,g]=useState(void 0),[v,h]=useState(!1),[b,x]=useState(!1),[C,I]=useState(!1),y=useContext(EventEmitterContext);useEffect(()=>(t&&y.subscribe(t,A),s&&y.subscribe(s,j),a&&y.subscribe(a,M),()=>{}),[t,s,a]);const A=o=>{g(o)},j=o=>{h(o)},M=o=>{x(o)},E=()=>{C||(I(!0),c!==ActionMode.Tap&&c!==ActionMode.Pressed||T(!0))},S=()=>{C&&(I(!1),c===ActionMode.Tap?T(!1):c===ActionMode.Released&&T(!0))},T=o=>{if(r&&r.length>0){const t={topic:i,value:o,...l};y.dispatch({topic:r,payload:t})}};let $=f;void 0!==p.value&&($=p.value);let _=((o,t,e)=>{if(!t||0===t.length)return IndicatorColor.IndicatorInvalid;let n=Array.isArray(e)?e:void 0!==e?[e]:[IndicatorColor.IndicatorInvalid],r=typeof o;if("boolean"===r)return o?n[0]:n.length>1?n[1]:n[0];if("number"===r&&t.length>o){if(n.length>o){return n[o]}return n[0]}if("string"===r){let e=t.indexOf(o);return-1!==e&&e<n.length?n[e]:n[0]}return null!=e?Array.isArray(e)?e[0]:e:IndicatorColor.IndicatorInvalid})($,p.options,e);void 0===$&&(_=IndicatorColor.IndicatorInvalid);const N=void 0!==p.options&&null!==p.options&&void 0!==p.options.length&&p.options.length>2,G=`${m}-togglegroup-selectbutton-container`;return _jsxs("div",{className:"flex",children:[_jsx("style",{children:`\n ${void 0!==n?`\n .${G} .p-selectbutton .p-button {\n background-color: ${n};\n }\n `:""}\n .${G} .p-selectbutton .p-button.p-highlight {\n background-color: ${_} !important;\n border-color: ${_} !important;\n }\n `}),_jsx("div",{className:G,children:_jsxs("div",{className:"p-inputgroup",children:[_jsx("span",{className:"p-inputgroup-addon",style:{flexGrow:1},children:o}),_jsx(SelectButton,{...p,options:p.options,disabled:v||p.disabled,multiple:N,className:clsx(m,p.className,{"p-invalid":void 0===p.value}),style:b?{display:"none"}:{},value:((o,t)=>{if(null==t||0===t.length)return;let e=typeof o;if("boolean"==e){return o&&t.length>1?t[1]:t[0]}if("number"==e){let e=o;if(void 0!==e&&e<t.length)return t[e]}else if("string"==e)return o})($,p.options),allowEmpty:!1,onMouseDown:E,onTouchStart:E,onMouseUp:S,onTouchEnd:S,onChange:o=>(o=>{if(null!=u)if(void 0===p.options||null===p.options||0===p.options.length)u(!!N&&0);else{let t=0;for(let e=0;e<p.options.length;++e)if(o===p.options[e]){t=e;break}u(N?t:t>0)}})(o.value)})]})})]})};export default ToggleGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { EventEmitterContextType } from '../core/EventEmitterContext';
|
|
2
|
+
import { type EventEmitterContextType } from '../core/EventEmitterContext';
|
|
3
3
|
import type { NumerableFormatOptions } from '../core/NumerableTypes';
|
|
4
4
|
/**
|
|
5
5
|
* Properties of the ValueDisplay component.
|
|
@@ -142,4 +142,5 @@ declare class ValueDisplay extends Component<Props, State> {
|
|
|
142
142
|
*/
|
|
143
143
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
144
144
|
}
|
|
145
|
-
export { ValueDisplay, NumerableFormatOptions };
|
|
145
|
+
export { ValueDisplay, type NumerableFormatOptions };
|
|
146
|
+
//# sourceMappingURL=ValueDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ValueDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGhG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE;;GAEG;AACH,UAAU,KAAK;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAGjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,KAAK;IACX,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,cAAM,YAAa,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAE9C,2EAA2E;IAC3E,MAAM,CAAC,WAAW,mDAAuB;IAGzC,sFAAsF;IACtF,SAAS,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEnD;;;OAGG;gBACS,KAAK,EAAE,KAAK;IAQxB;;;OAGG;IACH,iBAAiB;IAUjB;;;;OAIG;IACH,kBAAkB,CAAC,SAAS,EAAE,KAAK;IAQnC;;;OAGG;IACH,oBAAoB;IAOpB;;;;OAIG;IACH,MAAM;CAiCT;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,sBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{Component}from"react";import{format as numerableFormat}from"numerable";import clsx from"clsx";import{EventEmitterContext}from"../core/EventEmitterContext";class ValueDisplay extends Component{constructor(e){super(e),Object.defineProperty(this,"unsubscribeTopicId",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.state={subscribedValue:e.value,fontSize:"100%"}}componentDidMount(){const{topic:e}=this.props;if(e){const{subscribe:t}=this.context;this.unsubscribeTopicId=t(e,
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{Component}from"react";import{format as numerableFormat}from"numerable";import clsx from"clsx";import{EventEmitterContext}from"../core/EventEmitterContext";class ValueDisplay extends Component{constructor(e){super(e),Object.defineProperty(this,"unsubscribeTopicId",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.state={subscribedValue:e.value,fontSize:"100%"}}componentDidMount(){const{topic:e}=this.props;if(e){const{subscribe:t}=this.context;this.unsubscribeTopicId=t(e,e=>{this.setState({subscribedValue:e})})}}componentDidUpdate(e){this.props.value!==e.value&&this.setState({subscribedValue:this.props.value})}componentWillUnmount(){if(this.unsubscribeTopicId){const{unsubscribe:e}=this.context;e(this.unsubscribeTopicId)}}render(){const{x:e,y:t,width:i,height:s,format:o,formatOptions:r,className:n,useAbsolutePositioning:a}=this.props,{subscribedValue:l,fontSize:u}=this.state,{scale:c,xOffset:p,yOffset:b}=this.context,m={position:a?"absolute":"relative",display:a?"":"inline-block",verticalAlign:"middle",fontSize:u&&c>1?100*c+"%":u,top:a&&t?`${b+c*t}px`:void 0,left:a&&e?`${p+c*e}px`:void 0,width:i?i*c+"px":void 0,height:s?s*c+"px":void 0,lineHeight:s?s*c+"px":void 0,whiteSpace:"nowrap"};let d;return d="number"==typeof l||"string"==typeof l&&!isNaN(Number(l))?numerableFormat(l,o,r):l,_jsx("div",{className:clsx(n),style:m,children:d})}}Object.defineProperty(ValueDisplay,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:EventEmitterContext});export{ValueDisplay};
|
|
@@ -63,4 +63,5 @@ export declare class ValueIndicator extends Component<ValueIndicatorProps, Value
|
|
|
63
63
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
64
64
|
}
|
|
65
65
|
export default ValueIndicator;
|
|
66
|
-
export { NumerableFormatOptions };
|
|
66
|
+
export { type NumerableFormatOptions };
|
|
67
|
+
//# sourceMappingURL=ValueIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ValueIndicator.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,sBAAsB,CAAC;AAG9B;;GAEG;AACH,UAAU,mBAAmB;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAG3C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEnC;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;CAC3C;AAED;;GAEG;AACH,UAAU,mBAAmB;CAC5B;AAID;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAGnF;;;OAGG;gBACS,KAAK,EAAE,mBAAmB;IAMtC;;;OAGG;IAIH,MAAM;CA2BT;AAED,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAE,KAAK,sBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Component}from"react";import{Tooltip}from"primereact/tooltip";import{ValueDisplay}from"./ValueDisplay";import"./ValueIndicator.css";export class ValueIndicator extends Component{constructor(t){super(t),this.state={}}render(){return _jsxs("div",{className:"value-indicator-container",style:this.props.style,children:[_jsx(Tooltip,{target:".value-indicator-container"}),void 0!==this.props.label&&_jsx("div",{className:"value-indicator-label",children:this.props.label}),_jsx(ValueDisplay,{className:this.props.className,value:this.props.value,format:this.props.format,formatOptions:this.props.formatOptions,topic:this.props.topic,"data-pr-tooltip":this.props.tooltip,"data-pr-position":"down","data-pr-mousetrack":!0,"data-pr-showDelay":2e3})]})}}export default ValueIndicator;
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{Component}from"react";import{Tooltip}from"primereact/tooltip";import{ValueDisplay}from"./ValueDisplay";import"./ValueIndicator.css";export class ValueIndicator extends Component{constructor(t){super(t),this.state={}}render(){return _jsxs("div",{className:"value-indicator-container",style:this.props.style,children:[_jsx(Tooltip,{target:".value-indicator-container"}),void 0!==this.props.label&&_jsx("div",{className:"value-indicator-label",children:this.props.label}),_jsx(ValueDisplay,{className:this.props.className,value:this.props.value,format:this.props.format,formatOptions:this.props.formatOptions,topic:this.props.topic,"data-pr-tooltip":this.props.tooltip,"data-pr-position":"down","data-pr-mousetrack":!0,"data-pr-showDelay":2e3})]})}}export default ValueIndicator;export{};
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* to the console when accepted.
|
|
48
48
|
*/
|
|
49
49
|
import React from 'react';
|
|
50
|
-
import { InputNumberProps } from 'primereact/inputnumber';
|
|
50
|
+
import { type InputNumberProps } from 'primereact/inputnumber';
|
|
51
51
|
/**
|
|
52
52
|
* Properties of the ValueInput component.
|
|
53
53
|
*/
|
|
@@ -155,3 +155,4 @@ interface ValueInputProps extends Omit<InputNumberProps, 'value'> {
|
|
|
155
155
|
*/
|
|
156
156
|
export declare const ValueInput: React.FC<ValueInputProps>;
|
|
157
157
|
export default ValueInput;
|
|
158
|
+
//# sourceMappingURL=ValueInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueInput.d.ts","sourceRoot":"","sources":["../../src/components/ValueInput.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAGH,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI5E;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAE7D;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAGnC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAGlC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAGlC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IAG1C;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAG1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6KhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useRef,useEffect,useContext}from"react";import{InputNumber}from"primereact/inputnumber";import{EventEmitterContext}from"../core/EventEmitterContext";import{Button}from"primereact/button";export const ValueInput=({label:e="",value:t=null,min:s,max:i,minPrecision:n=0,maxPrecision:
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useRef,useEffect,useContext}from"react";import{InputNumber}from"primereact/inputnumber";import{EventEmitterContext}from"../core/EventEmitterContext";import{Button}from"primereact/button";export const ValueInput=({label:e="",value:t=null,min:s,max:i,minPrecision:n=0,maxPrecision:a=3,mode:o="decimal",currency:u="USD",prefix:l,suffix:r,showButtons:c=!1,step:p=1,locale:m="en-US",description:d,disabled:x=!1,dispatchTopic:f,placeholder:v,onValueChanged:b,...h})=>{const[j,C]=useState(t),[E,_]=useState(t),[S,g]=useState(t),[y,N]=useState(!1),[k,B]=useState(!1),D=useRef(null),F=useContext(EventEmitterContext);useEffect(()=>{null!==S?(_(S),g(null),B(!1)):t!==E&&(_(t),C(t),N(!1),B(!1))},[t,E]);const I=()=>{var e;y&&null!==j&&(e=j,void 0!==i&&e>i||void 0!==s&&e<s?B(!0):(_(j),N(!1),b?.(j),B(!1),f&&F.dispatch({topic:f,payload:j})))},w=()=>{y&&(C(null),_(null),N(!1),B(!1))};return _jsxs("div",{children:[_jsxs("div",{className:"p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:e}),_jsx(InputNumber,{...h,ref:D,invalid:k,min:s,max:i,minFractionDigits:n,maxFractionDigits:a,mode:o,prefix:l,suffix:r,showButtons:c,step:p,placeholder:v,value:E,onChange:e=>{return t=e.value,y||(g(E),N(!0)),void C(t);var t},locale:m,currency:u,onKeyDown:e=>{"Enter"===e.key?I():"Escape"===e.key&&w()},disabled:x}),_jsx(Button,{icon:"pi pi-check",disabled:x||!y,className:"p-button-success",onClick:()=>I(),visible:y,size:"small",autoFocus:!1}),_jsx(Button,{icon:"pi pi-times",disabled:x||!y,className:"p-button-danger",onClickCapture:()=>w(),visible:y,size:"small",autoFocus:!1})]}),d&&_jsx("small",{children:d})]})};export default ValueInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMode.d.ts","sourceRoot":"","sources":["../../src/core/ActionMode.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,oBAAY,UAAU;IAClB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACxB"}
|