@adcops/autocore-react 3.3.106 → 3.3.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/assets/JogXLeft.d.ts +4 -0
  2. package/dist/assets/JogXLeft.d.ts.map +1 -0
  3. package/dist/assets/JogXLeft.js +1 -0
  4. package/dist/assets/JogXRight.d.ts +4 -0
  5. package/dist/assets/JogXRight.d.ts.map +1 -0
  6. package/dist/assets/JogXRight.js +1 -0
  7. package/dist/assets/index.d.ts +2 -2
  8. package/dist/assets/index.d.ts.map +1 -1
  9. package/dist/assets/index.js +1 -1
  10. package/dist/components/JogPanel.d.ts +29 -4
  11. package/dist/components/JogPanel.d.ts.map +1 -1
  12. package/dist/components/JogPanel.js +1 -1
  13. package/dist/components/ValueInput.d.ts.map +1 -1
  14. package/dist/components/ValueInput.js +1 -1
  15. package/dist/components/index.d.ts +2 -0
  16. package/dist/components/index.d.ts.map +1 -1
  17. package/dist/components/index.js +1 -1
  18. package/dist/components/network/StagedChangeBanner.d.ts.map +1 -1
  19. package/dist/components/network/StagedChangeBanner.js +1 -1
  20. package/dist/components/tis/ResultHistoryTable.css +12 -0
  21. package/dist/components/tis/ResultHistoryTable.d.ts +1 -0
  22. package/dist/components/tis/ResultHistoryTable.d.ts.map +1 -1
  23. package/dist/components/tis/ResultHistoryTable.js +1 -1
  24. package/dist/components/tis/SampleSummaryPanel.d.ts +23 -0
  25. package/dist/components/tis/SampleSummaryPanel.d.ts.map +1 -0
  26. package/dist/components/tis/SampleSummaryPanel.js +1 -0
  27. package/dist/components/tis/ScienceTable.css +87 -0
  28. package/dist/components/tis/ScienceTable.d.ts +35 -0
  29. package/dist/components/tis/ScienceTable.d.ts.map +1 -0
  30. package/dist/components/tis/ScienceTable.js +1 -0
  31. package/dist/components/tis/TestDataView.d.ts.map +1 -1
  32. package/dist/components/tis/TestDataView.js +1 -1
  33. package/dist/components/tis/TestSetupForm.d.ts.map +1 -1
  34. package/dist/components/tis/TestSetupForm.js +1 -1
  35. package/dist/components/tis-editor/editor/FieldArrayEditor.d.ts.map +1 -1
  36. package/dist/components/tis-editor/editor/FieldArrayEditor.js +1 -1
  37. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts +6 -0
  38. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts.map +1 -1
  39. package/dist/components/tis-editor/editor/TestFieldDialog.js +1 -1
  40. package/dist/components/tis-editor/types.d.ts +15 -0
  41. package/dist/components/tis-editor/types.d.ts.map +1 -1
  42. package/dist/components/tis-editor/validation.d.ts.map +1 -1
  43. package/dist/components/tis-editor/validation.js +1 -1
  44. package/package.json +1 -1
  45. package/src/assets/{JogXNeg.tsx → JogXLeft.tsx} +6 -3
  46. package/src/assets/{JogXPos.tsx → JogXRight.tsx} +6 -3
  47. package/src/assets/index.ts +2 -2
  48. package/src/components/JogPanel.tsx +64 -59
  49. package/src/components/ValueInput.tsx +10 -3
  50. package/src/components/index.ts +3 -0
  51. package/src/components/network/StagedChangeBanner.tsx +22 -3
  52. package/src/components/tis/ResultHistoryTable.css +12 -0
  53. package/src/components/tis/ResultHistoryTable.tsx +76 -4
  54. package/src/components/tis/SampleSummaryPanel.tsx +171 -0
  55. package/src/components/tis/ScienceTable.css +87 -0
  56. package/src/components/tis/ScienceTable.tsx +114 -0
  57. package/src/components/tis/TestDataView.tsx +92 -51
  58. package/src/components/tis/TestSetupForm.tsx +18 -2
  59. package/src/components/tis-editor/editor/FieldArrayEditor.tsx +18 -1
  60. package/src/components/tis-editor/editor/TestFieldDialog.tsx +82 -1
  61. package/src/components/tis-editor/types.ts +17 -0
  62. package/src/components/tis-editor/validation.ts +35 -0
  63. package/dist/assets/JogXNeg.d.ts +0 -4
  64. package/dist/assets/JogXNeg.d.ts.map +0 -1
  65. package/dist/assets/JogXNeg.js +0 -1
  66. package/dist/assets/JogXPos.d.ts +0 -4
  67. package/dist/assets/JogXPos.d.ts.map +0 -1
  68. package/dist/assets/JogXPos.js +0 -1
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from "react";
2
+ export declare const SvgJogXLeft: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export default SvgJogXLeft;
4
+ //# sourceMappingURL=JogXLeft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JogXLeft.d.ts","sourceRoot":"","sources":["../../src/assets/JogXLeft.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CAkBzD,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const SvgJogXLeft=t=>_jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[_jsx("path",{d:"M10 6 3 12 10 18Z",fill:"currentColor"}),_jsx("path",{d:"M14 6l8 12M22 6l-8 12"})]});export default SvgJogXLeft;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from "react";
2
+ export declare const SvgJogXRight: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export default SvgJogXRight;
4
+ //# sourceMappingURL=JogXRight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JogXRight.d.ts","sourceRoot":"","sources":["../../src/assets/JogXRight.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,YAAY,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CAkB1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const SvgJogXRight=t=>_jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[_jsx("path",{d:"M2 6l8 12M10 6l-8 12"}),_jsx("path",{d:"M14 6 21 12 14 18Z",fill:"currentColor"})]});export default SvgJogXRight;
@@ -3,8 +3,8 @@ export { default as Distance } from "./Distance";
3
3
  export { default as JogLong } from "./JogLong";
4
4
  export { default as JogMedium } from "./JogMedium";
5
5
  export { default as JogShort } from "./JogShort";
6
- export { default as JogXPos } from "./JogXPos";
7
- export { default as JogXNeg } from "./JogXNeg";
6
+ export { default as JogXRight } from "./JogXRight";
7
+ export { default as JogXLeft } from "./JogXLeft";
8
8
  export { default as JogYPos } from "./JogYPos";
9
9
  export { default as JogYNeg } from "./JogYNeg";
10
10
  export { default as JogZPos } from "./JogZPos";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OA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E,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -1 +1 @@
