@adcops/autocore-react 3.1.1 → 3.1.5
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/.claude/settings.local.json +7 -0
- package/dist/components/FileSelect.d.ts.map +1 -1
- package/dist/components/FileSelect.js +1 -1
- package/dist/core/AutoCoreTagContext.d.ts +19 -0
- package/dist/core/AutoCoreTagContext.d.ts.map +1 -1
- package/dist/core/AutoCoreTagContext.js +1 -1
- package/dist/themes/adc-dark/blue/theme.css +305 -0
- package/dist/themes/adc-dark/blue/theme.css.map +1 -1
- package/package.json +3 -3
- package/src/components/FileSelect.tsx +31 -11
- package/src/core/AutoCoreTagContext.tsx +483 -44
- package/src/themes/adc-dark/_extensions.scss +327 -0
- package/docs/.nojekyll +0 -1
- package/docs/assets/hierarchy.js +0 -1
- package/docs/assets/highlight.css +0 -134
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1633
- package/docs/classes/components_CodeEditor.CodeEditor.html +0 -135
- package/docs/classes/components_Indicator.Indicator.html +0 -122
- package/docs/classes/components_IndicatorRect.IndicatorRect.html +0 -121
- package/docs/classes/components_JogPanel.JogPanel.html +0 -136
- package/docs/classes/components_Lamp.Lamp.html +0 -122
- package/docs/classes/components_OskDialog.OskDialog.html +0 -125
- package/docs/classes/components_TextInput.TextInput.html +0 -125
- package/docs/classes/components_ValueDisplay.ValueDisplay.html +0 -148
- package/docs/classes/components_ValueIndicator.ValueIndicator.html +0 -126
- package/docs/classes/core_ValueSimulator.ValueSimulator.html +0 -51
- package/docs/classes/hub_HubBase.HubBase.html +0 -106
- package/docs/classes/hub_HubSimulate.HubSimulate.html +0 -75
- package/docs/classes/hub_HubTauri.HubTauri.html +0 -93
- package/docs/classes/hub_HubWebSocket.HubWebSocket.html +0 -112
- package/docs/documents/core_AutoCoreTagContext.AutoCoreTagContext.html +0 -148
- package/docs/enums/components_JogPanel.JogDistanceAction.html +0 -5
- package/docs/enums/components_JogPanel.JogPanelAction.html +0 -18
- package/docs/enums/components_JogPanel.JogSpeedAction.html +0 -5
- package/docs/enums/core_ActionMode.ActionMode.html +0 -6
- package/docs/enums/core_IndicatorColor.IndicatorColor.html +0 -23
- package/docs/functions/assets.BlocklyLogo.html +0 -1
- package/docs/functions/assets.Distance.html +0 -1
- package/docs/functions/assets.JogLong.html +0 -1
- package/docs/functions/assets.JogMedium.html +0 -1
- package/docs/functions/assets.JogShort.html +0 -1
- package/docs/functions/assets.PythonLogo.html +0 -1
- package/docs/functions/assets.Rotation3D.html +0 -1
- package/docs/functions/assets.RotationCcw.html +0 -1
- package/docs/functions/assets.RotationCcwA.html +0 -1
- package/docs/functions/assets.RotationCcwB.html +0 -1
- package/docs/functions/assets.RotationCcwC.html +0 -1
- package/docs/functions/assets.RotationCw.html +0 -1
- package/docs/functions/assets.RotationCwA.html +0 -1
- package/docs/functions/assets.RotationCwB.html +0 -1
- package/docs/functions/assets.RotationCwC.html +0 -1
- package/docs/functions/assets.Run.html +0 -1
- package/docs/functions/assets.Speed.html +0 -1
- package/docs/functions/assets.SpeedFast.html +0 -1
- package/docs/functions/assets.SpeedMedium.html +0 -1
- package/docs/functions/assets.SpeedNone.html +0 -1
- package/docs/functions/assets.SpeedSlow.html +0 -1
- package/docs/functions/assets.Walk.html +0 -1
- package/docs/functions/components_BlocklyEditor.createCustomToolbox.html +0 -6
- package/docs/functions/core_UniqueId.UniqueId.html +0 -9
- package/docs/functions/core_hoc.hocAddSubscription.html +0 -6
- package/docs/functions/hooks_adsHooks.useAdsRegisterSymbols.html +0 -16
- package/docs/functions/hooks_adsHooks.useAdsTapValue.html +0 -8
- package/docs/functions/hooks_adsHooks.useAdsWriteScaledValue.html +0 -18
- package/docs/functions/hooks_adsHooks.useAdsWriteValue.html +0 -9
- package/docs/functions/hooks_commandHooks.useRegisterSymbols.html +0 -16
- package/docs/functions/hooks_commandHooks.useTapValue.html +0 -10
- package/docs/functions/hooks_commandHooks.useWriteScaledValue.html +0 -18
- package/docs/functions/hooks_commandHooks.useWriteValue.html +0 -11
- package/docs/functions/hooks_useAutoCoreTag.ts.makeAutoCoreTagHooks.html +0 -12
- package/docs/functions/hooks_useScaledValue.useScaledValue.html +0 -18
- package/docs/functions/hub.createHub.html +0 -3
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -148
- package/docs/interfaces/components_IndicatorButton.IndicatorButtonProps.html +0 -654
- package/docs/interfaces/components_IndicatorRect.IndicatorRectProps.html +0 -37
- package/docs/interfaces/components_JogPanel.JogPanelButtonDefinition.html +0 -5
- package/docs/interfaces/components_ToggleGroup.ToggleGroupProps.html +0 -644
- package/docs/interfaces/core_AutoCoreTagTypes.BaseContextValue.html +0 -12
- package/docs/interfaces/core_AutoCoreTagTypes.ScaleConfig.html +0 -13
- package/docs/interfaces/core_EventEmitterContext.Action.html +0 -8
- package/docs/interfaces/core_EventEmitterContext.EventEmitterContextType.html +0 -33
- package/docs/interfaces/core_EventEmitterContext.State.html +0 -8
- package/docs/interfaces/core_EventEmitterContext.Subscription.html +0 -6
- package/docs/interfaces/core_IndicatorButtonState.IndicatorButtonState.html +0 -10
- package/docs/interfaces/core_PositionContext.IPositionContext.html +0 -17
- package/docs/interfaces/hub_CommandMessage.CommandMessage.html +0 -6
- package/docs/interfaces/hub_CommandMessage.CommandMessageResult.html +0 -4
- package/docs/modules/assets.html +0 -1
- package/docs/modules/assets_BlocklyLogo.html +0 -1
- package/docs/modules/assets_Distance.html +0 -1
- package/docs/modules/assets_JogLong.html +0 -1
- package/docs/modules/assets_JogMedium.html +0 -1
- package/docs/modules/assets_JogShort.html +0 -1
- package/docs/modules/assets_PythonLogo.html +0 -1
- package/docs/modules/assets_Rotation3D.html +0 -1
- package/docs/modules/assets_RotationCcw.html +0 -1
- package/docs/modules/assets_RotationCcwA.html +0 -1
- package/docs/modules/assets_RotationCcwB.html +0 -1
- package/docs/modules/assets_RotationCcwC.html +0 -1
- package/docs/modules/assets_RotationCw.html +0 -1
- package/docs/modules/assets_RotationCwA.html +0 -1
- package/docs/modules/assets_RotationCwB.html +0 -1
- package/docs/modules/assets_RotationCwC.html +0 -1
- package/docs/modules/assets_Run.html +0 -1
- package/docs/modules/assets_Speed.html +0 -1
- package/docs/modules/assets_SpeedFast.html +0 -1
- package/docs/modules/assets_SpeedMedium.html +0 -1
- package/docs/modules/assets_SpeedNone.html +0 -1
- package/docs/modules/assets_SpeedSlow.html +0 -1
- package/docs/modules/assets_Walk.html +0 -1
- package/docs/modules/components_AutoCoreDevPanel.html +0 -20
- package/docs/modules/components_BlocklyEditor.html +0 -1
- package/docs/modules/components_CodeEditor.html +0 -1
- package/docs/modules/components_FileList.html +0 -1
- package/docs/modules/components_FileSelect.html +0 -1
- package/docs/modules/components_FitText.html +0 -1
- package/docs/modules/components_Indicator.html +0 -1
- package/docs/modules/components_IndicatorButton.html +0 -1
- package/docs/modules/components_IndicatorRect.html +0 -1
- package/docs/modules/components_JogPanel.html +0 -1
- package/docs/modules/components_Lamp.html +0 -1
- package/docs/modules/components_Osk.html +0 -1
- package/docs/modules/components_OskDialog.html +0 -1
- package/docs/modules/components_ProgressBarWithValue.html +0 -1
- package/docs/modules/components_TextInput.html +0 -1
- package/docs/modules/components_ToggleGroup.html +0 -1
- package/docs/modules/components_ValueDisplay.html +0 -1
- package/docs/modules/components_ValueIndicator.html +0 -1
- package/docs/modules/components_ValueInput.html +0 -1
- package/docs/modules/core_ActionMode.html +0 -1
- package/docs/modules/core_AutoCoreTagContext.html +0 -11
- package/docs/modules/core_AutoCoreTagTypes.html +0 -1
- package/docs/modules/core_EventEmitterContext.html +0 -53
- package/docs/modules/core_IndicatorButtonState.html +0 -1
- package/docs/modules/core_IndicatorColor.html +0 -1
- package/docs/modules/core_MaskPatterns.html +0 -1
- package/docs/modules/core_NumerableTypes.html +0 -1
- package/docs/modules/core_PositionContext.html +0 -1
- package/docs/modules/core_UniqueId.html +0 -1
- package/docs/modules/core_ValueSimulator.html +0 -1
- package/docs/modules/core_hoc.html +0 -1
- package/docs/modules/hooks.html +0 -1
- package/docs/modules/hooks_adsHooks.html +0 -1
- package/docs/modules/hooks_commandHooks.html +0 -1
- package/docs/modules/hooks_useAutoCoreTag.ts.html +0 -52
- package/docs/modules/hooks_useScaledValue.html +0 -1
- package/docs/modules/hub.html +0 -1
- package/docs/modules/hub_CommandMessage.html +0 -1
- package/docs/modules/hub_HubBase.html +0 -1
- package/docs/modules/hub_HubSimulate.html +0 -1
- package/docs/modules/hub_HubTauri.html +0 -1
- package/docs/modules/hub_HubWebSocket.html +0 -1
- package/docs/modules.html +0 -23
- package/docs/types/components_IndicatorButton.IndicatorButtonOptionsType.html +0 -1
- package/docs/types/core_AutoCoreTagTypes.ExtractByTag.html +0 -2
- package/docs/types/core_AutoCoreTagTypes.PrimitiveKind.html +0 -1
- package/docs/types/core_AutoCoreTagTypes.TagConfig.html +0 -16
- package/docs/types/core_AutoCoreTagTypes.TagValueMap.html +0 -1
- package/docs/types/core_AutoCoreTagTypes.TagValueOf.html +0 -1
- package/docs/types/core_EventEmitterContext.EmitterDispatchFunction.html +0 -3
- package/docs/types/core_EventEmitterContext.EmitterSubscribeFunction.html +0 -3
- package/docs/types/core_EventEmitterContext.EmitterUnsubscribeFunction.html +0 -3
- package/docs/types/core_NumerableTypes.NumerableFormatOptions.html +0 -4
- package/docs/types/core_hoc.HocAddSubscriptionProps.html +0 -6
- package/docs/variables/components_AutoCoreDevPanel.AutoCoreDevPanel.html +0 -43
- package/docs/variables/components_BlocklyEditor.BlocklyEditor.html +0 -13
- package/docs/variables/components_BlocklyEditor.StandardToolbox.html +0 -1
- package/docs/variables/components_FileList.FileList.html +0 -23
- package/docs/variables/components_FileSelect.FileSelect.html +0 -1
- package/docs/variables/components_FitText.FitText.html +0 -4
- package/docs/variables/components_IndicatorButton.IndicatorButton.html +0 -1
- package/docs/variables/components_JogPanel.DefaultLinearJogButtons.html +0 -2
- package/docs/variables/components_JogPanel.DefaultRotationJogButtons.html +0 -2
- package/docs/variables/components_Osk.Osk.html +0 -1
- package/docs/variables/components_ProgressBarWithValue.ProgressBarWithValue.html +0 -1
- package/docs/variables/components_ToggleGroup.ToggleGroup.html +0 -1
- package/docs/variables/components_ValueInput.ValueInput.html +0 -4
- package/docs/variables/core_AutoCoreTagContext.AutoCoreTagContext.html +0 -1
- package/docs/variables/core_AutoCoreTagContext.AutoCoreTagProvider.html +0 -7
- package/docs/variables/core_EventEmitterContext.EventEmitterContext.html +0 -64
- package/docs/variables/core_EventEmitterContext.EventEmitterProvider.html +0 -10
- package/docs/variables/core_MaskPatterns.PrimeReactMaskPatterns.html +0 -14
- package/docs/variables/core_MaskPatterns.RegExMaskPatterns.html +0 -15
- package/docs/variables/core_PositionContext.DimensionsContext.html +0 -6
- package/docs/variables/hooks_useScaledValue.kMillimeters2Inches.html +0 -2
- package/docs/variables/hooks_useScaledValue.kNewtons2Pounds.html +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelect.d.ts","sourceRoot":"","sources":["../../src/components/FileSelect.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,KAAK,eAAe,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAOD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"FileSelect.d.ts","sourceRoot":"","sources":["../../src/components/FileSelect.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,KAAK,eAAe,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAOD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8GhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useContext,useEffect}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{EventEmitterContext}from"../core/EventEmitterContext";export const FileSelect=({domain:e="DATASTORE",subdir:t,filter:
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useContext,useEffect}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{EventEmitterContext}from"../core/EventEmitterContext";export const FileSelect=({domain:e="DATASTORE",subdir:t,filter:i,onFileSelected:l,onAccept:n,onCancel:o})=>{const{invoke:s}=useContext(EventEmitterContext),[a,c]=useState([]),[r,u]=useState(null),m=e=>{u(e),l&&l(e.name)};useEffect(()=>{},[r]);return useEffect(()=>{(async()=>{try{let l;l=null!=i?t?{subdir:t,options:{filter:i}}:{options:{filter:i}}:t?{subdir:t}:{};const n=(await s(e,"list_files",l)).data.map((e,t)=>({id:t+1,name:e}));c(n)}catch(e){}})()},[e,t]),_jsxs("div",{children:[_jsxs(DataTable,{value:a,selectionMode:"single",selection:r,onSelectionChange:e=>m(e.value),children:[_jsx(Column,{field:"name",header:"File Name"}),_jsx(Column,{header:"Select",body:e=>{const t=null!==r&&r.id===e.id;return _jsx(Button,{label:t?"Selected":"Select",icon:t?"pi pi-check-circle":"pi pi-circle-off",severity:t?"success":void 0,outlined:!t,rounded:!0,size:"small","aria-label":"Select",onClick:()=>m(e)})}})]},r?.id??"none"),_jsxs("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"10px"},children:[_jsx(Button,{label:"Cancel",icon:"pi pi-times",className:"p-button-text",onClick:o}),_jsx(Button,{label:"Accept",icon:"pi pi-check",className:"p-button",onClick:()=>{void 0!==n&&null!==r&&n(null!==r?void 0!==t?`${t}/${r.name}`:r.name:"")},disabled:!r})]})]})};export default FileSelect;
|
|
@@ -97,7 +97,26 @@
|
|
|
97
97
|
*/
|
|
98
98
|
import React, { type ReactNode } from "react";
|
|
99
99
|
import type { BaseContextValue, TagConfig, ScaleConfig } from "./AutoCoreTagTypes";
|
|
100
|
+
/**
|
|
101
|
+
* Runtime type for the values map - allows any tag name to map to any value type.
|
|
102
|
+
* This is the generic type used when the specific tag configuration is not known at compile time.
|
|
103
|
+
*/
|
|
100
104
|
type VMapRuntime = Record<string, unknown>;
|
|
105
|
+
/**
|
|
106
|
+
* The React Context that holds all AutoCore tag state and operations.
|
|
107
|
+
*
|
|
108
|
+
* This context provides:
|
|
109
|
+
* - `values`: Display values (with scaling/codecs applied)
|
|
110
|
+
* - `rawValues`: Raw controller values as received from server
|
|
111
|
+
* - `isLoading`: Whether initial data loading is complete
|
|
112
|
+
* - `write`: Function to write a value to a tag
|
|
113
|
+
* - `tap`: Function to pulse a boolean tag (true → delay → false)
|
|
114
|
+
* - `scales`: Current scale configurations
|
|
115
|
+
* - `updateScale`: Function to change a scale factor/label
|
|
116
|
+
*
|
|
117
|
+
* @see AutoCoreTagProvider for the provider implementation
|
|
118
|
+
* @see makeAutoCoreTagHooks for creating typed hooks from this context
|
|
119
|
+
*/
|
|
101
120
|
export declare const AutoCoreTagContext: React.Context<BaseContextValue<VMapRuntime>>;
|
|
102
121
|
/**
|
|
103
122
|
* AutoCoreTagProvider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCoreTagContext.d.ts","sourceRoot":"","sources":["../../src/core/AutoCoreTagContext.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAGH,OAAO,KAAK,EAAE,EAQV,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACd,MAAM,oBAAoB,CAAC;AAE5B,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3C,eAAO,MAAM,kBAAkB,8CAQ7B,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoCoreTagContext.d.ts","sourceRoot":"","sources":["../../src/core/AutoCoreTagContext.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAGH,OAAO,KAAK,EAAE,EAQV,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACd,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8CAQ7B,CAAC;AAuBH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAu0BA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import React,{useRef,createContext,useCallback,useContext,useEffect,useMemo,useState}from"react";import{EventEmitterContext}from"./EventEmitterContext";export const AutoCoreTagContext=createContext({values:{},rawValues:{},isLoading:!0,write:async()=>{},tap:async()=>{},scales:{},updateScale:async()=>{}});const sleep=e=>new Promise(t=>setTimeout(t,e));export const AutoCoreTagProvider=({children:e,tags:t,scales:a={},eagerRead:s=!0})=>{const o=useRef(!1),{invoke:
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import React,{useRef,createContext,useCallback,useContext,useEffect,useMemo,useState}from"react";import{EventEmitterContext}from"./EventEmitterContext";export const AutoCoreTagContext=createContext({values:{},rawValues:{},isLoading:!0,write:async()=>{},tap:async()=>{},scales:{},updateScale:async()=>{}});const sleep=e=>new Promise(t=>setTimeout(t,e));export const AutoCoreTagProvider=({children:e,tags:t,scales:a={},eagerRead:s=!0})=>{const o=useRef(!1),{invoke:r,isConnected:n,subscribe:c,unsubscribe:l}=useContext(EventEmitterContext),[u,i]=useState(()=>{const e={};for(const a of t)void 0!==a.initialValue&&(e[a.tagName]=a.initialValue);return e}),[m,f]=useState({}),[y,b]=useState(a),p=useRef(y),v=useRef(u);useEffect(()=>{p.current=y},[y]),useEffect(()=>{v.current=u},[u]);const[d,g]=useState(!0),N=useCallback((e,t)=>{const{valueType:a,scale:s,codec:o}=e;if("number"===a&&"number"==typeof t&&s){const e=p.current[s];return t*(e?.scale??1)}if("json"===a&&o?.fromServer)try{return o.fromServer(t)}catch{}return t},[]),C=useCallback((e,t)=>{const{valueType:a,scale:s,codec:o}=e;if("json"===a&&o?.toServer)try{t=o.toServer(t)}catch{}if("number"===a&&"number"==typeof t&&s){const e=p.current[s];return t/(e?.scale??1)}return t},[]),w=useCallback(e=>{const a=t.filter(t=>t.scale===e);a.length&&f(e=>{const t={...e};for(const e of a){const a=v.current[e.tagName];if("number"!=typeof a)continue;const s=N(e,a);t[e.tagName]!==s&&(t[e.tagName]=s)}return t})},[t,N]),h=useCallback((e,t)=>{i(a=>a[e.tagName]===t?a:{...a,[e.tagName]:t});const a=N(e,t);f(t=>t[e.tagName]===a?t:{...t,[e.tagName]:a})},[N]),x=useCallback(async(e,t,a)=>{const s=a?.concurrency??4,o=a?.minDelayMs??20,n=a?.jitterMs??40;let c=0;const l=Array.from({length:s},()=>(async()=>{for(;;){const a=c++;if(a>=t.length)return;const s=t[a];try{let t=!1;try{await r(e,"refresh",{topic:s.symbolName}),t=!0}catch{}if(!t){const t="GNV"===e.toUpperCase()?{group:"ux",key:s.symbolName}:{key:s.symbolName};s.options&&(t.options=s.options);try{const a=await r(e,"read_value",t);a?.success&&a?.valid&&h(s,a.data)}catch(e){}}}catch(e){}finally{const e=Math.floor(Math.random()*n);await sleep(o+e)}}})());await Promise.all(l)},[r,h]),k=useCallback(async()=>{for(const[e,t]of Object.entries(a)){if(!t.serverTag)continue;const{domain:a,symbolName:s}=t.serverTag;try{const t=await r(a,"read_value",{group:"ux",key:s});if(t.data&&(t.success??1)&&(t.valid??1)){const a=JSON.parse(t.data);if(a&&"number"==typeof a.scale){const{scale:t,label:s}=a;b(a=>({...a,[e]:{...a[e],scale:t,label:s??a[e]?.label??"---"}})),w(e)}}}catch{}}},[r,a,w]);useEffect(()=>{let e=!0;const a=[],u=async()=>{if(e&&!o.current){o.current=!0;try{await(async()=>{const o=new Map;for(const e of t){const t=o.get(e.domain);t?t.push(e):o.set(e.domain,[e])}try{await k();for(const[t,n]of o.entries()){if("ADS"===t.toUpperCase())for(const e of n)try{const t=e.options?{symbol_name:e.symbolName,options:e.options}:{symbol_name:e.symbolName};await r("ADS","register_symbol",t)}catch(e){}else for(const e of n)await r(t,"subscribe",{data_filter:e.symbolName});for(const s of n){const o=c(`${t}/${s.symbolName}`,t=>{e&&h(s,t?.value)});a.push(o)}s&&"ADS"!==t.toUpperCase()&&await x(t,n,{concurrency:4,minDelayMs:20,jitterMs:40})}s&&await r("ADS","refresh",{})}finally{e&&setTimeout(()=>e&&g(!1),100)}})()}finally{e&&setTimeout(()=>e&&g(!1),100)}}};if(n())u();else{const e=c("HUB/connected",()=>{l(e),u()});a.push(e)}return()=>{e=!1,a.forEach(l),o.current=!1}},[c,l,n,r,s,t,k,x,h]);const S=useMemo(()=>Object.entries(a).filter(([,e])=>e.serverTag).map(([e,t])=>({scaleName:e,domain:t.serverTag.domain,symbolName:t.serverTag.symbolName})),[a]);useEffect(()=>{let e=!0;const t=[];for(const{scaleName:a,domain:s,symbolName:o}of S){const r=c(`${s}/${o}`,t=>{if(!e)return;const s=t?.value;if(s&&"object"==typeof s&&"number"==typeof s.scale){const{scale:e,label:t}=s;b(s=>({...s,[a]:{...s[a],scale:e,label:t??s[a]?.label??"---"}})),w(a)}});t.push(r)}return()=>{e=!1,t.forEach(l)}},[c,l,S,w]);const T=useCallback(async(e,a)=>{const s=t.find(t=>t.tagName===e);if(!s)return;const o=C(s,a);let n;const c=s.domain.toUpperCase();n="ADS"===c?{symbol_name:s.symbolName,value:o}:"GNV"===c?{group:"ux",key:s.symbolName,value:o}:{key:s.symbolName,value:o},await r(s.domain,"write_value",n)},[t,r,C]),E=useCallback(async e=>{const a=t.find(t=>t.tagName===e);if(!a)return;if("boolean"!==a.valueType)return;const s=a.domain.toUpperCase(),o=e=>"ADS"===s?{symbol_name:a.symbolName,value:e}:"GNV"===s?{group:"ux",key:a.symbolName,value:e}:{key:a.symbolName,value:e};await r(a.domain,"write_value",o(!0)),await sleep(300),await r(a.domain,"write_value",o(!1))},[t,r]),_=useCallback(async(e,t,a)=>{const s=y[e];s&&(s.serverTag&&await r(s.serverTag.domain,"write_value",{group:"ux",key:s.serverTag.symbolName,value:{name:e,scale:t,label:a}}),b(s=>({...s,[e]:{...s[e],scale:t,label:a}})),w(e))},[y,r,w]);useEffect(()=>{f(e=>{const a={...e};for(const e of t){const t=v.current[e.tagName];if(void 0===t)continue;const s=N(e,t);a[e.tagName]!==s&&(a[e.tagName]=s)}return a})},[t,N,y]);const j=useMemo(()=>({values:m,rawValues:u,isLoading:d,write:T,tap:E,scales:y,updateScale:_}),[m,u,d,T,E,y,_]);return _jsx(AutoCoreTagContext.Provider,{value:j,children:e})};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (C) 2025 Automated Design Corp.. All Rights Reserved.
|
|
3
4
|
* Created Date: 2025-07-15 11:55:03
|
|
@@ -7076,6 +7077,170 @@
|
|
|
7076
7077
|
.p-inline-message-text {
|
|
7077
7078
|
font-weight: 500;
|
|
7078
7079
|
}
|
|
7080
|
+
/* ---- ac-toolbar: consistent square icon-button sizing ----
|
|
7081
|
+
*
|
|
7082
|
+
* SVG icons (Lucide, custom <SvgAxis/> ) and PrimeIcon font glyphs
|
|
7083
|
+
* (`<i class="pi pi-...">`) are normalized to render at a consistent
|
|
7084
|
+
* weight inside toolbar buttons. The two need different treatment:
|
|
7085
|
+
*
|
|
7086
|
+
* - Size — both: width/height for SVG, font-size for icon font.
|
|
7087
|
+
* - Weight — SVG only: Lucide ships `stroke-width="2"` on a 24×24
|
|
7088
|
+
* viewBox; when scaled to 18px the strokes drop to
|
|
7089
|
+
* effective 1.5px and look thinner than PrimeIcons.
|
|
7090
|
+
* Setting `stroke-width: 2.25` via CSS (which overrides
|
|
7091
|
+
* the SVG presentation attribute) restores parity. The
|
|
7092
|
+
* fill: none / stroke: currentColor lines defend against
|
|
7093
|
+
* custom SVGs that didn't inherit those by attribute.
|
|
7094
|
+
* - Align — `vertical-align: middle` matches PrimeIcon's default
|
|
7095
|
+
* and prevents baseline drift in non-flex parents.
|
|
7096
|
+
*/
|
|
7097
|
+
.ac-toolbar-icon-btn {
|
|
7098
|
+
width: 19mm;
|
|
7099
|
+
height: 12.7mm;
|
|
7100
|
+
padding: 0;
|
|
7101
|
+
display: inline-flex;
|
|
7102
|
+
align-items: center;
|
|
7103
|
+
justify-content: center;
|
|
7104
|
+
flex-shrink: 0;
|
|
7105
|
+
}
|
|
7106
|
+
.ac-toolbar-icon-btn svg, .ac-toolbar-icon-btn i {
|
|
7107
|
+
font-size: 11mm;
|
|
7108
|
+
width: 11mm;
|
|
7109
|
+
height: 11mm;
|
|
7110
|
+
}
|
|
7111
|
+
.ac-toolbar-icon-btn svg {
|
|
7112
|
+
vertical-align: middle;
|
|
7113
|
+
stroke: currentColor;
|
|
7114
|
+
fill: none;
|
|
7115
|
+
stroke-width: 2.25;
|
|
7116
|
+
stroke-linecap: round;
|
|
7117
|
+
stroke-linejoin: round;
|
|
7118
|
+
}
|
|
7119
|
+
.ac-toolbar-icon-btn .p-button-icon {
|
|
7120
|
+
margin: 0;
|
|
7121
|
+
}
|
|
7122
|
+
.ac-toolbar-icon-lg {
|
|
7123
|
+
width: 25.4mm;
|
|
7124
|
+
height: 19mm;
|
|
7125
|
+
padding: 0;
|
|
7126
|
+
display: inline-flex;
|
|
7127
|
+
align-items: center;
|
|
7128
|
+
justify-content: center;
|
|
7129
|
+
flex-shrink: 0;
|
|
7130
|
+
}
|
|
7131
|
+
.ac-toolbar-icon-lg svg, .ac-toolbar-icon-lg i {
|
|
7132
|
+
font-size: 16mm;
|
|
7133
|
+
width: 16mm;
|
|
7134
|
+
height: 16mm;
|
|
7135
|
+
}
|
|
7136
|
+
.ac-toolbar-icon-lg svg {
|
|
7137
|
+
vertical-align: middle;
|
|
7138
|
+
stroke: currentColor;
|
|
7139
|
+
fill: none;
|
|
7140
|
+
stroke-width: 2.25;
|
|
7141
|
+
stroke-linecap: round;
|
|
7142
|
+
stroke-linejoin: round;
|
|
7143
|
+
}
|
|
7144
|
+
.ac-toolbar-icon-lg .p-button-icon {
|
|
7145
|
+
margin: 0;
|
|
7146
|
+
}
|
|
7147
|
+
.ac-toolbar-icon-panic {
|
|
7148
|
+
width: 25.4mm;
|
|
7149
|
+
height: 25.4mm;
|
|
7150
|
+
padding: 0;
|
|
7151
|
+
display: inline-flex;
|
|
7152
|
+
align-items: center;
|
|
7153
|
+
justify-content: center;
|
|
7154
|
+
flex-shrink: 0;
|
|
7155
|
+
}
|
|
7156
|
+
.ac-toolbar-icon-panic svg {
|
|
7157
|
+
width: 20mm;
|
|
7158
|
+
height: 20mm;
|
|
7159
|
+
vertical-align: middle;
|
|
7160
|
+
stroke: currentColor;
|
|
7161
|
+
fill: none;
|
|
7162
|
+
stroke-width: 2.25;
|
|
7163
|
+
stroke-linecap: round;
|
|
7164
|
+
stroke-linejoin: round;
|
|
7165
|
+
}
|
|
7166
|
+
.ac-toolbar-icon-panic .p-button-icon {
|
|
7167
|
+
margin: 0;
|
|
7168
|
+
}
|
|
7169
|
+
/* ---- OverlayPanel + Dialog: comfortable interior padding ----
|
|
7170
|
+
*/
|
|
7171
|
+
body .p-component.p-dialog .p-dialog-content {
|
|
7172
|
+
padding: 4mm;
|
|
7173
|
+
}
|
|
7174
|
+
body .p-component.p-overlaypanel .p-overlaypanel-content {
|
|
7175
|
+
padding: 4mm;
|
|
7176
|
+
}
|
|
7177
|
+
:root {
|
|
7178
|
+
--p-dialog-content-padding: 4mm;
|
|
7179
|
+
--p-overlaypanel-content-padding: 4mm;
|
|
7180
|
+
}
|
|
7181
|
+
.ac-toolbar-group {
|
|
7182
|
+
display: flex;
|
|
7183
|
+
flex-direction: row;
|
|
7184
|
+
align-items: center;
|
|
7185
|
+
gap: 2px;
|
|
7186
|
+
}
|
|
7187
|
+
/* ---- ac-toolbar-tool-list: stacked text buttons in an OverlayPanel ---- */
|
|
7188
|
+
/*
|
|
7189
|
+
* Spacing between buttons uses `gap` on the flex parent rather than
|
|
7190
|
+
* `margin` on the buttons. PrimeReact's `.p-button` rules carry their
|
|
7191
|
+
* own margin reset and tie our `.ac-toolbar-tool-item` on specificity;
|
|
7192
|
+
* because PrimeReact's CSS loads later, its margin wins. Flex `gap`
|
|
7193
|
+
* has no PrimeReact equivalent to fight.
|
|
7194
|
+
*/
|
|
7195
|
+
.ac-toolbar-tool-list {
|
|
7196
|
+
display: flex;
|
|
7197
|
+
flex-direction: column;
|
|
7198
|
+
min-width: 16rem;
|
|
7199
|
+
padding: 2mm;
|
|
7200
|
+
gap: 2mm;
|
|
7201
|
+
}
|
|
7202
|
+
/* `gap: 0.75rem` here is the *intra-button* spacing — between the
|
|
7203
|
+
* leading icon and the text label — not between buttons. */
|
|
7204
|
+
.ac-toolbar-tool-item {
|
|
7205
|
+
justify-content: flex-start;
|
|
7206
|
+
gap: 0.75rem;
|
|
7207
|
+
}
|
|
7208
|
+
/* ---- ac-form: content page form layout ---- */
|
|
7209
|
+
.ac-form {
|
|
7210
|
+
display: flex;
|
|
7211
|
+
flex-direction: column;
|
|
7212
|
+
gap: 10px;
|
|
7213
|
+
}
|
|
7214
|
+
.ac-form-row {
|
|
7215
|
+
display: flex;
|
|
7216
|
+
flex-direction: row;
|
|
7217
|
+
align-items: center;
|
|
7218
|
+
gap: 8px;
|
|
7219
|
+
}
|
|
7220
|
+
.ac-form-row > * {
|
|
7221
|
+
min-width: 0;
|
|
7222
|
+
}
|
|
7223
|
+
.ac-form-field {
|
|
7224
|
+
flex: 1;
|
|
7225
|
+
min-width: 0;
|
|
7226
|
+
}
|
|
7227
|
+
.ac-form-section {
|
|
7228
|
+
font-size: 11px;
|
|
7229
|
+
font-weight: 700;
|
|
7230
|
+
text-transform: uppercase;
|
|
7231
|
+
letter-spacing: 0.06em;
|
|
7232
|
+
color: #60a5fa;
|
|
7233
|
+
border-bottom: 1px solid #424b57;
|
|
7234
|
+
padding-bottom: 4px;
|
|
7235
|
+
margin-top: 6px;
|
|
7236
|
+
}
|
|
7237
|
+
.ac-form-label {
|
|
7238
|
+
font-size: 13px;
|
|
7239
|
+
font-weight: 600;
|
|
7240
|
+
color: rgba(255, 255, 255, 0.6);
|
|
7241
|
+
white-space: nowrap;
|
|
7242
|
+
flex-shrink: 0;
|
|
7243
|
+
}
|
|
7079
7244
|
.p-picklist-buttons .p-button,
|
|
7080
7245
|
.p-orderlist-controls .p-button {
|
|
7081
7246
|
transition: opacity 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
|
|
@@ -7093,5 +7258,145 @@
|
|
|
7093
7258
|
color: #030712;
|
|
7094
7259
|
}
|
|
7095
7260
|
}
|
|
7261
|
+
/* Padding for OverlayPanels and Dialogs */
|
|
7262
|
+
.p-overlaypanel .p-overlaypanel-content {
|
|
7263
|
+
padding: 4mm !important;
|
|
7264
|
+
}
|
|
7265
|
+
|
|
7266
|
+
.p-dialog .p-dialog-content {
|
|
7267
|
+
padding: 4mm !important;
|
|
7268
|
+
}
|
|
7269
|
+
|
|
7270
|
+
/* Padding for fieldset */
|
|
7271
|
+
.p-fieldset .p-fieldset-legend {
|
|
7272
|
+
padding: 0.5mm;
|
|
7273
|
+
border-width: 0.5mm;
|
|
7274
|
+
margin-left: 1.5mm;
|
|
7275
|
+
}
|
|
7276
|
+
.p-fieldset .p-fieldset-content {
|
|
7277
|
+
padding: 1mm;
|
|
7278
|
+
}
|
|
7279
|
+
.p-fieldset {
|
|
7280
|
+
border-width: 0.5mm;
|
|
7281
|
+
}
|
|
7282
|
+
|
|
7283
|
+
/*
|
|
7284
|
+
* Padding for dropdown items.
|
|
7285
|
+
* Makes them work better on touchscreens.
|
|
7286
|
+
*/
|
|
7287
|
+
.p-autocomplete-item {
|
|
7288
|
+
padding-top: 2mm;
|
|
7289
|
+
padding-bottom: 2mm;
|
|
7290
|
+
}
|
|
7291
|
+
|
|
7292
|
+
.p-dropdown-item-label {
|
|
7293
|
+
padding-top: 2mm;
|
|
7294
|
+
padding-bottom: 2mm;
|
|
7295
|
+
}
|
|
7296
|
+
|
|
7297
|
+
/*
|
|
7298
|
+
* Clearable dropdowns (showClear): by default PrimeReact floats the clear
|
|
7299
|
+
* "×" over the selected value, where it obscures the text and is hard to
|
|
7300
|
+
* tap. Reserve space at the far right, move the clear icon to the RIGHT of
|
|
7301
|
+
* the chevron, vertically centre it, and give it a button-like bordered
|
|
7302
|
+
* tap target separated from the chevron so the two are easy to target.
|
|
7303
|
+
*/
|
|
7304
|
+
.ac-dropdown-clearable.p-dropdown .p-dropdown-trigger {
|
|
7305
|
+
margin-right: 2.75rem;
|
|
7306
|
+
border-right: 1px solid #424b57;
|
|
7307
|
+
}
|
|
7308
|
+
.ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon {
|
|
7309
|
+
top: 50%;
|
|
7310
|
+
right: 0.4rem;
|
|
7311
|
+
margin-top: 0;
|
|
7312
|
+
transform: translateY(-50%);
|
|
7313
|
+
box-sizing: content-box;
|
|
7314
|
+
width: 1rem;
|
|
7315
|
+
height: 1rem;
|
|
7316
|
+
padding: 0.4rem;
|
|
7317
|
+
border: 1px solid #424b57;
|
|
7318
|
+
border-radius: 3px;
|
|
7319
|
+
color: rgba(255, 255, 255, 0.6);
|
|
7320
|
+
background: rgba(255, 255, 255, 0.04);
|
|
7321
|
+
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
|
7322
|
+
}
|
|
7323
|
+
.ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon:hover {
|
|
7324
|
+
background: rgba(255, 255, 255, 0.1);
|
|
7325
|
+
border-color: #60a5fa;
|
|
7326
|
+
color: #60a5fa;
|
|
7327
|
+
}
|
|
7328
|
+
.ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon * {
|
|
7329
|
+
pointer-events: none;
|
|
7330
|
+
}
|
|
7331
|
+
|
|
7332
|
+
/*
|
|
7333
|
+
* TestSetupView / TestSetupForm scroll containment.
|
|
7334
|
+
*
|
|
7335
|
+
* The whole view fills its parent and confines overflow to the inner
|
|
7336
|
+
* field/history regions, so the tab strip and the section headers stay
|
|
7337
|
+
* visible instead of the entire page scrolling. All the height plumbing
|
|
7338
|
+
* hangs on `min-height: 0` — without it a flex child refuses to shrink
|
|
7339
|
+
* below its content and the overflow leaks back out to the page.
|
|
7340
|
+
*/
|
|
7341
|
+
.ac-test-setup-view {
|
|
7342
|
+
display: flex;
|
|
7343
|
+
flex-direction: column;
|
|
7344
|
+
height: 100%;
|
|
7345
|
+
min-height: 0;
|
|
7346
|
+
}
|
|
7347
|
+
.ac-test-setup-view > .p-tabview {
|
|
7348
|
+
display: flex;
|
|
7349
|
+
flex-direction: column;
|
|
7350
|
+
flex: 1 1 auto;
|
|
7351
|
+
min-height: 0;
|
|
7352
|
+
}
|
|
7353
|
+
.ac-test-setup-view .p-tabview-panels {
|
|
7354
|
+
display: flex;
|
|
7355
|
+
flex-direction: column;
|
|
7356
|
+
flex: 1 1 auto;
|
|
7357
|
+
min-height: 0;
|
|
7358
|
+
overflow: hidden;
|
|
7359
|
+
}
|
|
7360
|
+
.ac-test-setup-view .p-tabview-panel {
|
|
7361
|
+
flex: 1 1 auto;
|
|
7362
|
+
min-height: 0;
|
|
7363
|
+
height: 100%;
|
|
7364
|
+
}
|
|
7365
|
+
|
|
7366
|
+
/* Project tab: fixed ProjectSelector + scrolling Test History. */
|
|
7367
|
+
.ac-test-setup-view__tab {
|
|
7368
|
+
display: flex;
|
|
7369
|
+
flex-direction: column;
|
|
7370
|
+
height: 100%;
|
|
7371
|
+
min-height: 0;
|
|
7372
|
+
}
|
|
7373
|
+
|
|
7374
|
+
.ac-test-setup-view__fixed {
|
|
7375
|
+
flex: 0 0 auto;
|
|
7376
|
+
}
|
|
7377
|
+
|
|
7378
|
+
.ac-test-setup-view__scroll {
|
|
7379
|
+
flex: 1 1 auto;
|
|
7380
|
+
min-height: 0;
|
|
7381
|
+
overflow-y: auto;
|
|
7382
|
+
}
|
|
7383
|
+
|
|
7384
|
+
/* Test tab: fixed Test-Setup header + scrolling Test-Configuration list. */
|
|
7385
|
+
.ac-test-setup-form {
|
|
7386
|
+
display: flex;
|
|
7387
|
+
flex-direction: column;
|
|
7388
|
+
height: 100%;
|
|
7389
|
+
min-height: 0;
|
|
7390
|
+
}
|
|
7391
|
+
|
|
7392
|
+
.ac-test-setup-form__head {
|
|
7393
|
+
flex: 0 0 auto;
|
|
7394
|
+
}
|
|
7395
|
+
|
|
7396
|
+
.ac-test-setup-form__body {
|
|
7397
|
+
flex: 1 1 auto;
|
|
7398
|
+
min-height: 0;
|
|
7399
|
+
overflow-y: auto;
|
|
7400
|
+
}
|
|
7096
7401
|
|
|
7097
7402
|
/*# sourceMappingURL=theme.css.map */
|