@esrf/daiquiri-lib 0.0.1-alpha.2 → 0.0.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +254 -1
- package/dist/index.esm.js +670 -198
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +25 -22
- package/src/index.ts +26 -0
- package/src/scss/_base.scss +0 -0
- package/src/scss/_indicator.scss +23 -0
- package/src/scss/_numericstep.scss +153 -0
- package/src/scss/main.scss +5 -2
- package/LICENSE +0 -21
- package/src/scss/_lib.scss +0 -9
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/hardware/TypeIcon.tsx","../src/hardware/utils/HardwareTemplate.tsx","../src/hardware/utils/State.tsx","../src/components/NumericStep.tsx","../src/hardware/utils/HardwareNumericStep.tsx","../src/hardware/utils/HardwareInputNumber.tsx","../src/hardware/MotorDefault.tsx"],"sourcesContent":["interface Props {\n online: boolean;\n activeMessage?: string;\n inactiveMessage?: string;\n message?: string;\n icon: string;\n name: string;\n}\nexport function OnlineStatus(props: Props) {\n const {\n activeMessage = 'Online',\n inactiveMessage = 'Offline',\n message = 'This device is',\n } = props;\n\n return (\n <div\n className={`dot-indicator small bg-${\n props.online ? 'success' : 'danger'\n }`}\n title={`${message} ${props.online ? activeMessage : inactiveMessage}`}\n />\n );\n}\n\nexport default function TypeIcon(props: Props) {\n const { name, icon } = props;\n return (\n <div className=\"icon\" title={name}>\n <i className={`fa ${icon}`} />\n <OnlineStatus {...props} />\n </div>\n );\n}\n","import type { ReactElement } from 'react';\nimport { Form, OverlayTrigger, Popover, Button } from 'react-bootstrap';\nimport type { Hardware } from './types';\n\ninterface Props {\n hardware: Hardware;\n headerMode?: string;\n widgetIcon: ReactElement;\n widgetState: ReactElement;\n widgetContent: ReactElement;\n}\n\n/**\n * Normalized way to compose hardware component in order to provide the same\n * kind of layout\n */\nexport default function HardwareTemplate(props: Props) {\n const { headerMode, hardware } = props;\n\n function getLabel() {\n if (hardware.alias) {\n return hardware.alias;\n }\n if (hardware.name) {\n return hardware.name;\n }\n return hardware.id;\n }\n\n const label = getLabel();\n\n switch (headerMode) {\n case 'front':\n return (\n <div className=\"hw-component\">\n <div className=\"hw-single\">\n {props.widgetIcon}\n <div className=\"name\">{label}</div>\n <div className=\"d-inline-block\">{props.widgetContent}</div>\n </div>\n </div>\n );\n case 'none':\n return (\n <div className=\"hw-component\">\n <div className=\"hw-single\">{props.widgetContent}</div>\n </div>\n );\n case 'state':\n return props.widgetState;\n // case 'top':\n default:\n return (\n <div className=\"hw-component\">\n <div className=\"hw-head\">\n {props.widgetIcon}\n <div className=\"name\">\n <Form.Label htmlFor={hardware.id}>{label}</Form.Label>\n </div>\n {props.widgetState}\n {props.hardware.errors && props.hardware.errors.length > 0 && (\n <OverlayTrigger\n trigger=\"click\"\n placement=\"bottom\"\n rootClose\n overlay={\n <Popover id={props.hardware.id} style={{ maxWidth: 500 }}>\n <Popover.Header>Device Errors</Popover.Header>\n <Popover.Body>\n There were errors with properties on this device:\n <ul>\n {props.hardware.errors.map((error) => (\n <li>\n {error.property}:\n <span className=\"stack-trace\">\n {error.traceback}\n <br />\n {error.exception}\n </span>\n </li>\n ))}\n </ul>\n </Popover.Body>\n </Popover>\n }\n >\n <Button variant=\"danger\" size=\"sm\">\n <i className=\"fa fa-exclamation-triangle\" />\n </Button>\n </OverlayTrigger>\n )}\n </div>\n <div className=\"hw-content\">{props.widgetContent}</div>\n </div>\n );\n }\n}\n","import { Badge } from 'react-bootstrap';\nimport type * as Schema from './schema';\n\n/**\n * Normalize the way to display an hardware state.\n *\n * If `minWidth` is pecified (in `em`) it ensure the widget width will stay the\n * same when the state change\n */\nexport function HardwareState(props: {\n state: string;\n variant: string;\n minWidth?: number;\n}) {\n const style = {\n display: 'inline-block',\n minWidth: '',\n };\n\n if (props.minWidth) style.minWidth = `${props.minWidth}em`;\n return (\n <div style={style}>\n <Badge bg={props.variant}>{props.state}</Badge>\n </div>\n );\n}\n\nexport function MotorState(props: { hardware: Schema.MotorSchema }) {\n const { hardware } = props;\n function getState() {\n if (!hardware.online) {\n return 'OFFLINE';\n }\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n return s1;\n }\n const state = getState();\n return (\n <HardwareState\n state={state}\n minWidth={6}\n variant={state === 'READY' ? 'success' : 'warning'}\n />\n );\n}\n\nexport function ShutterState(props: {\n hardware: Schema.ShutterSchema;\n useReadyState?: boolean;\n}) {\n const { hardware } = props;\n function getState() {\n if (!hardware.online) {\n return 'OFFLINE';\n }\n const s = hardware.properties.state;\n if (props.useReadyState && (s === 'OPEN' || s === 'CLOSED')) {\n return 'READY';\n }\n return s;\n }\n\n const state = getState();\n\n function getVariant() {\n switch (state) {\n case 'READY':\n return 'success';\n case 'OPEN':\n return 'success';\n case 'CLOSED':\n return 'danger';\n case 'DISABLED':\n return 'secondary';\n case 'MOVING':\n case 'STANDBY':\n case 'OFFLINE':\n return 'warning';\n case 'FAULT':\n return 'fatal';\n default:\n return 'fatal';\n }\n }\n\n return <HardwareState state={state} minWidth={6} variant={getVariant()} />;\n}\n","import type {\n KeyboardEvent,\n ChangeEvent,\n MutableRefObject,\n ReactChild,\n} from 'react';\nimport { forwardRef, useRef, useState } from 'react';\nimport { map } from 'lodash';\n\nimport { Form, Button, InputGroup } from 'react-bootstrap';\nimport classNames from 'classnames';\n\ninterface Props {\n step?: number;\n steps?: number[];\n disabled: boolean;\n id?: string;\n unit?: string;\n overlay?: ReactChild | null;\n incIcon?: string;\n decIcon?: string;\n swapIncDec?: boolean;\n className?: string;\n type?: 'number' | 'text';\n precision?: number;\n horizontalArrows?: boolean;\n largeArrows?: boolean;\n onBlur: () => void;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n onStep: (params: { target: HTMLInputElement }) => void;\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n}\n\nconst NumericStep = forwardRef<HTMLInputElement, Props>((props, ref) => {\n const stepSizeRef = useRef<HTMLSelectElement>(null);\n const [currentStep, setCurrentStep] = useState(props.step);\n const onStep = (up: boolean) => {\n // FIXME: Would be good to remove that cast\n const ref2 = ref as MutableRefObject<HTMLInputElement>;\n if (stepSizeRef.current === null) {\n return;\n }\n let val = Number.parseFloat(ref2.current.value);\n const stepSize = Number.parseFloat(stepSizeRef.current.value);\n val += up ? stepSize : -stepSize;\n ref2.current.value = `${val}`;\n\n if (props.onStep) {\n props.onStep({\n target: ref2.current,\n });\n }\n };\n\n const {\n onStep: onStepProp,\n step,\n overlay,\n incIcon,\n decIcon,\n swapIncDec,\n onKeyDown,\n horizontalArrows,\n largeArrows,\n ...rest\n } = props;\n\n const onKeyDown2 = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n onStep(true);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n onStep(false);\n } else if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n if (!props.step) {\n return (\n <Form.Control\n ref={ref}\n type=\"number\"\n step=\"any\"\n onKeyDown={onKeyDown2}\n {...rest}\n />\n );\n }\n\n const steps = map(props.steps || [props.step], (s) => (\n <option value={s} key={s}>\n {s}\n </option>\n ));\n\n return (\n <div\n className={classNames('numeric-step', {\n 'numeric-step-large': largeArrows,\n 'numeric-step-horizontal': horizontalArrows,\n })}\n >\n <InputGroup>\n <Form.Control\n onKeyDown={onKeyDown2}\n ref={ref}\n type=\"number\"\n step=\"any\"\n {...rest}\n />\n <>\n {overlay}\n {!overlay && (\n <InputGroup.Text className=\"d-flex flex-column\">\n <Form.Control\n ref={stepSizeRef}\n as=\"select\"\n className=\"step-size\"\n defaultValue={currentStep}\n onChange={(e) =>\n setCurrentStep(Number.parseFloat(e.target.value))\n }\n >\n {steps}\n </Form.Control>\n {props.unit && <div>{props.unit}</div>}\n {!incIcon && !decIcon && (\n <>\n <Button\n className=\"step step-up\"\n disabled={props.disabled}\n onClick={(e) => onStep(true)}\n />\n <Button\n className=\"step step-down\"\n disabled={props.disabled}\n onClick={(e) => onStep(false)}\n />\n </>\n )}\n </InputGroup.Text>\n )}\n {decIcon && swapIncDec && (\n <Button disabled={props.disabled} onClick={(e) => onStep(false)}>\n <i className={`fa fa-fw fa-${decIcon}`} />\n </Button>\n )}\n {incIcon && (\n <Button disabled={props.disabled} onClick={(e) => onStep(true)}>\n <i className={`fa fa-fw fa-${incIcon}`} />\n </Button>\n )}\n {decIcon && !swapIncDec && (\n <Button disabled={props.disabled} onClick={(e) => onStep(false)}>\n <i className={`fa fa-fw fa-${decIcon}`} />\n </Button>\n )}\n </>\n </InputGroup>\n </div>\n );\n});\n\nexport default NumericStep;\n","import { useRef, useState, useEffect } from 'react';\nimport type { KeyboardEvent, ChangeEvent } from 'react';\nimport classNames from 'classnames';\nimport { Button, Form, OverlayTrigger, InputGroup } from 'react-bootstrap';\nimport NumericStep from '../../components/NumericStep';\n\n/**\n * NumericStep handled hardware properties.\n *\n * Input related to hardware have specificities because the hardware state can\n * change during the user interaction.\n */\nexport default function HardwareNumericStep(props: {\n hardwareValue: number | null;\n hardwareIsDisabled: boolean;\n hardwareIsMoving: boolean;\n hardwareIsReady: boolean;\n onMoveRequested: (value: number) => Promise<void> | null;\n onAbortRequested: () => void;\n /** Default step size to use for up / down arrows */\n step?: number;\n /** Array of selectable step sizes */\n steps?: number[];\n /** Number of decimals to show */\n precision?: number;\n /** Whether this widget is read only */\n readOnly?: boolean;\n /** Specify a fontawesome to inc the value */\n incIcon?: string;\n /** Specify a fontawesome to dec the value */\n decIcon?: string;\n /** If true inc and dec icon are swapped */\n swapIncDec?: boolean;\n /** Show the step arrows horizontally instead of vertically */\n horizontalArrows?: boolean;\n /** Show large step arrows */\n largeArrows?: boolean;\n /** Identifier passed to the input element */\n id?: string;\n}) {\n const valueRef = useRef<HTMLInputElement>(null);\n const [edited, setEdited] = useState(false);\n const [error, setError] = useState(false);\n useEffect(() => {\n if (valueRef.current) {\n if (props.hardwareValue === null) {\n valueRef.current.value = '';\n } else {\n valueRef.current.value = props.hardwareValue.toString();\n }\n setEdited(false);\n }\n }, [props.hardwareValue]);\n\n function updateRef(value: any) {\n let newValue = value;\n if (props.precision !== undefined) {\n newValue = Number.parseFloat(newValue).toFixed(props.precision);\n }\n if (valueRef?.current) {\n valueRef.current.value = newValue;\n }\n }\n\n function onBlur() {\n if (edited) {\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setEdited(false);\n }, 3000);\n }\n }\n\n function onChange(e: ChangeEvent<HTMLInputElement>) {\n if (props.hardwareValue === null) {\n return;\n }\n setEdited(true);\n if (valueRef?.current) {\n valueRef.current.value = e.target.value;\n }\n if (e.target.value === props.hardwareValue.toString()) {\n setEdited(false);\n }\n }\n\n function onStep(e: any) {\n setEdited(false);\n void props.onMoveRequested(e.target.value);\n }\n\n function onKeyDown(e: KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case 'Enter':\n {\n setEdited(false);\n // @ts-expect-error\n const value: number = Number.parseFloat(e.target.value);\n const promise = props.onMoveRequested(value);\n if (promise) {\n promise.catch(() => {\n setError(true);\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setError(false);\n }, 2000);\n });\n }\n }\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'Esc': // IE/Edge specific value\n case 'Escape':\n if (edited) {\n setError(false);\n setEdited(false);\n updateRef(props.hardwareValue);\n }\n // @ts-expect-error\n e.target.blur();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n return (\n <NumericStep\n id={props.id}\n className={classNames({\n 'form-control-edited': edited,\n 'form-control-error': error,\n 'hw-moving': props.hardwareIsMoving,\n })}\n type={props.readOnly ? 'text' : 'number'}\n ref={valueRef}\n precision={props.precision}\n onChange={onChange}\n onBlur={onBlur}\n onStep={onStep}\n onKeyDown={onKeyDown}\n disabled={\n props.hardwareIsDisabled || props.readOnly || !props.hardwareIsReady\n }\n step={props.step}\n steps={props.steps}\n incIcon={props.incIcon}\n decIcon={props.decIcon}\n swapIncDec={props.swapIncDec}\n horizontalArrows={props.horizontalArrows}\n largeArrows={props.largeArrows}\n overlay={\n props.hardwareIsMoving && !props.hardwareIsDisabled ? (\n <Button variant=\"danger\" onClick={props.onAbortRequested}>\n <i className=\"fa fa-times\" />\n </Button>\n ) : null\n }\n />\n );\n}\n","import { useEffect, useRef, useState } from 'react';\nimport type { KeyboardEvent, ChangeEvent } from 'react';\nimport { Form } from 'react-bootstrap';\nimport classNames from 'classnames';\n\n/**\n * Input number synchronized with a hardware.\n *\n * Input related to hardware have specificities because the hardware state can\n * change during the user interaction.\n *\n * TODO: Maybe normalize `precision` and `step` together\n */\nexport default function HardwareInputNumber(props: {\n hardwareValue: number;\n hardwareIsDisabled: boolean;\n hardwareIsMoving?: boolean;\n hardwareIsReady?: boolean;\n onMoveRequested: (value: number) => Promise<void> | null;\n onAbortRequested?: () => void;\n readOnly?: boolean;\n precision?: number;\n step?: number;\n}) {\n const valueRef = useRef<HTMLInputElement>(null);\n const [edited, setEdited] = useState(false);\n const [error, setError] = useState(false);\n\n function normalizeNumber(value: string): string {\n if (props.precision !== undefined) {\n return Number.parseFloat(value).toFixed(props.precision);\n }\n return value;\n }\n\n useEffect(() => {\n if (valueRef.current) {\n valueRef.current.value = normalizeNumber(props.hardwareValue?.toString());\n setEdited(false);\n }\n }, [props.hardwareValue, props.precision]);\n\n function updateRef(value: any) {\n const newValue = normalizeNumber(value);\n if (valueRef?.current) {\n valueRef.current.value = newValue;\n }\n }\n\n function onKeyDown(e: KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case 'Enter': {\n setEdited(false);\n // @ts-expect-error\n const value: number = Number.parseFloat(e.target.value);\n const promise = props.onMoveRequested(value);\n if (promise) {\n promise.catch(() => {\n setError(true);\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setError(false);\n }, 2000);\n });\n }\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n case 'Esc': // IE/Edge specific value\n case 'Escape':\n if (edited) {\n setError(false);\n setEdited(false);\n updateRef(props.hardwareValue);\n }\n // @ts-expect-error\n e.target.blur();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n function onChange(e: ChangeEvent<HTMLInputElement>) {\n setEdited(true);\n const { name } = e.target;\n if (valueRef?.current) {\n valueRef.current.value = e.target.value;\n }\n if (e.target.value === props.hardwareValue.toString()) {\n setEdited(false);\n }\n }\n\n return (\n <Form.Control\n className={classNames({\n 'form-control-edited': edited,\n 'form-control-error': error,\n 'hw-moving': props.hardwareIsMoving,\n })}\n type=\"number\"\n ref={valueRef}\n onChange={onChange}\n onKeyDown={onKeyDown}\n disabled={\n props.readOnly || props.hardwareIsMoving || props.hardwareIsDisabled\n }\n step={props.step}\n />\n );\n}\n","import {\n Button,\n Form,\n OverlayTrigger,\n InputGroup,\n Popover,\n} from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport HardwareTemplate from './utils/HardwareTemplate';\nimport { MotorState } from './utils/State';\nimport HardwareNumericStep from './utils/HardwareNumericStep';\nimport HardwareInputNumber from './utils/HardwareInputNumber';\nimport type { MotorSchema } from './utils/schema';\nimport type {\n HardwareWidgetProps,\n HardwareWidgetOptions,\n EditableHardware,\n} from './utils/types';\n\ninterface MotorOverlayProps {\n hardware: EditableHardware<MotorSchema>;\n disabled: boolean;\n readOnly?: boolean;\n}\n\nfunction MotorOverlay(props: MotorOverlayProps) {\n function onMoveVelocityRequested(target: number) {\n return props.hardware.requestChange({\n property: 'velocity',\n value: target,\n });\n }\n\n function onMoveAccelerationRequested(target: number) {\n return props.hardware.requestChange({\n property: 'acceleration',\n value: target,\n });\n }\n\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n\n return (\n <OverlayTrigger\n trigger=\"click\"\n rootClose\n overlay={\n <Popover id=\"popid\">\n <Popover.Header>{props.hardware.name} details</Popover.Header>\n <Popover.Body>\n <Form.Group>\n <Form.Label>Velocity</Form.Label>\n <HardwareInputNumber\n hardwareValue={props.hardware.properties.velocity}\n onMoveRequested={onMoveVelocityRequested}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n readOnly={props.readOnly}\n />\n </Form.Group>\n <Form.Group>\n <Form.Label>Acceleration</Form.Label>\n <HardwareInputNumber\n hardwareValue={props.hardware.properties.acceleration}\n onMoveRequested={onMoveAccelerationRequested}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n readOnly={props.readOnly}\n />\n </Form.Group>\n </Popover.Body>\n </Popover>\n }\n >\n <Button>\n <i className=\"fa fa-ellipsis-h\" />\n </Button>\n </OverlayTrigger>\n );\n}\n\nexport interface MotorDefaultOptions extends HardwareWidgetOptions {\n /** Default step size to use for up / down arrows */\n step?: number;\n /** Array of selectable step sizes */\n steps?: number[];\n /** Number of decimals to show */\n precision?: number;\n /** Whether to show popup to configure extended parameters */\n extended?: boolean;\n /** Whether this widget is read only */\n readOnly?: boolean;\n /** Kind of header displayed */\n header?: string;\n /** Specify a fontawesome to inc the value */\n incicon?: string;\n /** Specify a fontawesome to dec the value */\n decicon?: string;\n /** If true inc and dec icon are swapped */\n swapincdec?: boolean;\n /** Show the step arrows horizontally instead of vertically */\n horizontalarrows?: boolean;\n /** Show large step arrows */\n largearrows?: boolean;\n}\n\n/**\n * The default motor widget\n */\nexport default function MotorDefault(\n props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>\n) {\n const { hardware, options = {} } = props;\n function onAbortRequested() {\n void hardware.requestChange({\n function: 'stop',\n });\n }\n\n function onMovePositionRequested(target: number) {\n return hardware.requestChange({\n property: 'position',\n value: target,\n function: 'move',\n });\n }\n\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n\n const widgetIcon = (\n <TypeIcon name=\"Motor\" icon=\"fam-hardware-motor\" online={hardware.online} />\n );\n\n const widgetState = <MotorState hardware={hardware} />;\n\n const headerMode = props.options ? props.options.header : 'top';\n\n return (\n <HardwareTemplate\n hardware={hardware}\n widgetIcon={widgetIcon}\n widgetState={widgetState}\n widgetContent={\n <InputGroup>\n <HardwareNumericStep\n id={hardware.id}\n hardwareValue={hardware.properties.position}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n onMoveRequested={onMovePositionRequested}\n onAbortRequested={onAbortRequested}\n precision={options.precision}\n readOnly={options.readOnly}\n step={options.step}\n steps={options.steps}\n incIcon={options.incicon}\n decIcon={options.decicon}\n swapIncDec={options.swapincdec}\n horizontalArrows={options.horizontalarrows}\n largeArrows={options.largearrows}\n />\n {hardware.properties.unit && (\n <InputGroup.Text>{hardware.properties.unit}</InputGroup.Text>\n )}\n\n {s1 !== 'MOVING' && options.extended && (\n <MotorOverlay\n hardware={hardware}\n disabled={props.disabled}\n readOnly={options.readOnly}\n />\n )}\n\n {s1 === 'MOVING' && !props.disabled && !options.step && (\n <Button variant=\"danger\" onClick={onAbortRequested}>\n <i className=\"fa fa-times\" />\n </Button>\n )}\n </InputGroup>\n }\n headerMode={headerMode}\n />\n );\n}\n"],"names":["OnlineStatus","props","activeMessage","inactiveMessage","message","jsx","TypeIcon","name","icon","jsxs","HardwareTemplate","headerMode","hardware","getLabel","label","Form","OverlayTrigger","Popover","error","Button","HardwareState","style","Badge","MotorState","getState","s1","state","NumericStep","forwardRef","ref","stepSizeRef","useRef","currentStep","setCurrentStep","useState","onStep","up","ref2","val","stepSize","onStepProp","step","overlay","incIcon","decIcon","swapIncDec","onKeyDown","horizontalArrows","largeArrows","rest","onKeyDown2","e","steps","map","s","classNames","InputGroup","Fragment","NumericStep$1","HardwareNumericStep","valueRef","edited","setEdited","setError","useEffect","updateRef","value","newValue","onBlur","onChange","promise","HardwareInputNumber","normalizeNumber","_a","MotorOverlay","onMoveVelocityRequested","target","onMoveAccelerationRequested","MotorDefault","options","onAbortRequested","onMovePositionRequested","widgetIcon","widgetState"],"mappings":"gRAQO,SAASA,EAAaC,EAAc,CACnC,KAAA,CACJ,cAAAC,EAAgB,SAChB,gBAAAC,EAAkB,UAClB,QAAAC,EAAU,gBACR,EAAAH,EAGF,OAAAI,EAAA,IAAC,MAAA,CACC,UAAW,0BACTJ,EAAM,OAAS,UAAY,QAC7B,GACA,MAAO,GAAGG,CAAO,IAAIH,EAAM,OAASC,EAAgBC,CAAe,EAAA,CAAA,CAGzE,CAEA,SAAwBG,EAASL,EAAc,CACvC,KAAA,CAAE,KAAAM,EAAM,KAAAC,CAAS,EAAAP,EACvB,OACGQ,EAAAA,KAAA,MAAA,CAAI,UAAU,OAAO,MAAOF,EAC3B,SAAA,CAAAF,EAAA,IAAC,IAAE,CAAA,UAAW,MAAMG,CAAI,GAAI,EAC5BH,EAAAA,IAACL,EAAc,CAAA,GAAGC,EAAO,CAC3B,CAAA,CAAA,CAEJ,CCjBA,SAAwBS,EAAiBT,EAAc,CAC/C,KAAA,CAAE,WAAAU,EAAY,SAAAC,CAAa,EAAAX,EAEjC,SAASY,GAAW,CAClB,OAAID,EAAS,MACJA,EAAS,MAEdA,EAAS,KACJA,EAAS,KAEXA,EAAS,EAClB,CAEA,MAAME,EAAQD,IAEd,OAAQF,EAAY,CAClB,IAAK,QACH,aACG,MAAI,CAAA,UAAU,eACb,SAACF,EAAA,KAAA,MAAA,CAAI,UAAU,YACZ,SAAA,CAAMR,EAAA,WACNI,EAAA,IAAA,MAAA,CAAI,UAAU,OAAQ,SAAMS,EAAA,EAC5BT,EAAA,IAAA,MAAA,CAAI,UAAU,iBAAkB,WAAM,cAAc,CAAA,CACvD,CAAA,CACF,CAAA,EAEJ,IAAK,OAED,OAAAA,EAAAA,IAAC,MAAI,CAAA,UAAU,eACb,SAAAA,MAAC,OAAI,UAAU,YAAa,SAAMJ,EAAA,aAAA,CA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AGtEuE,EAAe9E,EAAA,IAAAkB,EAAA,CAAW,SAAAX,CAAoB,CAAA,EAE9CD,EAAaV,EAAM,QAAUA,EAAM,QAAQ,OAAS,MAGxD,OAAAI,EAAA,IAACK,EAAA,CACC,SAAAE,EACA,WAAAsE,EACA,YAAAC,EACA,qBACG3B,aACC,CAAA,SAAA,CAAAnD,EAAA,IAACsD,EAAA,CACC,GAAI/C,EAAS,GACb,cAAeA,EAAS,WAAW,SACnC,mBAAoBX,EAAM,SAC1B,gBAAiBwB,IAAO,QACxB,iBAAkBA,IAAO,SACzB,gBAAiBwD,EACjB,iBAAAD,EACA,UAAWD,EAAQ,UACnB,SAAUA,EAAQ,SAClB,KAAMA,EAAQ,KACd,MAAOA,EAAQ,MACf,QAASA,EAAQ,QACjB,QAASA,EAAQ,QACjB,WAAYA,EAAQ,WACpB,iBAAkBA,EAAQ,iBAC1B,YAAaA,EAAQ,WAAA,CACvB,EACCnE,EAAS,WAAW,MACnBP,EAAAA,IAACmD,aAAW,KAAX,CAAiB,SAAS5C,EAAA,WAAW,IAAK,CAAA,EAG5Ca,IAAO,UAAYsD,EAAQ,UAC1B1E,EAAA,IAACqE,EAAA,CACC,SAAA9D,EACA,SAAUX,EAAM,SAChB,SAAU8E,EAAQ,QAAA,CACpB,EAGDtD,IAAO,UAAY,CAACxB,EAAM,UAAY,CAAC8E,EAAQ,MAC9C1E,MAACc,EAAAA,OAAO,CAAA,QAAQ,SAAS,QAAS6D,EAChC,eAAC,IAAE,CAAA,UAAU,aAAc,CAAA,EAC7B,CAAA,EAEJ,EAEF,WAAArE,CAAA,CAAA,CAGN"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/hardware/TypeIcon.tsx","../src/utils/formatting.ts","../src/hardware/Frontend.tsx","../src/hardware/Info.tsx","../src/hardware/utils/HardwareTemplate.tsx","../src/hardware/utils/State.tsx","../src/components/NumericStep.tsx","../src/hardware/utils/HardwareNumericStep.tsx","../src/hardware/utils/HardwareInputNumber.tsx","../src/hardware/MotorDefault.tsx","../src/hardware/Multiposition.tsx","../src/hardware/NoObject.tsx","../src/hardware/Property.tsx","../src/hardware/ShutterDefault.tsx","../src/components/FullSizer.tsx"],"sourcesContent":["interface Props {\n online: boolean;\n activeMessage?: string;\n inactiveMessage?: string;\n message?: string;\n icon: string;\n name: string;\n}\nexport function OnlineStatus(props: Props) {\n const {\n activeMessage = 'Online',\n inactiveMessage = 'Offline',\n message = 'This device is',\n } = props;\n\n return (\n <div\n className={`dot-indicator small bg-${\n props.online ? 'success' : 'danger'\n }`}\n title={`${message} ${props.online ? activeMessage : inactiveMessage}`}\n />\n );\n}\n\nexport default function TypeIcon(props: Props) {\n const { name, icon } = props;\n return (\n <div className=\"icon\" title={name}>\n <i className={`fa ${icon}`} />\n <OnlineStatus {...props} />\n </div>\n );\n}\n","// https://github.com/gentooboontoo/js-quantities/issues/30\nexport function formatEng(scalar: number) {\n const powerPrefix: Record<number, string> = {\n 24: 'Y',\n 21: 'Z',\n 18: 'E',\n 15: 'P',\n 12: 'T',\n 9: 'G',\n 6: 'M',\n 3: 'k',\n '-3': 'm',\n '-6': '\\u00B5',\n '-9': 'n',\n '-12': 'p',\n '-15': 'f',\n '-18': 'a',\n '-21': 'z',\n '-24': 'y',\n };\n\n const q = Math.log(scalar) / Math.log(1e3);\n // so that for example '3 km' does not get converted to '3000 m'\n const subtrhnd = !Number.isInteger(q);\n\n const pow10 = 3 * Math.ceil(q - (subtrhnd ? 1 : 0));\n const prefix = pow10 === 0 ? '' : powerPrefix[pow10];\n\n return {\n scalar: scalar * 10 ** -pow10,\n prefix,\n multiplier: 10 ** -pow10,\n };\n}\n\n/**\n * Returns the argument as capitalized string.\n */\nexport function ucfirst(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nexport function toHoursMins(seconds: number) {\n if (seconds < 60) return `${Math.round(seconds)} sec`;\n\n const min = Math.round(seconds / 60);\n\n const mins = min % 60;\n const hours = Math.floor(min / 60);\n\n return hours ? `${hours} hr ${mins} min` : `${mins} min`;\n}\n\nexport function toEnergy(wavelength: number) {\n return wavelength > 0\n ? (\n ((6.626_070_04e-34 * 2.997_924_58e8) /\n (wavelength * 1e-10) /\n 1.602_18e-19) *\n 1e-3\n ).toFixed(4)\n : 0;\n}\n\nexport function round(value: number, digits: number) {\n return Number.parseFloat(value.toFixed(digits));\n}\n","import type { MouseEvent } from 'react';\nimport { map } from 'lodash';\nimport {\n Badge,\n Button,\n ButtonGroup,\n Container,\n Row,\n Col,\n OverlayTrigger,\n Popover,\n} from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport { toHoursMins } from '../utils/formatting';\nimport type { HardwareWidgetProps } from './utils/types';\nimport type { FrontendSchema } from './utils/schema';\n\nfunction FrontendOverlay(props: HardwareWidgetProps<FrontendSchema>) {\n const { hardware } = props;\n function reset(e: any) {\n void hardware.requestChange({\n function: 'reset',\n });\n }\n\n type StateEnum = 'feitlk' | 'expitlk' | 'pssitlk';\n\n const itlks: { [name: string]: StateEnum } = {\n 'Front End': 'feitlk',\n Experimental: 'expitlk',\n PSS: 'pssitlk',\n };\n\n const ring = {\n Current: `${hardware.properties.current.toFixed(1)} mA`,\n Mode: hardware.properties.mode,\n Refill: toHoursMins(hardware.properties.refill),\n Message: <pre>{hardware.properties.message}</pre>,\n };\n\n function getPropertyState(key: StateEnum): string {\n if (!(key in hardware.properties)) {\n return 'UNKNOWN';\n }\n const state: any = hardware.properties[key];\n if (!state || typeof state !== 'string') {\n return 'UNKNOWN';\n }\n return state;\n }\n\n return (\n <OverlayTrigger\n trigger=\"click\"\n rootClose\n overlay={\n <Popover id=\"popid\">\n <Popover.Header>{hardware.name} Details</Popover.Header>\n <Popover.Body>\n <h6>Status</h6>\n <pre>{hardware.properties.status}</pre>\n <h6>Interlocks</h6>\n <Container>\n {map(itlks, (key, name) => (\n <Row key={name}>\n <Col>{name}:</Col>\n <Col>\n <Badge\n bg={getPropertyState(key) === 'ON' ? 'success' : 'danger'}\n >\n {getPropertyState(key)}\n </Badge>\n </Col>\n </Row>\n ))}\n </Container>\n\n <h6>Ring Status</h6>\n <Container>\n {map(ring, (prop, name) => (\n <Row key={name}>\n <Col>{name}:</Col>\n <Col>{prop}</Col>\n </Row>\n ))}\n </Container>\n\n <div className=\"d-grid gap-2\">\n <Button disabled={props.disabled} onClick={reset}>\n Reset\n </Button>\n </div>\n </Popover.Body>\n </Popover>\n }\n >\n <Button className=\"flex-grow-0\" title=\"Shutter Details\">\n <i className=\"fa fa-ellipsis-h\" />\n </Button>\n </OverlayTrigger>\n );\n}\n\nfunction Frontend(props: HardwareWidgetProps<FrontendSchema>) {\n const { hardware, options = {} } = props;\n function onClick(e: MouseEvent) {\n void hardware.requestChange({\n function: hardware.properties.frontend === 'FE open' ? 'close' : 'open',\n });\n }\n\n return (\n <div className=\"hw-component\">\n <div className=\"hw-head\">\n <TypeIcon\n name=\"Frontend\"\n icon=\"fam-hardware-frontend\"\n online={hardware.online}\n />\n <div className=\"name\">{hardware.name}</div>\n <Badge\n bg={\n hardware.properties.state === 'OPEN' ||\n hardware.properties.state === 'RUNNING'\n ? 'success'\n : 'danger'\n }\n >\n {hardware.properties.state}\n </Badge>\n </div>\n <div className=\"hw-content\">\n <ButtonGroup className=\"d-flex\">\n <Button\n variant={\n hardware.properties.frontend === 'FE open' ? 'danger' : 'success'\n }\n onClick={onClick}\n disabled={props.disabled}\n >\n {hardware.properties.frontend === 'FE open' ? 'Close' : 'Open'}\n </Button>\n <FrontendOverlay {...props} />\n </ButtonGroup>\n </div>\n </div>\n );\n}\n\nexport default Frontend;\n","import type {\n Hardware,\n HardwareWidgetProps,\n HardwareWidgetOptions,\n} from './utils/types';\n\nexport interface InfoOptions extends HardwareWidgetOptions {\n /** The property */\n property?: string;\n /** Unit for the property */\n unit?: string;\n}\n\nexport default function Info(\n props: HardwareWidgetProps<Hardware, InfoOptions>\n) {\n const { hardware, options = {} } = props;\n function getValue() {\n const propertyName = options.property;\n if (propertyName === undefined) {\n return `property is not set`;\n }\n if (propertyName === null) {\n return `property is null`;\n }\n let result: any = hardware;\n for (const segment of propertyName.split('/')) {\n result = result[segment];\n if (result === undefined) {\n return `property '${propertyName}' not found`;\n }\n }\n return `${result}`;\n }\n\n return <>{getValue()}</>;\n}\n","import type { ReactElement } from 'react';\nimport { Form, OverlayTrigger, Popover, Button } from 'react-bootstrap';\nimport type { Hardware } from './types';\n\ninterface Props {\n hardware: Hardware;\n headerMode?: string;\n widgetIcon: ReactElement;\n widgetState: ReactElement;\n widgetContent: ReactElement;\n}\n\n/**\n * Normalized way to compose hardware component in order to provide the same\n * kind of layout\n */\nexport default function HardwareTemplate(props: Props) {\n const { headerMode, hardware } = props;\n\n function getLabel() {\n if (hardware.alias) {\n return hardware.alias;\n }\n if (hardware.name) {\n return hardware.name;\n }\n return hardware.id;\n }\n\n const label = getLabel();\n\n switch (headerMode) {\n case 'front':\n return (\n <div className=\"hw-component\">\n <div className=\"hw-single\">\n {props.widgetIcon}\n <div className=\"name\">{label}</div>\n <div className=\"d-inline-block\">{props.widgetContent}</div>\n </div>\n </div>\n );\n case 'none':\n return (\n <div className=\"hw-component\">\n <div className=\"hw-single\">{props.widgetContent}</div>\n </div>\n );\n case 'state':\n return props.widgetState;\n // case 'top':\n default:\n return (\n <div className=\"hw-component\">\n <div className=\"hw-head\">\n {props.widgetIcon}\n <div className=\"name\">\n <Form.Label htmlFor={hardware.id}>{label}</Form.Label>\n </div>\n {props.widgetState}\n {props.hardware.errors && props.hardware.errors.length > 0 && (\n <OverlayTrigger\n trigger=\"click\"\n placement=\"bottom\"\n rootClose\n overlay={\n <Popover id={props.hardware.id} style={{ maxWidth: 500 }}>\n <Popover.Header>Device Errors</Popover.Header>\n <Popover.Body>\n There were errors with properties on this device:\n <ul>\n {props.hardware.errors.map((error) => (\n <li>\n {error.property}:\n <span className=\"stack-trace\">\n {error.traceback}\n <br />\n {error.exception}\n </span>\n </li>\n ))}\n </ul>\n </Popover.Body>\n </Popover>\n }\n >\n <Button variant=\"danger\" size=\"sm\">\n <i className=\"fa fa-exclamation-triangle\" />\n </Button>\n </OverlayTrigger>\n )}\n </div>\n <div className=\"hw-content\">{props.widgetContent}</div>\n </div>\n );\n }\n}\n","import { Badge } from 'react-bootstrap';\nimport type * as Schema from './schema';\n\n/**\n * Normalize the way to display an hardware state.\n *\n * If `minWidth` is pecified (in `em`) it ensure the widget width will stay the\n * same when the state change\n */\nexport function HardwareState(props: {\n state: string;\n variant: string;\n minWidth?: number;\n}) {\n const style = {\n display: 'inline-block',\n minWidth: '',\n };\n\n if (props.minWidth) style.minWidth = `${props.minWidth}em`;\n return (\n <div style={style}>\n <Badge bg={props.variant}>{props.state}</Badge>\n </div>\n );\n}\n\nexport function MotorState(props: { hardware: Schema.MotorSchema }) {\n const { hardware } = props;\n function getState() {\n if (!hardware.online) {\n return 'OFFLINE';\n }\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n return s1;\n }\n const state = getState();\n return (\n <HardwareState\n state={state}\n minWidth={6}\n variant={state === 'READY' ? 'success' : 'warning'}\n />\n );\n}\n\nexport function ShutterState(props: {\n hardware: Schema.ShutterSchema;\n useReadyState?: boolean;\n}) {\n const { hardware } = props;\n function getState() {\n if (!hardware.online) {\n return 'OFFLINE';\n }\n const s = hardware.properties.state;\n if (props.useReadyState && (s === 'OPEN' || s === 'CLOSED')) {\n return 'READY';\n }\n return s;\n }\n\n const state = getState();\n\n function getVariant() {\n switch (state) {\n case 'READY':\n return 'success';\n case 'OPEN':\n return 'success';\n case 'CLOSED':\n return 'danger';\n case 'DISABLED':\n return 'secondary';\n case 'MOVING':\n case 'STANDBY':\n case 'OFFLINE':\n return 'warning';\n case 'FAULT':\n return 'fatal';\n default:\n return 'fatal';\n }\n }\n\n return <HardwareState state={state} minWidth={6} variant={getVariant()} />;\n}\n","import type {\n KeyboardEvent,\n ChangeEvent,\n MutableRefObject,\n ReactChild,\n} from 'react';\nimport { forwardRef, useRef, useState } from 'react';\nimport { map } from 'lodash';\n\nimport { Form, Button, InputGroup } from 'react-bootstrap';\nimport classNames from 'classnames';\n\ninterface Props {\n step?: number;\n steps?: number[];\n disabled: boolean;\n id?: string;\n unit?: string;\n overlay?: ReactChild | null;\n incIcon?: string;\n decIcon?: string;\n swapIncDec?: boolean;\n className?: string;\n type?: 'number' | 'text';\n precision?: number;\n horizontalArrows?: boolean;\n largeArrows?: boolean;\n onBlur: () => void;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n onStep: (params: { target: HTMLInputElement }) => void;\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n}\n\nconst NumericStep = forwardRef<HTMLInputElement, Props>((props, ref) => {\n const stepSizeRef = useRef<HTMLSelectElement>(null);\n const [currentStep, setCurrentStep] = useState(props.step);\n const onStep = (up: boolean) => {\n // FIXME: Would be good to remove that cast\n const ref2 = ref as MutableRefObject<HTMLInputElement>;\n if (stepSizeRef.current === null) {\n return;\n }\n let val = Number.parseFloat(ref2.current.value);\n const stepSize = Number.parseFloat(stepSizeRef.current.value);\n val += up ? stepSize : -stepSize;\n ref2.current.value = `${val}`;\n\n if (props.onStep) {\n props.onStep({\n target: ref2.current,\n });\n }\n };\n\n const {\n onStep: onStepProp,\n step,\n overlay,\n incIcon,\n decIcon,\n swapIncDec,\n onKeyDown,\n horizontalArrows,\n largeArrows,\n ...rest\n } = props;\n\n const onKeyDown2 = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n onStep(true);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n onStep(false);\n } else if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n if (!props.step) {\n return (\n <Form.Control\n ref={ref}\n type=\"number\"\n step=\"any\"\n onKeyDown={onKeyDown2}\n {...rest}\n />\n );\n }\n\n const steps = map(props.steps || [props.step], (s) => (\n <option value={s} key={s}>\n {s}\n </option>\n ));\n\n return (\n <div\n className={classNames('numeric-step', {\n 'numeric-step-large': largeArrows,\n 'numeric-step-horizontal': horizontalArrows,\n })}\n >\n <InputGroup>\n <Form.Control\n onKeyDown={onKeyDown2}\n ref={ref}\n type=\"number\"\n step=\"any\"\n {...rest}\n />\n <>\n {overlay}\n {!overlay && (\n <InputGroup.Text className=\"d-flex flex-column\">\n <Form.Control\n ref={stepSizeRef}\n as=\"select\"\n className=\"step-size\"\n defaultValue={currentStep}\n onChange={(e) =>\n setCurrentStep(Number.parseFloat(e.target.value))\n }\n >\n {steps}\n </Form.Control>\n {props.unit && <div>{props.unit}</div>}\n {!incIcon && !decIcon && (\n <>\n <Button\n className=\"step step-up\"\n disabled={props.disabled}\n onClick={(e) => onStep(true)}\n />\n <Button\n className=\"step step-down\"\n disabled={props.disabled}\n onClick={(e) => onStep(false)}\n />\n </>\n )}\n </InputGroup.Text>\n )}\n {decIcon && swapIncDec && (\n <Button disabled={props.disabled} onClick={(e) => onStep(false)}>\n <i className={`fa fa-fw fa-${decIcon}`} />\n </Button>\n )}\n {incIcon && (\n <Button disabled={props.disabled} onClick={(e) => onStep(true)}>\n <i className={`fa fa-fw fa-${incIcon}`} />\n </Button>\n )}\n {decIcon && !swapIncDec && (\n <Button disabled={props.disabled} onClick={(e) => onStep(false)}>\n <i className={`fa fa-fw fa-${decIcon}`} />\n </Button>\n )}\n </>\n </InputGroup>\n </div>\n );\n});\n\nexport default NumericStep;\n","import { useRef, useState, useEffect } from 'react';\nimport type { KeyboardEvent, ChangeEvent } from 'react';\nimport classNames from 'classnames';\nimport { Button, Form, OverlayTrigger, InputGroup } from 'react-bootstrap';\nimport NumericStep from '../../components/NumericStep';\n\n/**\n * NumericStep handled hardware properties.\n *\n * Input related to hardware have specificities because the hardware state can\n * change during the user interaction.\n */\nexport default function HardwareNumericStep(props: {\n hardwareValue: number | null;\n hardwareIsDisabled: boolean;\n hardwareIsMoving: boolean;\n hardwareIsReady: boolean;\n onMoveRequested: (value: number) => Promise<void> | null;\n onAbortRequested: () => void;\n /** Default step size to use for up / down arrows */\n step?: number;\n /** Array of selectable step sizes */\n steps?: number[];\n /** Number of decimals to show */\n precision?: number;\n /** Whether this widget is read only */\n readOnly?: boolean;\n /** Specify a fontawesome to inc the value */\n incIcon?: string;\n /** Specify a fontawesome to dec the value */\n decIcon?: string;\n /** If true inc and dec icon are swapped */\n swapIncDec?: boolean;\n /** Show the step arrows horizontally instead of vertically */\n horizontalArrows?: boolean;\n /** Show large step arrows */\n largeArrows?: boolean;\n /** Identifier passed to the input element */\n id?: string;\n}) {\n const valueRef = useRef<HTMLInputElement>(null);\n const [edited, setEdited] = useState(false);\n const [error, setError] = useState(false);\n useEffect(() => {\n if (valueRef.current) {\n if (props.hardwareValue === null) {\n valueRef.current.value = '';\n } else {\n valueRef.current.value = props.hardwareValue.toString();\n }\n setEdited(false);\n }\n }, [props.hardwareValue]);\n\n function updateRef(value: any) {\n let newValue = value;\n if (props.precision !== undefined) {\n newValue = Number.parseFloat(newValue).toFixed(props.precision);\n }\n if (valueRef?.current) {\n valueRef.current.value = newValue;\n }\n }\n\n function onBlur() {\n if (edited) {\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setEdited(false);\n }, 3000);\n }\n }\n\n function onChange(e: ChangeEvent<HTMLInputElement>) {\n if (props.hardwareValue === null) {\n return;\n }\n setEdited(true);\n if (valueRef?.current) {\n valueRef.current.value = e.target.value;\n }\n if (e.target.value === props.hardwareValue.toString()) {\n setEdited(false);\n }\n }\n\n function onStep(e: any) {\n setEdited(false);\n void props.onMoveRequested(e.target.value);\n }\n\n function onKeyDown(e: KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case 'Enter':\n {\n setEdited(false);\n // @ts-expect-error\n const value: number = Number.parseFloat(e.target.value);\n const promise = props.onMoveRequested(value);\n if (promise) {\n promise.catch(() => {\n setError(true);\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setError(false);\n }, 2000);\n });\n }\n }\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'Esc': // IE/Edge specific value\n case 'Escape':\n if (edited) {\n setError(false);\n setEdited(false);\n updateRef(props.hardwareValue);\n }\n // @ts-expect-error\n e.target.blur();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n return (\n <NumericStep\n id={props.id}\n className={classNames({\n 'form-control-edited': edited,\n 'form-control-error': error,\n 'hw-moving': props.hardwareIsMoving,\n })}\n type={props.readOnly ? 'text' : 'number'}\n ref={valueRef}\n precision={props.precision}\n onChange={onChange}\n onBlur={onBlur}\n onStep={onStep}\n onKeyDown={onKeyDown}\n disabled={\n props.hardwareIsDisabled || props.readOnly || !props.hardwareIsReady\n }\n step={props.step}\n steps={props.steps}\n incIcon={props.incIcon}\n decIcon={props.decIcon}\n swapIncDec={props.swapIncDec}\n horizontalArrows={props.horizontalArrows}\n largeArrows={props.largeArrows}\n overlay={\n props.hardwareIsMoving && !props.hardwareIsDisabled ? (\n <Button variant=\"danger\" onClick={props.onAbortRequested}>\n <i className=\"fa fa-times\" />\n </Button>\n ) : null\n }\n />\n );\n}\n","import { useEffect, useRef, useState } from 'react';\nimport type { KeyboardEvent, ChangeEvent } from 'react';\nimport { Form } from 'react-bootstrap';\nimport classNames from 'classnames';\n\n/**\n * Input number synchronized with a hardware.\n *\n * Input related to hardware have specificities because the hardware state can\n * change during the user interaction.\n *\n * TODO: Maybe normalize `precision` and `step` together\n */\nexport default function HardwareInputNumber(props: {\n hardwareValue: number;\n hardwareIsDisabled: boolean;\n hardwareIsMoving?: boolean;\n hardwareIsReady?: boolean;\n onMoveRequested: (value: number) => Promise<void> | null;\n onAbortRequested?: () => void;\n readOnly?: boolean;\n precision?: number;\n step?: number;\n}) {\n const valueRef = useRef<HTMLInputElement>(null);\n const [edited, setEdited] = useState(false);\n const [error, setError] = useState(false);\n\n function normalizeNumber(value: string): string {\n if (props.precision !== undefined) {\n return Number.parseFloat(value).toFixed(props.precision);\n }\n return value;\n }\n\n useEffect(() => {\n if (valueRef.current) {\n valueRef.current.value = normalizeNumber(props.hardwareValue?.toString());\n setEdited(false);\n }\n }, [props.hardwareValue, props.precision]);\n\n function updateRef(value: any) {\n const newValue = normalizeNumber(value);\n if (valueRef?.current) {\n valueRef.current.value = newValue;\n }\n }\n\n function onKeyDown(e: KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case 'Enter': {\n setEdited(false);\n // @ts-expect-error\n const value: number = Number.parseFloat(e.target.value);\n const promise = props.onMoveRequested(value);\n if (promise) {\n promise.catch(() => {\n setError(true);\n setTimeout(() => {\n updateRef(props.hardwareValue);\n setError(false);\n }, 2000);\n });\n }\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n case 'Esc': // IE/Edge specific value\n case 'Escape':\n if (edited) {\n setError(false);\n setEdited(false);\n updateRef(props.hardwareValue);\n }\n // @ts-expect-error\n e.target.blur();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n function onChange(e: ChangeEvent<HTMLInputElement>) {\n setEdited(true);\n const { name } = e.target;\n if (valueRef?.current) {\n valueRef.current.value = e.target.value;\n }\n if (e.target.value === props.hardwareValue.toString()) {\n setEdited(false);\n }\n }\n\n return (\n <Form.Control\n className={classNames({\n 'form-control-edited': edited,\n 'form-control-error': error,\n 'hw-moving': props.hardwareIsMoving,\n })}\n type=\"number\"\n ref={valueRef}\n onChange={onChange}\n onKeyDown={onKeyDown}\n disabled={\n props.readOnly || props.hardwareIsMoving || props.hardwareIsDisabled\n }\n step={props.step}\n />\n );\n}\n","import {\n Button,\n Form,\n OverlayTrigger,\n InputGroup,\n Popover,\n} from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport HardwareTemplate from './utils/HardwareTemplate';\nimport { MotorState } from './utils/State';\nimport HardwareNumericStep from './utils/HardwareNumericStep';\nimport HardwareInputNumber from './utils/HardwareInputNumber';\nimport type { MotorSchema } from './utils/schema';\nimport type {\n HardwareWidgetProps,\n HardwareWidgetOptions,\n EditableHardware,\n} from './utils/types';\n\ninterface MotorOverlayProps {\n hardware: EditableHardware<MotorSchema>;\n disabled: boolean;\n readOnly?: boolean;\n}\n\nfunction MotorOverlay(props: MotorOverlayProps) {\n function onMoveVelocityRequested(target: number) {\n return props.hardware.requestChange({\n property: 'velocity',\n value: target,\n });\n }\n\n function onMoveAccelerationRequested(target: number) {\n return props.hardware.requestChange({\n property: 'acceleration',\n value: target,\n });\n }\n\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n\n return (\n <OverlayTrigger\n trigger=\"click\"\n rootClose\n overlay={\n <Popover id=\"popid\">\n <Popover.Header>{props.hardware.name} details</Popover.Header>\n <Popover.Body>\n <Form.Group>\n <Form.Label>Velocity</Form.Label>\n <HardwareInputNumber\n hardwareValue={props.hardware.properties.velocity}\n onMoveRequested={onMoveVelocityRequested}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n readOnly={props.readOnly}\n />\n </Form.Group>\n <Form.Group>\n <Form.Label>Acceleration</Form.Label>\n <HardwareInputNumber\n hardwareValue={props.hardware.properties.acceleration}\n onMoveRequested={onMoveAccelerationRequested}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n readOnly={props.readOnly}\n />\n </Form.Group>\n </Popover.Body>\n </Popover>\n }\n >\n <Button>\n <i className=\"fa fa-ellipsis-h\" />\n </Button>\n </OverlayTrigger>\n );\n}\n\nexport interface MotorDefaultOptions extends HardwareWidgetOptions {\n /** Default step size to use for up / down arrows */\n step?: number;\n /** Array of selectable step sizes */\n steps?: number[];\n /** Number of decimals to show */\n precision?: number;\n /** Whether to show popup to configure extended parameters */\n extended?: boolean;\n /** Whether this widget is read only */\n readOnly?: boolean;\n /** Kind of header displayed */\n header?: string;\n /** Specify a fontawesome to inc the value */\n incicon?: string;\n /** Specify a fontawesome to dec the value */\n decicon?: string;\n /** If true inc and dec icon are swapped */\n swapincdec?: boolean;\n /** Show the step arrows horizontally instead of vertically */\n horizontalarrows?: boolean;\n /** Show large step arrows */\n largearrows?: boolean;\n}\n\n/**\n * The default motor widget\n */\nexport default function MotorDefault(\n props: HardwareWidgetProps<MotorSchema, MotorDefaultOptions>\n) {\n const { hardware, options = {} } = props;\n function onAbortRequested() {\n void hardware.requestChange({\n function: 'stop',\n });\n }\n\n function onMovePositionRequested(target: number) {\n return hardware.requestChange({\n property: 'position',\n value: target,\n function: 'move',\n });\n }\n\n let s1 = 'UNKNOWN';\n if (props.hardware.properties.state) {\n [s1] = props.hardware.properties.state;\n }\n\n const widgetIcon = (\n <TypeIcon name=\"Motor\" icon=\"fam-hardware-motor\" online={hardware.online} />\n );\n\n const widgetState = <MotorState hardware={hardware} />;\n\n const headerMode = props.options ? props.options.header : 'top';\n\n return (\n <HardwareTemplate\n hardware={hardware}\n widgetIcon={widgetIcon}\n widgetState={widgetState}\n widgetContent={\n <InputGroup>\n <HardwareNumericStep\n id={hardware.id}\n hardwareValue={hardware.properties.position}\n hardwareIsDisabled={props.disabled}\n hardwareIsReady={s1 === 'READY'}\n hardwareIsMoving={s1 === 'MOVING'}\n onMoveRequested={onMovePositionRequested}\n onAbortRequested={onAbortRequested}\n precision={options.precision}\n readOnly={options.readOnly}\n step={options.step}\n steps={options.steps}\n incIcon={options.incicon}\n decIcon={options.decicon}\n swapIncDec={options.swapincdec}\n horizontalArrows={options.horizontalarrows}\n largeArrows={options.largearrows}\n />\n {hardware.properties.unit && (\n <InputGroup.Text>{hardware.properties.unit}</InputGroup.Text>\n )}\n\n {s1 !== 'MOVING' && options.extended && (\n <MotorOverlay\n hardware={hardware}\n disabled={props.disabled}\n readOnly={options.readOnly}\n />\n )}\n\n {s1 === 'MOVING' && !props.disabled && !options.step && (\n <Button variant=\"danger\" onClick={onAbortRequested}>\n <i className=\"fa fa-times\" />\n </Button>\n )}\n </InputGroup>\n }\n headerMode={headerMode}\n />\n );\n}\n","import { useRef, useEffect } from 'react';\nimport { map } from 'lodash';\nimport { Badge, Button, InputGroup, Form } from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport type { MultipositionSchema } from './utils/schema';\nimport type { HardwareWidgetProps } from './utils/types';\n\nexport default function Multiposition(\n props: HardwareWidgetProps<MultipositionSchema>\n) {\n const { hardware, options = {} } = props;\n const selectionRef = useRef<HTMLSelectElement>(null);\n\n useEffect(() => {\n if (!selectionRef.current) {\n console.error('selectionRef ref is unset');\n return;\n }\n selectionRef.current.value = hardware.properties.position;\n }, [hardware.properties.position]);\n\n function onMove(e: any) {\n console.debug('change', e);\n if (!selectionRef || !selectionRef.current) {\n console.error('selection ref is unset');\n return;\n }\n void hardware.requestChange({\n value: selectionRef.current.value,\n function: 'move',\n });\n }\n\n function stop(e: any) {\n void hardware.requestChange({\n function: 'stop',\n });\n }\n\n const opts = map(hardware.properties.positions, (p) => (\n <option key={p.position} title={p.description}>\n {p.position}\n </option>\n ));\n\n return (\n <div className=\"hw-component\">\n <div className=\"hw-head\">\n <TypeIcon\n name=\"Multiposition\"\n icon=\"fam-hardware-multiposition\"\n online={hardware.online}\n />\n <div className=\"name\">{hardware.name}</div>\n <Badge\n bg={hardware.properties.state === 'READY' ? 'success' : 'warning'}\n >\n {hardware.properties.state}\n </Badge>\n </div>\n <div className=\"hw-content\">\n <InputGroup>\n <Form.Control\n className=\"custom-select\"\n as=\"select\"\n ref={selectionRef}\n disabled={props.disabled}\n defaultValue={hardware.properties.position}\n >\n <option disabled>unknown</option>\n {opts}\n </Form.Control>\n {hardware.properties.state !== 'MOVING' && (\n <Button onClick={onMove} disabled={props.disabled}>\n Move\n </Button>\n )}\n\n {hardware.properties.state === 'MOVING' && !props.disabled && (\n <Button variant=\"danger\" onClick={stop}>\n <i className=\"fa fa-times\" />\n </Button>\n )}\n </InputGroup>\n </div>\n </div>\n );\n}\n","import debug from 'debug';\n\nimport TypeIcon from './TypeIcon';\nimport HardwareTemplate from './utils/HardwareTemplate';\nimport type { Hardware } from './utils/types';\n\nconst logger = debug('daiquiri.components.hardware.NoObject');\n\ninterface NoObjectProps {\n id: string;\n name?: string;\n options: {\n header?: string;\n emptyifnone?: boolean;\n };\n}\n\nexport default function NoObject(props: NoObjectProps) {\n if (props.options.emptyifnone) {\n logger(\n 'Component id:\"%s\" name:\"%s\" not displayed cause setup with emptyifnone.',\n props.id,\n props.name\n );\n return <></>;\n }\n\n const widgetIcon = (\n <TypeIcon name=\"NoObject\" icon=\"fam-hardware-any\" online={false} />\n );\n\n const widgetState = <></>;\n\n const widgetContent = <>Missing</>;\n\n const headerMode = props.options ? props.options.header : 'top';\n\n const hardware: Hardware = {\n id: props.id,\n name: props.name ?? '',\n alias: null,\n online: false,\n properties: {},\n type: '',\n };\n\n return (\n <HardwareTemplate\n hardware={hardware}\n widgetIcon={widgetIcon}\n widgetState={widgetState}\n widgetContent={widgetContent}\n headerMode={headerMode}\n />\n );\n}\n","import { InputGroup, Form, Badge } from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport HardwareTemplate from './utils/HardwareTemplate';\nimport type { GenericSchema } from './utils/schema';\nimport type { HardwareWidgetProps, HardwareWidgetOptions } from './utils/types';\n\nfunction DeviceState(props: GenericSchema) {\n const state = props.online ? 'READY' : 'OFFLINE';\n return <Badge bg={state === 'READY' ? 'success' : 'warning'}>{state}</Badge>;\n}\n\ninterface PropertyWidgetOptions extends HardwareWidgetOptions {\n header?: string;\n property?: string;\n unit?: string;\n}\n\nexport default function Property(\n props: HardwareWidgetProps<GenericSchema, PropertyWidgetOptions>\n) {\n const { hardware, options = {} } = props;\n const widgetIcon = (\n <TypeIcon name=\"Optic\" icon=\"fa-cog\" online={hardware.online} />\n );\n\n const widgetState = <DeviceState {...hardware} />;\n\n function getValue() {\n const propertyName = options.property;\n if (propertyName === undefined) {\n return `property is not set`;\n }\n if (propertyName === null) {\n return `property is null`;\n }\n let result: any = hardware;\n for (const segment of propertyName.split('/')) {\n result = result[segment];\n if (result === undefined) {\n return `property '${propertyName}' not found`;\n }\n }\n return `${result}`;\n }\n\n function getUnit() {\n const unitName = options.unit;\n if (!unitName) {\n return null;\n }\n if (!unitName.includes('properties')) {\n // That's a fixed unit defined as an option\n return unitName;\n }\n\n let result: any = props;\n for (const segment of unitName.split('/')) {\n result = result[segment];\n if (result === undefined) {\n return null;\n }\n }\n return `${result}`;\n }\n\n const unit = getUnit();\n\n const widgetContent = (\n <InputGroup>\n <Form.Control value={getValue()} readOnly />\n {unit && <InputGroup.Text>{unit}</InputGroup.Text>}\n </InputGroup>\n );\n\n const headerMode = props.options.header || 'top';\n\n return (\n <HardwareTemplate\n hardware={hardware}\n widgetIcon={widgetIcon}\n widgetState={widgetState}\n widgetContent={widgetContent}\n headerMode={headerMode}\n />\n );\n}\n","import { Button, OverlayTrigger, Popover, ButtonGroup } from 'react-bootstrap';\n\nimport TypeIcon from './TypeIcon';\nimport HardwareTemplate from './utils/HardwareTemplate';\nimport { ShutterState } from './utils/State';\nimport type { ShutterSchema } from './utils/schema';\nimport type { HardwareWidgetProps, HardwareWidgetOptions } from './utils/types';\n\nfunction ShutterOverlay(\n props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>\n) {\n const { hardware } = props;\n const reset = () => {\n void hardware.requestChange({\n function: 'reset',\n });\n };\n\n return (\n <OverlayTrigger\n trigger=\"click\"\n rootClose\n overlay={\n <Popover id=\"popid\">\n <Popover.Header>{hardware.name} Details</Popover.Header>\n <Popover.Body>\n <h6>Status</h6>\n <pre>{hardware.properties.status}</pre>\n <div className=\"d-grid gap-2\">\n <Button onClick={reset} disabled={props.disabled}>\n Reset\n </Button>\n </div>\n </Popover.Body>\n </Popover>\n }\n >\n <Button className=\"flex-grow-0\" title=\"Shutter Details\">\n <i className=\"fa fa-ellipsis-h\" />\n </Button>\n </OverlayTrigger>\n );\n}\n\nexport default function ShutterDefault(\n props: HardwareWidgetProps<ShutterSchema, HardwareWidgetOptions>\n) {\n const { hardware, options = {} } = props;\n const widgetIcon = (\n <TypeIcon\n name=\"Shutter\"\n icon=\"fam-hardware-shutter\"\n online={hardware.online}\n />\n );\n\n const widgetState = <ShutterState hardware={hardware} />;\n\n function getState() {\n if (!hardware.properties) {\n return 'UNKNOWN';\n }\n return hardware.properties.state;\n }\n\n function getAction(s: string) {\n if (s === 'OPEN') {\n return ['Close', 'close'];\n }\n if (s === 'CLOSED') {\n return ['Open', 'open'];\n }\n if (s === 'DISABLED' || s === 'STANDBY' || s === 'FAULT') {\n return ['Closed', ''];\n }\n if (s === 'MOVING') {\n return ['...', ''];\n }\n return ['Unknown', ''];\n }\n\n const state = getState();\n // console.log(state);\n const [label, action] = getAction(state);\n const variants: { [name: string]: string } = {\n OPEN: 'danger',\n CLOSED: 'success',\n MOVING: 'warning',\n DISABLED: 'secondary',\n STANDBY: 'danger',\n FAULT: 'fatal',\n UNKNOWN: 'warning',\n };\n const variant = variants[state] || 'danger';\n\n function onClick() {\n void hardware.requestChange({\n function: action,\n });\n }\n\n const widgetContent = (\n <ButtonGroup className=\"d-flex flex-nowrap\">\n <Button\n variant={variant}\n onClick={onClick}\n disabled={props.disabled || action === ''}\n >\n {label}\n </Button>\n\n {options.extended && <ShutterOverlay {...props} />}\n </ButtonGroup>\n );\n\n const headerMode = props.options.header || 'top';\n\n return (\n <HardwareTemplate\n hardware={hardware}\n widgetIcon={widgetIcon}\n widgetState={widgetState}\n widgetContent={widgetContent}\n headerMode={headerMode}\n />\n );\n}\n","import type { PropsWithChildren } from 'react';\nimport { useEffect, useRef, useState } from 'react';\n\ninterface Props {\n className?: string;\n}\n\nexport default function FullSizer(props: PropsWithChildren<Props>) {\n const [state, setState] = useState<Record<string, number>>({});\n const containerRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (containerRef.current) {\n const view = containerRef.current;\n setState({\n width: view.clientWidth,\n height: view.clientHeight,\n });\n }\n }, []);\n\n return (\n <div\n ref={containerRef}\n style={{ width: '100%', height: '100%' }}\n className={props.className}\n >\n {state.width > 0 && (\n <div\n className=\"full-sizer\"\n style={{\n width: `${state.width}px`,\n height: `${state.height}px`,\n overflow: 'scroll',\n }}\n >\n {props.children}\n </div>\n )}\n </div>\n );\n}\n"],"names":["OnlineStatus","props","activeMessage","inactiveMessage","message","jsx","TypeIcon","name","icon","jsxs","formatEng","scalar","powerPrefix","q","subtrhnd","pow10","prefix","ucfirst","str","toHoursMins","seconds","min","mins","hours","toEnergy","wavelength","round","value","digits","FrontendOverlay","hardware","reset","e","itlks","ring","getPropertyState","key","state","OverlayTrigger","Popover","Container","map","Row","Col","Badge","prop","Button","Frontend","options","onClick","ButtonGroup","Info","getValue","propertyName","result","segment","Fragment","HardwareTemplate","headerMode","getLabel","label","Form","error","HardwareState","style","MotorState","getState","s1","ShutterState","s","getVariant","NumericStep","forwardRef","ref","stepSizeRef","useRef","currentStep","setCurrentStep","useState","onStep","up","ref2","val","stepSize","onStepProp","step","overlay","incIcon","decIcon","swapIncDec","onKeyDown","horizontalArrows","largeArrows","rest","onKeyDown2","steps","classNames","InputGroup","NumericStep$1","HardwareNumericStep","valueRef","edited","setEdited","setError","useEffect","updateRef","newValue","onBlur","onChange","promise","HardwareInputNumber","normalizeNumber","_a","MotorOverlay","onMoveVelocityRequested","target","onMoveAccelerationRequested","MotorDefault","onAbortRequested","onMovePositionRequested","widgetIcon","widgetState","Multiposition","selectionRef","onMove","stop","opts","p","logger","debug","NoObject","widgetContent","DeviceState","Property","getUnit","unitName","unit","ShutterOverlay","ShutterDefault","getAction","action","variant","FullSizer","setState","containerRef","view"],"mappings":"0SAQO,SAASA,EAAaC,EAAc,CACnC,KAAA,CACJ,cAAAC,EAAgB,SAChB,gBAAAC,EAAkB,UAClB,QAAAC,EAAU,gBACR,EAAAH,EAGF,OAAAI,EAAA,IAAC,MAAA,CACC,UAAW,0BACTJ,EAAM,OAAS,UAAY,QAC7B,GACA,MAAO,GAAGG,CAAO,IAAIH,EAAM,OAASC,EAAgBC,CAAe,EAAA,CAAA,CAGzE,CAEA,SAAwBG,EAASL,EAAc,CACvC,KAAA,CAAE,KAAAM,EAAM,KAAA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I,IAAW,GAEtC,SAAAhF,CAAA,CACH,EAECZ,EAAQ,UAAa3C,EAAA,IAAAoI,GAAA,CAAgB,GAAGxI,CAAO,CAAA,CAClD,CAAA,CAAA,EAGIyD,EAAazD,EAAM,QAAQ,QAAU,MAGzC,OAAAI,EAAA,IAACoD,EAAA,CACC,SAAA3B,EACA,WAAA0F,EACA,YAAAC,EACA,cAAAU,EACA,WAAAzE,CAAA,CAAA,CAGN,CCvHA,SAAwBoF,GAAU7I,EAAiC,CACjE,KAAM,CAACoC,EAAO0G,CAAQ,EAAIjE,EAAA,SAAiC,CAAE,CAAA,EACvDkE,EAAerE,SAAuB,IAAI,EAChD6B,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIwC,EAAa,QAAS,CACxB,MAAMC,EAAOD,EAAa,QACjBD,EAAA,CACP,MAAOE,EAAK,YACZ,OAAQA,EAAK,YAAA,CACd,CACH,CACF,EAAG,CAAE,CAAA,EAGH5I,EAAA,IAAC,MAAA,CACC,IAAK2I,EACL,MAAO,CAAE,MAAO,OAAQ,OAAQ,MAAO,EACvC,UAAW/I,EAAM,UAEhB,SAAAoC,EAAM,MAAQ,GACbhC,EAAA,IAAC,MAAA,CACC,UAAU,aACV,MAAO,CACL,MAAO,GAAGgC,EAAM,KAAK,KACrB,OAAQ,GAAGA,EAAM,MAAM,KACvB,SAAU,QACZ,EAEC,SAAMpC,EAAA,QAAA,CACT,CAAA,CAAA,CAIR"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esrf/daiquiri-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-alpha.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/styles.scss",
|
|
8
8
|
"src/scss/**/*"
|
|
9
9
|
],
|
|
10
|
-
"main": "
|
|
10
|
+
"main": "src/index.ts",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"module": "dist/index.esm.js",
|
|
14
|
+
"types": "dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.esm.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "vite build && run-p build:*",
|
|
25
|
+
"build:dts": "tsc --project tsconfig.build.json && rollup -c",
|
|
26
|
+
"lint:eslint": "eslint \"**/*.{js,cjs,ts,tsx}\" --max-warnings=0",
|
|
27
|
+
"lint:tsc": "tsc",
|
|
28
|
+
"test": "jest",
|
|
29
|
+
"analyze": "pnpm dlx source-map-explorer dist/index.js --no-border-checks",
|
|
30
|
+
"prepack": "pnpm dlx dot-json@latest package.json -d type"
|
|
31
|
+
},
|
|
11
32
|
"peerDependencies": {
|
|
12
33
|
"react": ">=17",
|
|
13
34
|
"react-dom": ">=17",
|
|
@@ -63,23 +84,5 @@
|
|
|
63
84
|
},
|
|
64
85
|
"author": "ESRF",
|
|
65
86
|
"license": "MIT",
|
|
66
|
-
"description": ""
|
|
67
|
-
|
|
68
|
-
"build": "vite build && run-p build:*",
|
|
69
|
-
"build:dts": "tsc --project tsconfig.build.json && rollup -c",
|
|
70
|
-
"lint:eslint": "eslint \"**/*.{js,cjs,ts,tsx}\" --max-warnings=0",
|
|
71
|
-
"lint:tsc": "tsc",
|
|
72
|
-
"test": "jest",
|
|
73
|
-
"analyze": "pnpm dlx source-map-explorer dist/index.js --no-border-checks"
|
|
74
|
-
},
|
|
75
|
-
"module": "dist/index.esm.js",
|
|
76
|
-
"types": "dist/index.d.ts",
|
|
77
|
-
"exports": {
|
|
78
|
-
"./styles.css": "./dist/styles.css",
|
|
79
|
-
".": {
|
|
80
|
-
"types": "./dist/index.d.ts",
|
|
81
|
-
"import": "./dist/index.esm.js",
|
|
82
|
-
"default": "./dist/index.js"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
87
|
+
"description": ""
|
|
88
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,28 @@
|
|
|
1
1
|
/* Hardware Objects */
|
|
2
|
+
export { default as Frontend } from './hardware/Frontend';
|
|
3
|
+
export { default as Info } from './hardware/Info';
|
|
2
4
|
export { default as MotorDefault } from './hardware/MotorDefault';
|
|
5
|
+
export { default as Multiposition } from './hardware/Multiposition';
|
|
6
|
+
export { default as NoObject } from './hardware/NoObject';
|
|
7
|
+
export { default as Property } from './hardware/Property';
|
|
8
|
+
export { default as ShutterDefault } from './hardware/ShutterDefault';
|
|
9
|
+
|
|
10
|
+
/* Hardware Object Options */
|
|
11
|
+
// TODO: Namespace Options into HardwareOptions
|
|
12
|
+
export type { MotorDefaultOptions } from './hardware/MotorDefault';
|
|
13
|
+
|
|
14
|
+
/* Helpers */
|
|
15
|
+
export { default as TypeIcon } from './hardware/TypeIcon';
|
|
16
|
+
export { default as HardwareTemplate } from './hardware/utils/HardwareTemplate';
|
|
17
|
+
export { default as HardwareInputNumber } from './hardware/utils/HardwareInputNumber';
|
|
18
|
+
export { default as HardwareNumericStep } from './hardware/utils/HardwareNumericStep';
|
|
19
|
+
export * as HardwareState from './hardware/utils/State';
|
|
20
|
+
export * as Formatting from './utils/formatting';
|
|
21
|
+
|
|
22
|
+
/* Components */
|
|
23
|
+
export { default as FullSizer } from './components/FullSizer';
|
|
24
|
+
export { default as NumericStep } from './components/NumericStep';
|
|
25
|
+
|
|
26
|
+
/* Types */
|
|
27
|
+
export * as HardwareTypes from './hardware/utils/types';
|
|
28
|
+
export * as HardwareSchema from './hardware/utils/schema';
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
button {
|
|
2
|
+
/*.dot-indicator & {*/
|
|
3
|
+
position: relative;
|
|
4
|
+
/*}*/
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.dot-indicator {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: -5px;
|
|
10
|
+
right: -5px;
|
|
11
|
+
width: 12px;
|
|
12
|
+
height: 12px;
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
|
|
15
|
+
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
|
16
|
+
|
|
17
|
+
&.small {
|
|
18
|
+
top: -2px;
|
|
19
|
+
right: -2px;
|
|
20
|
+
width: 8px;
|
|
21
|
+
height: 8px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
.numeric-step {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex: 1;
|
|
5
|
+
|
|
6
|
+
/* Disable default arrows for numeric type */
|
|
7
|
+
/* Chrome, Safari, Edge, Opera */
|
|
8
|
+
input::-webkit-outer-spin-button,
|
|
9
|
+
input::-webkit-inner-spin-button {
|
|
10
|
+
margin: 0;
|
|
11
|
+
appearance: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Firefox */
|
|
15
|
+
[type='number'] {
|
|
16
|
+
appearance: textfield;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
input {
|
|
20
|
+
flex: 1;
|
|
21
|
+
border-bottom-right-radius: 0;
|
|
22
|
+
border-top-right-radius: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.input-group-text {
|
|
26
|
+
padding: 0 !important;
|
|
27
|
+
padding-right: 20px !important;
|
|
28
|
+
margin: 0 !important;
|
|
29
|
+
border-bottom-left-radius: 0;
|
|
30
|
+
border-top-left-radius: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.step {
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 0;
|
|
36
|
+
width: 20px;
|
|
37
|
+
height: calc(50% - 1px);
|
|
38
|
+
padding: 0;
|
|
39
|
+
border: none;
|
|
40
|
+
margin: 0;
|
|
41
|
+
background: #ced4da;
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
color: #495057;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background: lighten(#ced4da, 3%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&::before {
|
|
50
|
+
display: block;
|
|
51
|
+
font-family: FontAwesome;
|
|
52
|
+
font-size: 0.8rem;
|
|
53
|
+
line-height: 0.5rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.step-up {
|
|
58
|
+
top: 1px;
|
|
59
|
+
|
|
60
|
+
&::before {
|
|
61
|
+
content: '\f106';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.step-down {
|
|
66
|
+
bottom: 1px;
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
content: '\f107';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.step-size {
|
|
74
|
+
width: auto;
|
|
75
|
+
height: auto;
|
|
76
|
+
flex: 1;
|
|
77
|
+
border: none;
|
|
78
|
+
background: none;
|
|
79
|
+
font-size: 0.6rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.numeric-step-horizontal {
|
|
83
|
+
.input-group-text {
|
|
84
|
+
padding-right: 30px !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.step {
|
|
88
|
+
width: 15px;
|
|
89
|
+
height: calc(100% - 2px);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.step-up {
|
|
93
|
+
top: 1px;
|
|
94
|
+
right: 0;
|
|
95
|
+
|
|
96
|
+
&::before {
|
|
97
|
+
content: '\f105';
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.step-down {
|
|
102
|
+
top: 1px;
|
|
103
|
+
right: 15px;
|
|
104
|
+
|
|
105
|
+
&::before {
|
|
106
|
+
content: '\f104';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.numeric-step-large {
|
|
112
|
+
.input-group-text {
|
|
113
|
+
padding-right: 40px !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.step {
|
|
117
|
+
width: 40px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.numeric-step-horizontal {
|
|
121
|
+
.input-group-text {
|
|
122
|
+
padding-right: 50px !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.step {
|
|
126
|
+
width: 25px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.step-down {
|
|
130
|
+
right: 25px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:last-child {
|
|
136
|
+
.step-up {
|
|
137
|
+
border-top-right-radius: 0.25rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.step-down {
|
|
141
|
+
border-bottom-right-radius: 0.25rem;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:not(:last-child) {
|
|
146
|
+
.input-group & {
|
|
147
|
+
.input-group-text {
|
|
148
|
+
border-bottom-right-radius: 0;
|
|
149
|
+
border-top-right-radius: 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
package/src/scss/main.scss
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 ui
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|