1
- export{default as BlocklyLogo}from"./BlocklyLogo";export{default as Distance}from"./Distance";export{default as JogLong}from"./JogLong";export{default as JogMedium}from"./JogMedium";export{default as JogShort}from"./JogShort";export{default as JogXPos}from"./JogXPos";export{default as JogXNeg}from"./JogXNeg";export{default as JogYPos}from"./JogYPos";export{default as JogYNeg}from"./JogYNeg";export{default as JogZPos}from"./JogZPos";export{default as JogZNeg}from"./JogZNeg";export{default as On}from"./On";export{default as Off}from"./Off";export{default as PythonLogo}from"./PythonLogo";export{default as Rotation3D}from"./Rotation3D";export{default as RotationCcw}from"./RotationCcw";export{default as RotationCcwA}from"./RotationCcwA";export{default as RotationCcwB}from"./RotationCcwB";export{default as RotationCcwC}from"./RotationCcwC";export{default as RotationCw}from"./RotationCw";export{default as RotationCwA}from"./RotationCwA";export{default as RotationCwB}from"./RotationCwB";export{default as RotationCwC}from"./RotationCwC";export{default as Run}from"./Run";export{default as Speed}from"./Speed";export{default as SpeedFast}from"./SpeedFast";export{default as SpeedMedium}from"./SpeedMedium";export{default as SpeedNone}from"./SpeedNone";export{default as SpeedSlow}from"./SpeedSlow";export{default as Walk}from"./Walk";
1
+ export{default as BlocklyLogo}from"./BlocklyLogo";export{default as Distance}from"./Distance";export{default as JogLong}from"./JogLong";export{default as JogMedium}from"./JogMedium";export{default as JogShort}from"./JogShort";export{default as JogXRight}from"./JogXRight";export{default as JogXLeft}from"./JogXLeft";export{default as JogYPos}from"./JogYPos";export{default as JogYNeg}from"./JogYNeg";export{default as JogZPos}from"./JogZPos";export{default as JogZNeg}from"./JogZNeg";export{default as On}from"./On";export{default as Off}from"./Off";export{default as PythonLogo}from"./PythonLogo";export{default as Rotation3D}from"./Rotation3D";export{default as RotationCcw}from"./RotationCcw";export{default as RotationCcwA}from"./RotationCcwA";export{default as RotationCcwB}from"./RotationCcwB";export{default as RotationCcwC}from"./RotationCcwC";export{default as RotationCw}from"./RotationCw";export{default as RotationCwA}from"./RotationCwA";export{default as RotationCwB}from"./RotationCwB";export{default as RotationCwC}from"./RotationCwC";export{default as Run}from"./Run";export{default as Speed}from"./Speed";export{default as SpeedFast}from"./SpeedFast";export{default as SpeedMedium}from"./SpeedMedium";export{default as SpeedNone}from"./SpeedNone";export{default as SpeedSlow}from"./SpeedSlow";export{default as Walk}from"./Walk";
@@ -41,6 +41,17 @@ export declare enum JogSpeedAction {
41
41
  * Jog button definition type for defining the button in the JogPanel.
42
42
  */
43
43
  export interface JogPanelButtonDefinition {
44
+ /**
45
+ * Direction key selecting the arrow icon shown on the button, e.g.
46
+ * `jog_x_left`, `jog_x_right`, `jog_y_up_right`, `jog_y_down_left`,
47
+ * `jog_z_up`, `jog_z_down`, or the rotation keys `rot_{a|b|c}_{cw|ccw}`.
48
+ *
49
+ * Deliberately independent of `action`: which physical direction a
50
+ * machine's "jog X positive" moves is not consistent across machines,
51
+ * so the icon (what the operator sees) is chosen here by direction while
52
+ * `action` carries the polarity sent to the control program. See
53
+ * `selectIcon`. Legacy `pi pi-arrow-*` values are still accepted.
54
+ */
44
55
  icon: string;
45
56
  alt: string;
46
57
  action: JogPanelAction;
@@ -87,10 +98,14 @@ export declare const DefaultRotationJogButtons: (JogPanelButtonDefinition | unde
87
98
  * Example:
88
99
  * ```
89
100
  * export const kDefaultButtonDefinitions : (JogPanelButtonDefinition | undefined)[][] = [
90
- * [undefined, { icon: "pi pi-arrow-up", action: JogPanelAction.zPositive, alt: "Z Positive" }, { icon: "pi pi-arrow-down-left", action: JogPanelAction.yNegative, alt: "Y Negative" }],
91
- * [{ icon: "pi pi-arrow-left", action: JogPanelAction.xNegative, alt: "X Negative" }, undefined, { icon: "pi pi-arrow-right", action: JogPanelAction.xPositive, alt: "X Positive" }],
92
- * [{ icon: "pi pi-arrow-up-right", action: JogPanelAction.yPositive, alt: "Y Positive" }, { icon: "pi pi-arrow-down", action: JogPanelAction.zNegative, alt: "Z Negative" }, undefined],
101
+ * [undefined, { icon: "jog_z_up", action: JogPanelAction.zPositive, alt: "Z Positive" }, { icon: "jog_y_down_left", action: JogPanelAction.yNegative, alt: "Y Negative" }],
102
+ * [{ icon: "jog_x_left", action: JogPanelAction.xNegative, alt: "X Negative" }, undefined, { icon: "jog_x_right", action: JogPanelAction.xPositive, alt: "X Positive" }],
103
+ * [{ icon: "jog_y_up_right", action: JogPanelAction.yPositive, alt: "Y Positive" }, { icon: "jog_z_down", action: JogPanelAction.zNegative, alt: "Z Negative" }, undefined],
93
104
  * ];
105
+ *
106
+ * // The icon is chosen by direction, not polarity: on a machine where
107
+ * // "X positive" jogs left, give that button `icon: "jog_x_left"` while
108
+ * // keeping `action: JogPanelAction.xPositive`.
94
109
  * ```
95
110
  *
96
111
  */
@@ -111,7 +126,17 @@ export declare class JogPanel extends React.Component<JogPanelProps, JogPanelSta
111
126
  private handleDistanceChanged;
112
127
  private handleSpeedChanged;
113
128
  emptyRow(): import("react/jsx-runtime").JSX.Element;
114
- private actionToIcon;
129
+ /**
130
+ * Map a button's `icon` direction key to its arrow glyph. Decoupled from
131
+ * `action` on purpose: which physical direction "jog X positive" moves is
132
+ * not consistent across machines, so the caller picks the icon by the
133
+ * direction the operator should see. Unknown/empty keys render nothing.
134
+ *
135
+ * The `pi pi-arrow-*` cases are legacy aliases kept so button definitions
136
+ * written before the direction-key scheme (which already encoded the
137
+ * arrow here — it was simply ignored) keep rendering the right glyph.
138
+ */
139
+ private selectIcon;
115
140
  standardButton(row: number, col: number): import("react/jsx-runtime").JSX.Element;
116
141
  render(): import("react/jsx-runtime").JSX.Element;
117
142
  }
@@ -1 +1 @@
1
- {"version":3,"file":"JogPanel.d.ts","sourceRoot":"","sources":["../../src/components/JogPanel.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,gBAAgB,CAAC;AASxB;;GAEG;AACH,oBAAY,cAAc;IACtB,mCAAmC;IACnC,OAAO,IAAO;IAEd,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,IAAO;IAEhB,SAAS,KAAO;IAEhB,SAAS,KAAO;IAEhB,SAAS,KAAO;IAEhB,2BAA2B;IAC3B,IAAI,MAAO;CACd;AAGD;;GAEG;AACH,oBAAY,iBAAiB;IACzB,KAAK,IAAO;IACZ,MAAM,KAAO;IACb,IAAI,KAAO;CACd;AAED;;GAEG;AACH,oBAAY,cAAc;IACtB,IAAI,IAAO;IACX,MAAM,KAAO;IACb,IAAI,KAAO;CACd;AAGD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,cAAc,CAAA;CACzB;AAkBD;;GAEG;AACH,UAAU,aAAa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AG,OAAO,CAAC;CAC9B;AAGD,UAAU,aAAa;IACnB,WAAW,EAAG,iBAAiB,CAAC;IAChC,QAAQ,EAAG,cAAc,CAAA;CAC5B;AAGD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,EAI9E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,EAIhF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEvE,MAAM,CAAC,YAAY,EAAG,aAAa,CAQjC;IAGF,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,aAAa,CAInB;gBAGU,KAAK,EAAE,aAAa;IAUhC;;;OAGG;IACH,OAAO,CAAC,aAAa;IAWrB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,kBAAkB;IAQ1B,QAAQ;IAQR;;;;;;;;;OASG;IACH,OAAO,CAAC,UAAU;IA4BlB,cAAc,CAAC,GAAG,EAAG,MAAM,EAAE,GAAG,EAAG,MAAM;IAyBzC,MAAM;CAiIT;AAED,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React from"react";import{Button}from"primereact/button";import{SelectButton}from"primereact/selectbutton";import{Tooltip}from"primereact/tooltip";import"./JogPanel.css";import{Distance,JogShort,JogMedium,JogLong}from"../assets";import{Speed,SpeedSlow,SpeedMedium,SpeedFast}from"../assets";import{RotationCcwA,RotationCcwB,RotationCcwC}from"../assets";import{RotationCwA,RotationCwB,RotationCwC}from"../assets";import{JogXPos,JogXNeg,JogYPos,JogYNeg,JogZPos,JogZNeg}from"../assets";export var JogPanelAction;!function(t){t[t.Invalid=0]="Invalid",t[t.xPositive=1]="xPositive",t[t.xNegative=2]="xNegative",t[t.yPositive=3]="yPositive",t[t.yNegative=4]="yNegative",t[t.zPositive=5]="zPositive",t[t.zNegative=6]="zNegative",t[t.aPositive=7]="aPositive",t[t.aNegative=8]="aNegative",t[t.bPositive=9]="bPositive",t[t.bNegative=16]="bNegative",t[t.cPositive=17]="cPositive",t[t.cNegative=18]="cNegative",t[t.Stop=255]="Stop"}(JogPanelAction||(JogPanelAction={}));export var JogDistanceAction;!function(t){t[t.Short=0]="Short",t[t.Medium=16]="Medium",t[t.Long=32]="Long"}(JogDistanceAction||(JogDistanceAction={}));export var JogSpeedAction;!function(t){t[t.Slow=0]="Slow",t[t.Medium=16]="Medium",t[t.Fast=32]="Fast"}(JogSpeedAction||(JogSpeedAction={}));export const DefaultLinearJogButtons=[[void 0,{icon:"pi pi-arrow-up",action:JogPanelAction.zPositive,alt:"Z Positive"},{icon:"pi pi-arrow-down-left",action:JogPanelAction.yNegative,alt:"Y Negative"}],[{icon:"pi pi-arrow-left",action:JogPanelAction.xNegative,alt:"X Negative"},void 0,{icon:"pi pi-arrow-right",action:JogPanelAction.xPositive,alt:"X Positive"}],[{icon:"pi pi-arrow-up-right",action:JogPanelAction.yPositive,alt:"Y Positive"},{icon:"pi pi-arrow-down",action:JogPanelAction.zNegative,alt:"Z Negative"},void 0]];export const DefaultRotationJogButtons=[[{icon:"pi",action:JogPanelAction.bPositive,alt:"Rot B Positive"},{icon:"pi",action:JogPanelAction.cPositive,alt:"Rot C Positive"},void 0],[{icon:"pi",action:JogPanelAction.aNegative,alt:"Rot A Negative"},void 0,{icon:"pi",action:JogPanelAction.aPositive,alt:"Rot A Positive"}],[void 0,{icon:"pi",action:JogPanelAction.cNegative,alt:"Rot C Negative"},{icon:"pi ",action:JogPanelAction.bNegative,alt:"Rot B Negative"}]];export class JogPanel extends React.Component{constructor(t){super(t),Object.defineProperty(this,"jogDistanceItems",{enumerable:!0,configurable:!0,writable:!0,value:[{name:"S",value:JogDistanceAction.Short},{name:"M",value:JogDistanceAction.Medium},{name:"L",value:JogDistanceAction.Long}]}),Object.defineProperty(this,"jogSpeedItems",{enumerable:!0,configurable:!0,writable:!0,value:[{name:"S",value:JogSpeedAction.Slow},{name:"M",value:JogSpeedAction.Medium},{name:"F",value:JogSpeedAction.Fast}]}),this.state={jogDistance:t.defaultJogDistance,jogSpeed:t.defaultJogSpeed}}handleClicked(t){null!=t&&this.props.onClicked&&this.props.onClicked(t)}handleDistanceChanged(t){this.setState({jogDistance:t}),this.props.onJogDistanceChanged&&this.props.onJogDistanceChanged(t)}handleSpeedChanged(t){this.setState({jogSpeed:t}),this.props.onJogSpeedChanged&&this.props.onJogSpeedChanged(t)}emptyRow(){return _jsxs("div",{className:"grid-row",children:[_jsx("div",{className:"button-item empty-slot"}),_jsx("div",{className:"button-item empty-slot"}),_jsx("div",{className:"button-item empty-slot"})]})}actionToIcon(t){return t==JogPanelAction.Invalid||t==JogPanelAction.Stop?_jsx("i",{}):t==JogPanelAction.xNegative?_jsx(JogXNeg,{}):t==JogPanelAction.xPositive?_jsx(JogXPos,{}):t==JogPanelAction.yNegative?_jsx(JogYNeg,{}):t==JogPanelAction.yPositive?_jsx(JogYPos,{}):t==JogPanelAction.zNegative?_jsx(JogZNeg,{}):t==JogPanelAction.zPositive?_jsx(JogZPos,{}):t==JogPanelAction.aNegative?_jsx(RotationCcwA,{}):t==JogPanelAction.aPositive?_jsx(RotationCwA,{}):t==JogPanelAction.bNegative?_jsx(RotationCcwB,{}):t==JogPanelAction.bPositive?_jsx(RotationCwB,{}):t==JogPanelAction.cNegative?_jsx(RotationCcwC,{}):t==JogPanelAction.cPositive?_jsx(RotationCwC,{}):_jsx("i",{})}standardButton(t,o){if(void 0!==this.props.buttonDefinitions&&void 0!==this.props.buttonDefinitions[t]&&void 0!==this.props.buttonDefinitions[t][o]&&void 0!==this.props.buttonDefinitions[t][o]?.action){const e=this.props.buttonDefinitions[t][o]?.action;return _jsx(Button,{tooltip:this.props.buttonDefinitions[t][o]?.alt,onClick:()=>this.handleClicked(e),className:"button-item",icon:()=>this.actionToIcon(e)},`${t}-${o}`)}return _jsx(Button,{icon:"pi",disabled:!0,className:"button-item empty-slot"},`${t}-${o}`)}render(){return _jsxs("div",{className:"jogpanel-container",children:[_jsx(Tooltip,{target:".distance-selector-button"}),_jsxs("div",{className:"grid-container",children:[_jsxs("div",{className:"grid-row",children:[this.standardButton(0,0),this.standardButton(0,1),this.standardButton(0,2)]},"0"),_jsxs("div",{className:"grid-row",children:[this.standardButton(1,0),this.standardButton(1,1),this.standardButton(1,2)]},"1"),_jsxs("div",{className:"grid-row",children:[this.standardButton(2,0),this.standardButton(2,1),this.standardButton(2,2)]},"2")]}),this.props.showDistanceControl&&_jsxs("div",{className:"distance-selector p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:_jsx(Distance,{width:16,height:16,fill:"white"})}),_jsx(SelectButton,{value:this.state.jogDistance,onChange:t=>this.handleDistanceChanged(t.value),optionLabel:"name",options:this.jogDistanceItems,allowEmpty:!1,itemTemplate:t=>t.value==JogDistanceAction.Short?_jsx(JogShort,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Short Distance","data-pr-position":"bottom",fill:"white"}):t.value==JogDistanceAction.Medium?_jsx(JogMedium,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Medium Distance","data-pr-position":"bottom",fill:"white"}):_jsx(JogLong,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Long Distance","data-pr-position":"bottom",fill:"white"})})]}),this.props.showSpeedControl&&_jsxs("div",{className:"distance-selector p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:_jsx(Speed,{width:16,height:16,fill:"white"})}),_jsx(SelectButton,{value:this.state.jogSpeed,onChange:t=>this.handleSpeedChanged(t.value),optionLabel:"name",options:this.jogSpeedItems,allowEmpty:!1,itemTemplate:t=>t.value==JogSpeedAction.Slow?_jsx(SpeedSlow,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Slow Speed","data-pr-position":"bottom",fill:"white"}):t.value==JogSpeedAction.Medium?_jsx(SpeedMedium,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Medium Speed","data-pr-position":"bottom",fill:"white"}):_jsx(SpeedFast,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Fast Speed","data-pr-position":"bottom",fill:"white"})})]})]})}}Object.defineProperty(JogPanel,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{onClicked:void 0,onJogDistanceChanged:void 0,buttonDefinitions:DefaultLinearJogButtons,defaultJogDistance:JogDistanceAction.Short,defaultJogSpeed:JogSpeedAction.Medium,showDistanceControl:!0,showSpeedControl:!0}});export default JogPanel;
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React from"react";import{Button}from"primereact/button";import{SelectButton}from"primereact/selectbutton";import{Tooltip}from"primereact/tooltip";import"./JogPanel.css";import{Distance,JogShort,JogMedium,JogLong}from"../assets";import{Speed,SpeedSlow,SpeedMedium,SpeedFast}from"../assets";import{RotationCcwA,RotationCcwB,RotationCcwC}from"../assets";import{RotationCwA,RotationCwB,RotationCwC}from"../assets";import{JogXLeft,JogXRight,JogYPos,JogYNeg,JogZPos,JogZNeg}from"../assets";export var JogPanelAction;!function(t){t[t.Invalid=0]="Invalid",t[t.xPositive=1]="xPositive",t[t.xNegative=2]="xNegative",t[t.yPositive=3]="yPositive",t[t.yNegative=4]="yNegative",t[t.zPositive=5]="zPositive",t[t.zNegative=6]="zNegative",t[t.aPositive=7]="aPositive",t[t.aNegative=8]="aNegative",t[t.bPositive=9]="bPositive",t[t.bNegative=16]="bNegative",t[t.cPositive=17]="cPositive",t[t.cNegative=18]="cNegative",t[t.Stop=255]="Stop"}(JogPanelAction||(JogPanelAction={}));export var JogDistanceAction;!function(t){t[t.Short=0]="Short",t[t.Medium=16]="Medium",t[t.Long=32]="Long"}(JogDistanceAction||(JogDistanceAction={}));export var JogSpeedAction;!function(t){t[t.Slow=0]="Slow",t[t.Medium=16]="Medium",t[t.Fast=32]="Fast"}(JogSpeedAction||(JogSpeedAction={}));export const DefaultLinearJogButtons=[[void 0,{icon:"jog_z_up",action:JogPanelAction.zPositive,alt:"Z Positive"},{icon:"jog_y_down_left",action:JogPanelAction.yNegative,alt:"Y Negative"}],[{icon:"jog_x_left",action:JogPanelAction.xNegative,alt:"X Negative"},void 0,{icon:"jog_x_right",action:JogPanelAction.xPositive,alt:"X Positive"}],[{icon:"jog_y_up_right",action:JogPanelAction.yPositive,alt:"Y Positive"},{icon:"jog_z_down",action:JogPanelAction.zNegative,alt:"Z Negative"},void 0]];export const DefaultRotationJogButtons=[[{icon:"rot_b_cw",action:JogPanelAction.bPositive,alt:"Rot B Positive"},{icon:"rot_c_cw",action:JogPanelAction.cPositive,alt:"Rot C Positive"},void 0],[{icon:"rot_a_ccw",action:JogPanelAction.aNegative,alt:"Rot A Negative"},void 0,{icon:"rot_a_cw",action:JogPanelAction.aPositive,alt:"Rot A Positive"}],[void 0,{icon:"rot_c_ccw",action:JogPanelAction.cNegative,alt:"Rot C Negative"},{icon:"rot_b_ccw",action:JogPanelAction.bNegative,alt:"Rot B Negative"}]];export class JogPanel extends React.Component{constructor(t){super(t),Object.defineProperty(this,"jogDistanceItems",{enumerable:!0,configurable:!0,writable:!0,value:[{name:"S",value:JogDistanceAction.Short},{name:"M",value:JogDistanceAction.Medium},{name:"L",value:JogDistanceAction.Long}]}),Object.defineProperty(this,"jogSpeedItems",{enumerable:!0,configurable:!0,writable:!0,value:[{name:"S",value:JogSpeedAction.Slow},{name:"M",value:JogSpeedAction.Medium},{name:"F",value:JogSpeedAction.Fast}]}),this.state={jogDistance:t.defaultJogDistance,jogSpeed:t.defaultJogSpeed}}handleClicked(t){null!=t&&this.props.onClicked&&this.props.onClicked(t)}handleDistanceChanged(t){this.setState({jogDistance:t}),this.props.onJogDistanceChanged&&this.props.onJogDistanceChanged(t)}handleSpeedChanged(t){this.setState({jogSpeed:t}),this.props.onJogSpeedChanged&&this.props.onJogSpeedChanged(t)}emptyRow(){return _jsxs("div",{className:"grid-row",children:[_jsx("div",{className:"button-item empty-slot"}),_jsx("div",{className:"button-item empty-slot"}),_jsx("div",{className:"button-item empty-slot"})]})}selectIcon(t){switch(t){case"jog_x_left":case"pi pi-arrow-left":return _jsx(JogXLeft,{});case"jog_x_right":case"pi pi-arrow-right":return _jsx(JogXRight,{});case"jog_y_up_right":case"pi pi-arrow-up-right":return _jsx(JogYPos,{});case"jog_y_down_left":case"pi pi-arrow-down-left":return _jsx(JogYNeg,{});case"jog_z_up":case"pi pi-arrow-up":return _jsx(JogZPos,{});case"jog_z_down":case"pi pi-arrow-down":return _jsx(JogZNeg,{});case"rot_a_cw":return _jsx(RotationCwA,{});case"rot_a_ccw":return _jsx(RotationCcwA,{});case"rot_b_cw":return _jsx(RotationCwB,{});case"rot_b_ccw":return _jsx(RotationCcwB,{});case"rot_c_cw":return _jsx(RotationCwC,{});case"rot_c_ccw":return _jsx(RotationCcwC,{});default:return _jsx("i",{})}}standardButton(t,e){if(void 0!==this.props.buttonDefinitions&&void 0!==this.props.buttonDefinitions[t]&&void 0!==this.props.buttonDefinitions[t][e]&&void 0!==this.props.buttonDefinitions[t][e]?.action){const o=this.props.buttonDefinitions[t][e],i=o?.action;return _jsx(Button,{tooltip:o?.alt,onClick:()=>this.handleClicked(i),className:"button-item",icon:()=>this.selectIcon(o?.icon)},`${t}-${e}`)}return _jsx(Button,{icon:"pi",disabled:!0,className:"button-item empty-slot"},`${t}-${e}`)}render(){return _jsxs("div",{className:"jogpanel-container",children:[_jsx(Tooltip,{target:".distance-selector-button"}),_jsxs("div",{className:"grid-container",children:[_jsxs("div",{className:"grid-row",children:[this.standardButton(0,0),this.standardButton(0,1),this.standardButton(0,2)]},"0"),_jsxs("div",{className:"grid-row",children:[this.standardButton(1,0),this.standardButton(1,1),this.standardButton(1,2)]},"1"),_jsxs("div",{className:"grid-row",children:[this.standardButton(2,0),this.standardButton(2,1),this.standardButton(2,2)]},"2")]}),this.props.showDistanceControl&&_jsxs("div",{className:"distance-selector p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:_jsx(Distance,{width:16,height:16,fill:"white"})}),_jsx(SelectButton,{value:this.state.jogDistance,onChange:t=>this.handleDistanceChanged(t.value),optionLabel:"name",options:this.jogDistanceItems,allowEmpty:!1,itemTemplate:t=>t.value==JogDistanceAction.Short?_jsx(JogShort,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Short Distance","data-pr-position":"bottom",fill:"white"}):t.value==JogDistanceAction.Medium?_jsx(JogMedium,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Medium Distance","data-pr-position":"bottom",fill:"white"}):_jsx(JogLong,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Long Distance","data-pr-position":"bottom",fill:"white"})})]}),this.props.showSpeedControl&&_jsxs("div",{className:"distance-selector p-inputgroup flex-1",children:[_jsx("span",{className:"p-inputgroup-addon",children:_jsx(Speed,{width:16,height:16,fill:"white"})}),_jsx(SelectButton,{value:this.state.jogSpeed,onChange:t=>this.handleSpeedChanged(t.value),optionLabel:"name",options:this.jogSpeedItems,allowEmpty:!1,itemTemplate:t=>t.value==JogSpeedAction.Slow?_jsx(SpeedSlow,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Slow Speed","data-pr-position":"bottom",fill:"white"}):t.value==JogSpeedAction.Medium?_jsx(SpeedMedium,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Medium Speed","data-pr-position":"bottom",fill:"white"}):_jsx(SpeedFast,{className:"distance-selector-button",width:16,height:16,"data-pr-tooltip":"Fast Speed","data-pr-position":"bottom",fill:"white"})})]})]})}}Object.defineProperty(JogPanel,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{onClicked:void 0,onJogDistanceChanged:void 0,buttonDefinitions:DefaultLinearJogButtons,defaultJogDistance:JogDistanceAction.Short,defaultJogSpeed:JogSpeedAction.Medium,showDistanceControl:!0,showSpeedControl:!0}});export default JogPanel;
@@ -1 +1 @@
1
- {"version":3,"file":"ValueInput.d.ts","sourceRoot":"","sources":["../../src/components/ValueInput.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8HhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ValueInput.d.ts","sourceRoot":"","sources":["../../src/components/ValueInput.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqIhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import clsx from"clsx";import{NumericFormat}from"react-number-format";import{InputText}from"primereact/inputtext";import{Button}from"primereact/button";import{EventEmitterContext}from"../core/EventEmitterContext";import"./ValueInput.css";export const ValueInput=({label:e,value:t=null,min:i,max:a,minPrecision:s,maxPrecision:o,minFractionDigits:n,maxFractionDigits:r,prefix:c,suffix:u,description:l,disabled:m=!1,dispatchTopic:p,placeholder:d,onValueChanged:x,size:f="normal",className:v})=>{const h=s??n??0,j=o??r??3,[N,b]=useState(t),[E,C]=useState(!1),[_,g]=useState(!1),S=useContext(EventEmitterContext);useEffect(()=>{E||(b(t),g(!1))},[t,E]);const F=()=>{if(!E)return;if(null===(e=N)||Number.isNaN(e)||void 0!==i&&e<i||void 0!==a&&e>a)return void g(!0);var e;const t=N;x?.(t),p&&S.dispatch({topic:p,payload:t}),C(!1),g(!1)},I=()=>{b(t),C(!1),g(!1)},V=void 0===i||i<0;return _jsxs("div",{children:[_jsxs("div",{className:"p-inputgroup",children:[null!=e&&""!==e&&_jsx("span",{className:"p-inputgroup-addon",children:e}),_jsx(NumericFormat,{value:N??"",onValueChange:(e,t)=>{"event"===t.source&&(b(e.floatValue??null),C(!0),g(!1))},decimalScale:j,fixedDecimalScale:h>0&&!E,allowNegative:V,decimalSeparator:".",thousandSeparator:!1,prefix:c,suffix:u,placeholder:d,disabled:m,customInput:InputText,className:clsx("value-input-field",`size-${f}`,v),invalid:_||void 0,onKeyDown:e=>{"Enter"===e.key?F():"Escape"===e.key&&I()}}),_jsx(Button,{icon:"pi pi-check",disabled:m||!E,className:"p-button-success",onClick:F,autoFocus:!1}),_jsx(Button,{icon:"pi pi-times",disabled:m||!E,className:"p-button-danger",onClick:I,autoFocus:!1})]}),l&&_jsx("small",{children:l})]})};export default ValueInput;
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import clsx from"clsx";import{NumericFormat}from"react-number-format";import{InputText}from"primereact/inputtext";import{Button}from"primereact/button";import{EventEmitterContext}from"../core/EventEmitterContext";import"./ValueInput.css";export const ValueInput=({label:e,value:t=null,min:i,max:a,minPrecision:o,maxPrecision:s,minFractionDigits:n,maxFractionDigits:r,prefix:c,suffix:u,description:l,disabled:m=!1,dispatchTopic:p,placeholder:d,onValueChanged:x,size:f="normal",className:v})=>{const h=o??n??0,j=s??r??3,[N,b]=useState(t),[E,C]=useState(!1),[_,g]=useState(!1),S=useContext(EventEmitterContext);useEffect(()=>{E||(b(t),g(!1))},[t,E]);const F=void 0!==i&&void 0!==a?Math.min(i,a):i,I=void 0!==i&&void 0!==a?Math.max(i,a):a,V=()=>{if(!E)return;if(null===(e=N)||Number.isNaN(e)||void 0!==F&&e<F||void 0!==I&&e>I)return void g(!0);var e;const t=N;x?.(t),p&&S.dispatch({topic:p,payload:t}),C(!1),g(!1)},k=()=>{b(t),C(!1),g(!1)},y=void 0===F||F<0;return _jsxs("div",{children:[_jsxs("div",{className:"p-inputgroup",children:[null!=e&&""!==e&&_jsx("span",{className:"p-inputgroup-addon",children:e}),_jsx(NumericFormat,{value:N??"",onValueChange:(e,t)=>{"event"===t.source&&(b(e.floatValue??null),C(!0),g(!1))},decimalScale:j,fixedDecimalScale:h>0&&!E,allowNegative:y,decimalSeparator:".",thousandSeparator:!1,prefix:c,suffix:u,placeholder:d,disabled:m,customInput:InputText,className:clsx("value-input-field",`size-${f}`,v),invalid:_||void 0,onKeyDown:e=>{"Enter"===e.key?V():"Escape"===e.key&&k()}}),_jsx(Button,{icon:"pi pi-check",disabled:m||!E,className:"p-button-success",onClick:V,autoFocus:!1}),_jsx(Button,{icon:"pi pi-times",disabled:m||!E,className:"p-button-danger",onClick:k,autoFocus:!1})]}),l&&_jsx("small",{children:l})]})};export default ValueInput;
@@ -12,6 +12,8 @@ export { TestMethodDialog } from './tis/TestMethodDialog';
12
12
  export type { TestMethodDialogProps } from './tis/TestMethodDialog';
13
13
  export { ResultHistoryTable } from './tis/ResultHistoryTable';
14
14
  export type { ResultHistoryTableProps } from './tis/ResultHistoryTable';
15
+ export { SampleSummaryPanel } from './tis/SampleSummaryPanel';
16
+ export type { SampleSummaryPanelProps } from './tis/SampleSummaryPanel';
15
17
  export { TestDataView } from './tis/TestDataView';
16
18
  export type { TestDataViewProps, ChartAxis, ChartSeries, ChartView, RawDataShape } from './tis/TestDataView';
17
19
  export { TestRawDataView } from './tis/TestRawDataView';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,EACb,WAAW,EACX,eAAe,EACf,UAAU,EACV,SAAS,GACZ,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,GAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAU,uBAAuB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAY,qBAAqB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAY,qBAAqB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAQ,yBAAyB,CAAC;AAC9D,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAS,wBAAwB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAO,0BAA0B,CAAC;AAC/D,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAa,oBAAoB,CAAC;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CAAC;AAE7G,OAAO,EAAE,eAAe,EAAE,MAAU,uBAAuB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAW,sBAAsB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAMhE,OAAO,EACH,WAAW,EACX,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAS,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAY,uBAAuB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAU,yBAAyB,CAAC;AAShE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACxE,YAAY,EACR,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,YAAY,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- export{TisProvider,TisContext,useTis,useTisSchemas,useTisState,useTisSelection,useTisRuns,useTisRun}from"./tis/TisProvider";export{ProjectSelector}from"./tis/ProjectSelector";export{TestSetupForm}from"./tis/TestSetupForm";export{TestSetupView}from"./tis/TestSetupView";export{ProjectInfoDialog}from"./tis/ProjectInfoDialog";export{TestMethodDialog}from"./tis/TestMethodDialog";export{ResultHistoryTable}from"./tis/ResultHistoryTable";export{TestDataView}from"./tis/TestDataView";export{TestRawDataView}from"./tis/TestRawDataView";export{ProjectManager}from"./tis/ProjectManager";export{AmsProvider,useAms,useAmsSchemas,useAmsAlerts,useAmsAssets,useAmsSelection}from"./ams/AmsProvider";export{AssetRegistryTable}from"./ams/AssetRegistryTable";export{AssetDetailView}from"./ams/AssetDetailView";export{CalibrationEntryDialog}from"./ams/CalibrationEntryDialog";export{SubLocationPicker}from"./ams/SubLocationPicker";export{NetworkProvider,useNetwork}from"./network/NetworkProvider";export{NetworkPanel}from"./network/NetworkPanel";export{StagedChangeBanner}from"./network/StagedChangeBanner";
1
+ export{TisProvider,TisContext,useTis,useTisSchemas,useTisState,useTisSelection,useTisRuns,useTisRun}from"./tis/TisProvider";export{ProjectSelector}from"./tis/ProjectSelector";export{TestSetupForm}from"./tis/TestSetupForm";export{TestSetupView}from"./tis/TestSetupView";export{ProjectInfoDialog}from"./tis/ProjectInfoDialog";export{TestMethodDialog}from"./tis/TestMethodDialog";export{ResultHistoryTable}from"./tis/ResultHistoryTable";export{SampleSummaryPanel}from"./tis/SampleSummaryPanel";export{TestDataView}from"./tis/TestDataView";export{TestRawDataView}from"./tis/TestRawDataView";export{ProjectManager}from"./tis/ProjectManager";export{AmsProvider,useAms,useAmsSchemas,useAmsAlerts,useAmsAssets,useAmsSelection}from"./ams/AmsProvider";export{AssetRegistryTable}from"./ams/AssetRegistryTable";export{AssetDetailView}from"./ams/AssetDetailView";export{CalibrationEntryDialog}from"./ams/CalibrationEntryDialog";export{SubLocationPicker}from"./ams/SubLocationPicker";export{NetworkProvider,useNetwork}from"./network/NetworkProvider";export{NetworkPanel}from"./network/NetworkPanel";export{StagedChangeBanner}from"./network/StagedChangeBanner";
@@ -1 +1 @@
1
- {"version":3,"file":"StagedChangeBanner.d.ts","sourceRoot":"","sources":["../../../src/components/network/StagedChangeBanner.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,uBAAuB;IACpC,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA6EhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"StagedChangeBanner.d.ts","sourceRoot":"","sources":["../../../src/components/network/StagedChangeBanner.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,MAAM,WAAW,uBAAuB;IACpC,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+FhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useEffect,useState}from"react";import{Button}from"primereact/button";import{useNetwork}from"./NetworkProvider";export const StagedChangeBanner=({style:e})=>{const{staged:t,confirmConnection:i,cancelStaged:n}=useNetwork(),[r,s]=useState(()=>Date.now());if(useEffect(()=>{if(!t)return;const e=window.setInterval(()=>s(Date.now()),250);return()=>window.clearInterval(e)},[t]),!t)return null;const o=Math.max(0,Math.ceil((t.deadline_ms-r)/1e3)),a=Math.max(1,t.revert_in_seconds),d=Math.max(0,Math.min(100,o/a*100)),l={position:"sticky",top:0,zIndex:1e3,padding:"0.75rem 1rem",background:o<=10?"#7f1d1d":"#78350f",color:"white",borderBottom:"1px solid #1f2937",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)",...e};return _jsxs("div",{style:l,role:"alertdialog","aria-live":"polite",children:[_jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",flexWrap:"wrap"},children:[_jsxs("div",{style:{minWidth:0},children:[_jsx("strong",{children:"WiFi change pending:"})," ","connected to ",_jsx("code",{children:t.ssid})," on ",_jsx("code",{children:t.device})]}),_jsxs("div",{style:{fontVariantNumeric:"tabular-nums",fontSize:"1.1rem"},children:["Reverting in ",_jsxs("strong",{children:[o,"s"]})]}),_jsxs("div",{style:{display:"flex",gap:"0.4rem"},children:[_jsx(Button,{label:"Confirm",icon:"pi pi-check",size:"small",severity:"success",onClick:()=>{i(t.staged_id)}}),_jsx(Button,{label:"Cancel & Revert",icon:"pi pi-undo",size:"small",severity:"danger",outlined:!0,onClick:()=>{n(t.staged_id)}})]})]}),_jsx("div",{style:{marginTop:"0.5rem",height:"0.25rem",background:"rgba(255, 255, 255, 0.2)",borderRadius:0,overflow:"hidden"},children:_jsx("div",{style:{width:`${d}%`,height:"100%",background:"white",transition:"width 0.25s linear"}})})]})};export default StagedChangeBanner;
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useEffect,useState}from"react";import{createPortal}from"react-dom";import{Button}from"primereact/button";import{useNetwork}from"./NetworkProvider";export const StagedChangeBanner=({style:e})=>{const{staged:t,confirmConnection:r,cancelStaged:i}=useNetwork(),[n,o]=useState(()=>Date.now());if(useEffect(()=>{if(!t)return;const e=window.setInterval(()=>o(Date.now()),250);return()=>window.clearInterval(e)},[t]),!t)return null;const s=Math.max(0,Math.ceil((t.deadline_ms-n)/1e3)),a=Math.max(1,t.revert_in_seconds),d=Math.max(0,Math.min(100,s/a*100)),l={position:"fixed",top:0,left:0,right:0,zIndex:2e3,padding:"0.75rem 1rem",background:s<=10?"#7f1d1d":"#78350f",color:"white",borderBottom:"1px solid #1f2937",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.3)",...e},c=_jsxs("div",{style:l,role:"alertdialog","aria-live":"polite",children:[_jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",flexWrap:"wrap"},children:[_jsxs("div",{style:{minWidth:0},children:[_jsx("strong",{children:"WiFi change pending:"})," ","connected to ",_jsx("code",{children:t.ssid})," on ",_jsx("code",{children:t.device})]}),_jsxs("div",{style:{fontVariantNumeric:"tabular-nums",fontSize:"1.1rem"},children:["Reverting in ",_jsxs("strong",{children:[s,"s"]})]}),_jsxs("div",{style:{display:"flex",gap:"0.4rem"},children:[_jsx(Button,{label:"Confirm",icon:"pi pi-check",size:"small",severity:"success",onClick:()=>{r(t.staged_id)}}),_jsx(Button,{label:"Cancel & Revert",icon:"pi pi-undo",size:"small",severity:"danger",outlined:!0,onClick:()=>{i(t.staged_id)}})]})]}),_jsx("div",{style:{marginTop:"0.5rem",height:"0.25rem",background:"rgba(255, 255, 255, 0.2)",borderRadius:0,overflow:"hidden"},children:_jsx("div",{style:{width:`${d}%`,height:"100%",background:"white",transition:"width 0.25s linear"}})})]});return"undefined"!=typeof document&&document.body?createPortal(c,document.body):c};export default StagedChangeBanner;
@@ -0,0 +1,12 @@
1
+ /* Runs excluded from cross-test aggregation are kept visible but dimmed and
2
+ struck through, so an operator can see at a glance which rows don't feed
3
+ the avg/min/max/stddev/count results for their sample group. */
4
+ .tis-row-excluded > td {
5
+ opacity: 0.55;
6
+ text-decoration: line-through;
7
+ }
8
+ /* Keep the action buttons (Include / Download) legible and clickable. */
9
+ .tis-row-excluded > td .p-button {
10
+ opacity: 1;
11
+ text-decoration: none;
12
+ }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import './ResultHistoryTable.css';
2
3
  export interface ResultHistoryTableProps {
3
4
  /**
4
5
  * Override the project scope. When omitted, the table reads from
@@ -1 +1 @@
1
- {"version":3,"file":"ResultHistoryTable.d.ts","sourceRoot":"","sources":["../../../src/components/tis/ResultHistoryTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAyCD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAoThE,CAAC"}
1
+ {"version":3,"file":"ResultHistoryTable.d.ts","sourceRoot":"","sources":["../../../src/components/tis/ResultHistoryTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,OAAO,0BAA0B,CAAC;AAElC,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAyCD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0XhE,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{Tag}from"primereact/tag";import{EventEmitterContext}from"../../core/EventEmitterContext";import{MessageType}from"../../hub/CommandMessage";import{useTis}from"./TisProvider";const downloadCsvBlob=(e,t)=>{const o=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(r)},downloadViaUrl=(e,t)=>{const o=document.createElement("a");o.href=e,o.download=t,document.body.appendChild(o),o.click(),o.remove()};export const ResultHistoryTable=e=>{const t=useTis(),o=e.projectId??t.selection.projectId,r=e.methodId,[s,i]=useState([]),[a,n]=useState(!1),[l,d]=useState(null),[c,p]=useState(null),{invoke:u}=useContext(EventEmitterContext),m=async()=>{if(o){n(!0);try{const e={project_id:o};r&&(e.method_id=r);const t=await u("tis.list_tests",MessageType.Request,e);t.success&&t.data&&t.data.tests&&i(t.data.tests)}catch(e){}n(!1)}else i([])};useEffect(()=>{m()},[o,r,t.state.activeRunId,t.state.active]);const f=async(e,t)=>{const s=e?.run_id,i=e?.method_id??r;if(!s||!i||!o)return;const a="report"===t?"tis.export_test_csv":"tis.export_test_data_csv",n="report"===t?"test report":"test data";d({runId:s,kind:t});try{const e=await u(a,MessageType.Request,{project_id:o,method_id:i,run_id:s});if(!e?.success)return void alert(`Failed to build ${n} for ${s}`+(e?.error_message?`: ${e.error_message}`:""));const r="string"==typeof e.data?.filename&&e.data.filename?e.data.filename:`${o}_${i}_${s}_${t}.csv`;if("report"===t){const t="string"==typeof e.data?.csv?e.data.csv:"";if(!t)return void alert(`${n} for ${s} is empty.`);downloadCsvBlob(r,t)}else{const t="string"==typeof e.data?.download_url?e.data.download_url:"";if(!t)return void alert(`Server did not return a download URL for ${n}.`);downloadViaUrl(t,r)}}catch(e){alert(`Download failed: ${e instanceof Error?e.message:String(e)}`)}finally{d(null)}},_=async e=>{if(!o)return;const t="report"===e?"tis.export_project_csv":"tis.export_project_zip",r="report"===e?"project report":"project archive";p(e);try{const s=await u(t,MessageType.Request,{project_id:o});if(!s?.success)return void alert(`Failed to build ${r}`+(s?.error_message?`: ${s.error_message}`:""));const i="string"==typeof s.data?.download_url?s.data.download_url:"";if(!i)return void alert(`Server did not return a download URL for ${r}.`);const a="report"===e?`${o}_project_report.csv`:`${o}_project_archive.zip`,n="string"==typeof s.data?.filename&&s.data.filename?s.data.filename:a;downloadViaUrl(i,n)}catch(e){alert(`Download failed: ${e instanceof Error?e.message:String(e)}`)}finally{p(null)}},y=e=>{const t="string"==typeof e?.sample_id?e.sample_id:"";if(t)return t;const o=e?.config;return o&&"object"==typeof o&&"string"==typeof o.sample_id?o.sample_id:""};return _jsxs("div",{style:{width:"100%",maxWidth:"100%",overflow:"hidden",boxSizing:"border-box"},children:[_jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem",gap:"0.5rem",flexWrap:"wrap"},children:[_jsx("h3",{style:{margin:0},children:o?`Test History: ${o}${r?` / ${r}`:""}`:"Test History (no project selected)"}),_jsxs("div",{style:{display:"flex",gap:"0.4rem",alignItems:"center"},children:[_jsx(Button,{icon:"report"===c?"pi pi-spin pi-spinner":"pi pi-file",label:"Download Report",size:"small",outlined:!0,disabled:!o||null!==c,onClick:()=>_("report"),tooltip:"Download a CSV report of every test in this project",tooltipOptions:{position:"bottom"}}),_jsx(Button,{icon:"archive"===c?"pi pi-spin pi-spinner":"pi pi-box",label:"Download Archive",size:"small",outlined:!0,disabled:!o||null!==c,onClick:()=>_("archive"),tooltip:"Download a ZIP of the entire project directory (all tests, raw data, configs)",tooltipOptions:{position:"bottom"}}),_jsx(Button,{icon:"pi pi-refresh",label:"Refresh",size:"small",onClick:m,disabled:a})]})]}),_jsxs(DataTable,{value:s,loading:a,paginator:!0,rows:10,emptyMessage:"No tests found.",scrollable:!0,scrollHeight:"flex",tableStyle:{minWidth:0},style:{width:"100%"},selectionMode:"single",onSelectionChange:e=>{const o=e.value;o?.run_id&&t.setSelection({projectId:o.project_id??null,methodId:o.method_id??null,runId:o.run_id})},children:[_jsx(Column,{header:"Sample ID",sortable:!0,body:y,sortFunction:e=>{const t=[...e.data];return t.sort((t,o)=>y(t).localeCompare(y(o))*(e.order??1)),t},style:{minWidth:"8rem"}}),_jsx(Column,{field:"start_time",header:"Date/Time",sortable:!0,body:e=>{return(t=e.start_time)?new Date(t).toLocaleString():"";var t},style:{minWidth:"12rem"}}),_jsx(Column,{field:"method_id",header:"Test Method",sortable:!0,style:{minWidth:"10rem"}}),_jsx(Column,{field:"run_id",header:"Run ID",sortable:!0,style:{minWidth:"12rem"}}),_jsx(Column,{header:"Status",field:"status",sortable:!0,body:e=>{const t=(e=>{if(!0===e?.finalized)return{label:"Abandoned",severity:"danger"};const t="string"==typeof e?.status?e.status:"completed";switch(t){case"in_progress":return{label:"In Progress",severity:"info"};case"paused":return{label:"Paused",severity:"warning"};case"completed":return{label:"Completed",severity:"success"};default:return{label:t,severity:void 0}}})(e);return _jsx(Tag,{value:t.label,severity:t.severity})},style:{minWidth:"8rem"}}),_jsx(Column,{header:"Download",style:{width:"14rem"},body:e=>{const t=l?.runId===e.run_id&&"data"===l?.kind,o=l?.runId===e.run_id&&"report"===l?.kind,r=null!==l;return _jsxs("div",{style:{display:"flex",gap:"0.4rem"},children:[_jsx(Button,{icon:t?"pi pi-spin pi-spinner":"pi pi-download",label:"Raw",size:"small",outlined:!0,disabled:r,onClick:()=>f(e,"data"),tooltip:"Download raw + filtered trace data as one CSV",tooltipOptions:{position:"left"}}),_jsx(Button,{icon:o?"pi pi-spin pi-spinner":"pi pi-file",label:"Results",size:"small",outlined:!0,disabled:r,onClick:()=>f(e,"report"),tooltip:"Download a CSV report (metadata + cycles + results) for this test",tooltipOptions:{position:"left"}})]})}})]})]})};
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{Badge}from"primereact/badge";import{EventEmitterContext}from"../../core/EventEmitterContext";import{MessageType}from"../../hub/CommandMessage";import{useTis}from"./TisProvider";import{SampleSummaryPanel}from"./SampleSummaryPanel";import"./ResultHistoryTable.css";const downloadCsvBlob=(e,t)=>{const o=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(r)},downloadViaUrl=(e,t)=>{const o=document.createElement("a");o.href=e,o.download=t,document.body.appendChild(o),o.click(),o.remove()};export const ResultHistoryTable=e=>{const t=useTis(),o=e.projectId??t.selection.projectId,r=e.methodId,[s,i]=useState([]),[a,l]=useState(!1),[n,d]=useState(null),[c,p]=useState(null),[u,m]=useState(null),{invoke:f}=useContext(EventEmitterContext),_=async()=>{if(o){l(!0);try{const e={project_id:o};r&&(e.method_id=r);const t=await f("tis.list_tests",MessageType.Request,e);t.success&&t.data&&t.data.tests&&i(t.data.tests)}catch(e){}l(!1)}else i([])};useEffect(()=>{_()},[o,r,t.state.activeRunId,t.state.active]);const y=async(e,t)=>{const s=e?.run_id,i=e?.method_id??r;if(!s||!i||!o)return;const a="report"===t?"tis.export_test_csv":"tis.export_test_data_csv",l="report"===t?"test report":"test data";d({runId:s,kind:t});try{const e=await f(a,MessageType.Request,{project_id:o,method_id:i,run_id:s});if(!e?.success)return void alert(`Failed to build ${l} for ${s}`+(e?.error_message?`: ${e.error_message}`:""));const r="string"==typeof e.data?.filename&&e.data.filename?e.data.filename:`${o}_${i}_${s}_${t}.csv`;if("report"===t){const t="string"==typeof e.data?.csv?e.data.csv:"";if(!t)return void alert(`${l} for ${s} is empty.`);downloadCsvBlob(r,t)}else{const t="string"==typeof e.data?.download_url?e.data.download_url:"";if(!t)return void alert(`Server did not return a download URL for ${l}.`);downloadViaUrl(t,r)}}catch(e){alert(`Download failed: ${e instanceof Error?e.message:String(e)}`)}finally{d(null)}},h=async e=>{if(!o)return;const t="report"===e?"tis.export_project_csv":"tis.export_project_zip",r="report"===e?"project report":"project archive";p(e);try{const s=await f(t,MessageType.Request,{project_id:o});if(!s?.success)return void alert(`Failed to build ${r}`+(s?.error_message?`: ${s.error_message}`:""));const i="string"==typeof s.data?.download_url?s.data.download_url:"";if(!i)return void alert(`Server did not return a download URL for ${r}.`);const a="report"===e?`${o}_project_report.csv`:`${o}_project_archive.zip`,l="string"==typeof s.data?.filename&&s.data.filename?s.data.filename:a;downloadViaUrl(i,l)}catch(e){alert(`Download failed: ${e instanceof Error?e.message:String(e)}`)}finally{p(null)}},x=e=>{const t="string"==typeof e?.sample_id?e.sample_id:"";if(t)return t;const o=e?.config;return o&&"object"==typeof o&&"string"==typeof o.sample_id?o.sample_id:""};return _jsxs("div",{style:{width:"100%",maxWidth:"100%",overflow:"hidden",boxSizing:"border-box"},children:[_jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem",gap:"0.5rem",flexWrap:"wrap"},children:[_jsx("h3",{style:{margin:0},children:o?`Test History: ${o}${r?` / ${r}`:""}`:"Test History (no project selected)"}),_jsxs("div",{style:{display:"flex",gap:"0.4rem",alignItems:"center"},children:[_jsx(Button,{icon:"report"===c?"pi pi-spin pi-spinner":"pi pi-file",label:"Download Report",size:"small",outlined:!0,disabled:!o||null!==c,onClick:()=>h("report"),tooltip:"Download a CSV report of every test in this project",tooltipOptions:{position:"bottom"}}),_jsx(Button,{icon:"archive"===c?"pi pi-spin pi-spinner":"pi pi-box",label:"Download Archive",size:"small",outlined:!0,disabled:!o||null!==c,onClick:()=>h("archive"),tooltip:"Download a ZIP of the entire project directory (all tests, raw data, configs)",tooltipOptions:{position:"bottom"}}),_jsx(Button,{icon:"pi pi-refresh",label:"Refresh",size:"small",onClick:_,disabled:a})]})]}),_jsx(SampleSummaryPanel,{projectId:o,methodId:r}),_jsxs(DataTable,{value:s,loading:a,paginator:!0,rows:10,emptyMessage:"No tests found.",scrollable:!0,scrollHeight:"flex",tableStyle:{minWidth:0},style:{width:"100%"},rowClassName:e=>!0===e?.excluded?"tis-row-excluded":"",selectionMode:"single",onSelectionChange:e=>{const o=e.value;o?.run_id&&t.setSelection({projectId:o.project_id??null,methodId:o.method_id??null,runId:o.run_id})},children:[_jsx(Column,{header:"Sample ID",sortable:!0,body:x,sortFunction:e=>{const t=[...e.data];return t.sort((t,o)=>x(t).localeCompare(x(o))*(e.order??1)),t},style:{minWidth:"8rem"}}),_jsx(Column,{field:"start_time",header:"Date/Time",sortable:!0,body:e=>{return(t=e.start_time)?new Date(t).toLocaleString():"";var t},style:{minWidth:"12rem"}}),_jsx(Column,{field:"method_id",header:"Test Method",sortable:!0,style:{minWidth:"10rem"}}),_jsx(Column,{header:"Status",field:"status",sortable:!0,body:e=>{const t=(e=>{if(!0===e?.finalized)return{label:"Abandoned",severity:"danger"};const t="string"==typeof e?.status?e.status:"completed";switch(t){case"in_progress":return{label:"In Progress",severity:"info"};case"paused":return{label:"Paused",severity:"warning"};case"completed":return{label:"Completed",severity:"success"};default:return{label:t,severity:void 0}}})(e);return _jsx(Badge,{value:t.label,severity:t.severity})},style:{minWidth:"6rem"}}),_jsx(Column,{header:"Incl.",align:"center",alignHeader:"center",style:{width:"4.5rem"},body:e=>{const t=!0===e?.excluded,s=u===e.run_id;return _jsx(Button,{icon:s?"pi pi-spin pi-spinner":t?"pi pi-eye-slash":"pi pi-check",rounded:!0,text:!0,size:"small",severity:t?"warning":"success",disabled:null!==u,onClick:()=>(async e=>{const t=e?.run_id,s=e?.method_id??r;if(!t||!s||!o)return;const i=!0!==e?.excluded;m(t);try{const e=await f("tis.set_test_excluded",MessageType.Request,{project_id:o,method_id:s,run_id:t,excluded:i});if(!e?.success)return void alert(`Failed to ${i?"exclude":"include"} ${t}`+(e?.error_message?`: ${e.error_message}`:""));await _()}catch(e){alert(`Exclude toggle failed: ${e instanceof Error?e.message:String(e)}`)}finally{m(null)}})(e),"aria-label":t?"Excluded — click to include":"Included — click to exclude",tooltip:t?"Excluded from cross-test results — click to include":"Included in cross-test results — click to exclude",tooltipOptions:{position:"left"}})}}),_jsx(Column,{header:"Download",style:{width:"14rem"},body:e=>{const t=n?.runId===e.run_id&&"data"===n?.kind,o=n?.runId===e.run_id&&"report"===n?.kind,r=null!==n;return _jsxs("div",{style:{display:"flex",gap:"0.4rem"},children:[_jsx(Button,{icon:t?"pi pi-spin pi-spinner":"pi pi-download",label:"Raw",size:"small",outlined:!0,disabled:r,onClick:()=>y(e,"data"),tooltip:"Download raw + filtered trace data as one CSV",tooltipOptions:{position:"left"}}),_jsx(Button,{icon:o?"pi pi-spin pi-spinner":"pi pi-file",label:"Results",size:"small",outlined:!0,disabled:r,onClick:()=>y(e,"report"),tooltip:"Download a CSV report (metadata + cycles + results) for this test",tooltipOptions:{position:"left"}})]})}})]})]})};
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ /**
3
+ * Per-method cross-test rollup, one row per sample_id.
4
+ *
5
+ * Distinct from the per-run results overlay in <TestDataView>: this panel
6
+ * answers "across every run of sample X, what's the avg/min/max/stddev/count?"
7
+ * — the question operators ask when a sample is run repeatedly. Backed by
8
+ * `tis.sample_summaries`; refreshes on the server's `tis.sample_summary_updated`
9
+ * broadcast (a sibling finishing or an exclusion toggle).
10
+ *
11
+ * Renders nothing unless some method in the project declares aggregate
12
+ * results_fields. When `methodId` is omitted and more than one method has
13
+ * aggregates, a small method picker is shown.
14
+ */
15
+ export interface SampleSummaryPanelProps {
16
+ /** Defaults to the active project from <TisProvider>. */
17
+ projectId?: string;
18
+ /** Lock the panel to one method. When omitted, the user picks among
19
+ * methods that declare aggregate results_fields. */
20
+ methodId?: string;
21
+ }
22
+ export declare const SampleSummaryPanel: React.FC<SampleSummaryPanelProps>;
23
+ //# sourceMappingURL=SampleSummaryPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleSummaryPanel.d.ts","sourceRoot":"","sources":["../../../src/components/tis/SampleSummaryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,uBAAuB;IACpC,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;yDACqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAeD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgIhE,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useEffect,useContext}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Dropdown}from"primereact/dropdown";import{EventEmitterContext}from"../../core/EventEmitterContext";import{MessageType}from"../../hub/CommandMessage";import{useTis}from"./TisProvider";export const SampleSummaryPanel=e=>{const t=useTis(),{invoke:s,subscribe:r,unsubscribe:a}=useContext(EventEmitterContext),i=e.projectId??t.selection.projectId??void 0,m=React.useMemo(()=>Object.entries(t.schemas).filter(([,e])=>(e?.results_fields??[]).some(e=>e?.aggregate)).map(([e])=>e),[t.schemas]),[o,n]=useState(void 0),l=e.methodId??o??m[0];useEffect(()=>{e.methodId||o&&m.includes(o)||n(m[0])},[e.methodId,o,m]);const[d,u]=useState([]),[c,p]=useState(!1),h=React.useMemo(()=>{const e=l?t.schemas[l]:void 0;return(e?.results_fields??[]).filter(e=>e?.aggregate).map(e=>({name:e.name,header:(e.label||e.name)+(e.units?` [${e.units}]`:""),scale:"number"==typeof e.scale?e.scale:void 0}))},[t.schemas,l]);if(useEffect(()=>{if(!i||!l)return void u([]);let e=!1;const t=async()=>{p(!0);try{const t=await s("tis.sample_summaries",MessageType.Request,{project_id:i,method_id:l});!e&&t?.success&&u(t.data?.summaries??[])}catch(e){}finally{e||p(!1)}};t();const m=r("tis.sample_summary_updated",e=>{e?.project_id===i&&e?.method_id===l&&t()});return()=>{e=!0,a(m)}},[i,l,t.state.activeRunId,t.state.active]),0===m.length)return null;return _jsxs("div",{style:{width:"100%",maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",marginBottom:"1rem"},children:[_jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem",gap:"0.5rem",flexWrap:"wrap"},children:[_jsx("h3",{style:{margin:0},children:"Sample Summary"}),!e.methodId&&m.length>1&&_jsx(Dropdown,{value:l,options:m.map(e=>({label:e,value:e})),onChange:e=>n(e.value),style:{minWidth:"12rem"}})]}),_jsxs(DataTable,{value:d,loading:c,dataKey:"sample_id",emptyMessage:"No samples yet.",scrollable:!0,tableStyle:{minWidth:0},style:{width:"100%"},size:"small",stripedRows:!0,children:[_jsx(Column,{field:"sample_id",header:"Sample ID",sortable:!0,style:{minWidth:"8rem"}}),h.map(e=>_jsx(Column,{header:e.header,bodyStyle:{fontVariantNumeric:"tabular-nums",textAlign:"right"},style:{minWidth:"7rem"},body:t=>((e,t)=>{if(null==e)return"—";if("number"==typeof e){if(!Number.isFinite(e))return String(e);const s="number"==typeof t&&0!==t?e*t:e;return Number.parseFloat(s.toPrecision(6)).toString()}return String(e)})(t.summary?.[e.name],e.scale)},e.name)),_jsx(Column,{header:"# Tests",bodyStyle:{textAlign:"right"},style:{width:"6rem"},body:e=>e.included_count}),_jsx(Column,{header:"Excluded",bodyStyle:{textAlign:"right"},style:{width:"6rem"},body:e=>e.excluded_count>0?e.excluded_count:"—"})]})]})};
@@ -0,0 +1,87 @@
1
+ /*
2
+ * ScienceTable — "instrument report" styling for cycle/results tables.
3
+ *
4
+ * Every rule is scoped under `.p-datatable.ac-science-table` (both classes on
5
+ * the DataTable root) so it out-specifies the PrimeReact theme's
6
+ * `.p-datatable ...` rules and cannot bleed onto any other table. The palette
7
+ * is a fixed light "lab report" look (dark headers, cream cells) independent
8
+ * of the app theme — that IS the requested Bluehill appearance.
9
+ */
10
+
11
+ .ac-science-table-wrap {
12
+ border: 1px solid #2b2b2b;
13
+ border-radius: 4px;
14
+ overflow: hidden;
15
+ background: #f7f4e9;
16
+ }
17
+
18
+ /* Dark title bar with a centered caption, like "Results 1". */
19
+ .ac-science-table-title {
20
+ background: #2b2b2b;
21
+ color: #ffffff;
22
+ text-align: center;
23
+ font-weight: 600;
24
+ letter-spacing: 0.02em;
25
+ padding: 0.4rem 0.75rem;
26
+ font-size: 0.95rem;
27
+ }
28
+
29
+ /* Horizontal scroll for wide results rows without pushing the page sideways. */
30
+ .ac-science-table-scroll {
31
+ overflow-x: auto;
32
+ }
33
+
34
+ /* ---- Column header band -------------------------------------------------- */
35
+ .p-datatable.ac-science-table .p-datatable-thead > tr > th {
36
+ background: #3d3d3d;
37
+ color: #ffffff;
38
+ text-align: center;
39
+ border: 1px solid #2b2b2b;
40
+ border-top: none;
41
+ padding: 0.35rem 0.6rem;
42
+ font-weight: 600;
43
+ vertical-align: middle;
44
+ }
45
+ .p-datatable.ac-science-table .p-datatable-thead > tr > th .p-column-header-content {
46
+ justify-content: center;
47
+ }
48
+
49
+ .ac-sci-th {
50
+ display: flex;
51
+ flex-direction: column;
52
+ align-items: center;
53
+ line-height: 1.15;
54
+ }
55
+ .ac-sci-th-unit {
56
+ font-weight: 400;
57
+ font-size: 0.8em;
58
+ opacity: 0.85;
59
+ }
60
+
61
+ /* ---- Data cells: cream, dark text, thin gridlines, tabular figures ------- */
62
+ .p-datatable.ac-science-table .p-datatable-tbody > tr {
63
+ background: #f7f4e9;
64
+ color: #1a1a1a;
65
+ }
66
+ .p-datatable.ac-science-table .p-datatable-tbody > tr > td {
67
+ background: #f7f4e9;
68
+ color: #1a1a1a;
69
+ text-align: center;
70
+ border: 1px solid #d9d2b8;
71
+ padding: 0.3rem 0.6rem;
72
+ font-variant-numeric: tabular-nums;
73
+ }
74
+ /* Faint zebra banding keeps long cycle lists readable on the cream base. */
75
+ .p-datatable.ac-science-table .p-datatable-tbody > tr:nth-child(even) > td {
76
+ background: #efe9d4;
77
+ }
78
+
79
+ /* ---- Row-index column: dark, matching the header band -------------------- */
80
+ .p-datatable.ac-science-table .p-datatable-thead > tr > th.ac-sci-index,
81
+ .p-datatable.ac-science-table .p-datatable-tbody > tr > td.ac-sci-index {
82
+ background: #3d3d3d;
83
+ color: #ffffff;
84
+ font-weight: 600;
85
+ text-align: center;
86
+ border: 1px solid #2b2b2b;
87
+ }
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import './ScienceTable.css';
3
+ export interface ScienceColumn {
4
+ /** Row property to read. */
5
+ field: string;
6
+ /** Header label (unit rendered separately in brackets). */
7
+ label: string;
8
+ /** Optional unit, shown as `[unit]` on a second header line. */
9
+ units?: string;
10
+ /** Cell text alignment. Default 'center' (report style). */
11
+ align?: 'left' | 'center' | 'right';
12
+ /** Optional custom cell renderer (e.g. numeric formatting). */
13
+ body?: (row: any) => React.ReactNode;
14
+ /** Optional per-column style (e.g. minWidth). */
15
+ style?: React.CSSProperties;
16
+ }
17
+ export interface ScienceTableProps {
18
+ /** Title shown in the dark bar above the table. Omit for no bar. */
19
+ title?: React.ReactNode;
20
+ columns: ScienceColumn[];
21
+ rows: any[];
22
+ /** Leading 1-based row-index column, like the Bluehill "1". Default true. */
23
+ showIndex?: boolean;
24
+ /** Header for the index column. Default "#". */
25
+ indexHeader?: string;
26
+ emptyMessage?: string;
27
+ /** Enable virtual scrolling; pair with `scrollHeight` for large runs. */
28
+ scrollable?: boolean;
29
+ scrollHeight?: string;
30
+ /** Virtual-scroll row height in px. Default 38. */
31
+ virtualItemSize?: number;
32
+ }
33
+ export declare const ScienceTable: React.FC<ScienceTableProps>;
34
+ export default ScienceTable;
35
+ //# sourceMappingURL=ScienceTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScienceTable.d.ts","sourceRoot":"","sources":["../../../src/components/tis/ScienceTable.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC1B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,CAAC;IACrC,iDAAiD;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAC9B,oEAAoE;IACpE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AASD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmDpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import"./ScienceTable.css";const HeaderCell=({column:e})=>_jsxs("div",{className:"ac-sci-th",children:[_jsx("span",{className:"ac-sci-th-name",children:e.label}),e.units?_jsxs("span",{className:"ac-sci-th-unit",children:["[",e.units,"]"]}):null]});export const ScienceTable=({title:e,columns:a,rows:l,showIndex:s=!0,indexHeader:c="#",emptyMessage:i="No data.",scrollable:t=!1,scrollHeight:r,virtualItemSize:n=38})=>{const d=t&&!!r;return _jsxs("div",{className:"ac-science-table-wrap",children:[null!=e&&_jsx("div",{className:"ac-science-table-title",children:e}),_jsx("div",{className:"ac-science-table-scroll",children:_jsxs(DataTable,{className:"ac-science-table",value:l,scrollable:t,scrollHeight:r,virtualScrollerOptions:d?{itemSize:n}:void 0,emptyMessage:i,children:[s?_jsx(Column,{header:c,headerClassName:"ac-sci-index",bodyClassName:"ac-sci-index",align:"center",alignHeader:"center",style:{width:"3.5rem",maxWidth:"3.5rem"},body:(e,a)=>a.rowIndex+1}):null,a.map(e=>_jsx(Column,{field:e.field,header:_jsx(HeaderCell,{column:e}),align:e.align??"center",alignHeader:"center",style:e.style,bodyClassName:"ac-sci-cell",body:e.body?a=>e.body(a):void 0},e.field))]})})]})};export default ScienceTable;
@@ -1 +1 @@
1
- {"version":3,"file":"TestDataView.d.ts","sourceRoot":"","sources":["../../../src/components/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