@adcops/autocore-react 3.3.85 → 3.3.87

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 (83) hide show
  1. package/dist/components/ValueInput.css +9 -12
  2. package/dist/components/ValueInput.d.ts +45 -154
  3. package/dist/components/ValueInput.d.ts.map +1 -1
  4. package/dist/components/ValueInput.js +1 -1
  5. package/dist/components/forms/FormRow.d.ts +20 -0
  6. package/dist/components/forms/FormRow.d.ts.map +1 -0
  7. package/dist/components/forms/FormRow.js +1 -0
  8. package/dist/components/forms/FormSection.d.ts +19 -0
  9. package/dist/components/forms/FormSection.d.ts.map +1 -0
  10. package/dist/components/forms/FormSection.js +1 -0
  11. package/dist/components/forms/forms.css +89 -0
  12. package/dist/components/forms/index.d.ts +3 -0
  13. package/dist/components/forms/index.d.ts.map +1 -0
  14. package/dist/components/forms/index.js +1 -0
  15. package/dist/components/tis-editor/TisConfigEditor.css +121 -0
  16. package/dist/components/tis-editor/TisConfigEditor.d.ts +28 -0
  17. package/dist/components/tis-editor/TisConfigEditor.d.ts.map +1 -0
  18. package/dist/components/tis-editor/TisConfigEditor.js +1 -0
  19. package/dist/components/tis-editor/editor/AnalysisEditor.d.ts +7 -0
  20. package/dist/components/tis-editor/editor/AnalysisEditor.d.ts.map +1 -0
  21. package/dist/components/tis-editor/editor/AnalysisEditor.js +1 -0
  22. package/dist/components/tis-editor/editor/AssetRefsEditor.d.ts +10 -0
  23. package/dist/components/tis-editor/editor/AssetRefsEditor.d.ts.map +1 -0
  24. package/dist/components/tis-editor/editor/AssetRefsEditor.js +1 -0
  25. package/dist/components/tis-editor/editor/ChartViewDialog.d.ts +16 -0
  26. package/dist/components/tis-editor/editor/ChartViewDialog.d.ts.map +1 -0
  27. package/dist/components/tis-editor/editor/ChartViewDialog.js +1 -0
  28. package/dist/components/tis-editor/editor/FieldArrayEditor.d.ts +8 -0
  29. package/dist/components/tis-editor/editor/FieldArrayEditor.d.ts.map +1 -0
  30. package/dist/components/tis-editor/editor/FieldArrayEditor.js +1 -0
  31. package/dist/components/tis-editor/editor/IdentitySection.d.ts +7 -0
  32. package/dist/components/tis-editor/editor/IdentitySection.d.ts.map +1 -0
  33. package/dist/components/tis-editor/editor/IdentitySection.js +1 -0
  34. package/dist/components/tis-editor/editor/MethodFormEditor.d.ts +20 -0
  35. package/dist/components/tis-editor/editor/MethodFormEditor.d.ts.map +1 -0
  36. package/dist/components/tis-editor/editor/MethodFormEditor.js +1 -0
  37. package/dist/components/tis-editor/editor/RawDataEditor.d.ts +7 -0
  38. package/dist/components/tis-editor/editor/RawDataEditor.d.ts.map +1 -0
  39. package/dist/components/tis-editor/editor/RawDataEditor.js +1 -0
  40. package/dist/components/tis-editor/editor/SaveDiffDialog.d.ts +22 -0
  41. package/dist/components/tis-editor/editor/SaveDiffDialog.d.ts.map +1 -0
  42. package/dist/components/tis-editor/editor/SaveDiffDialog.js +1 -0
  43. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts +11 -0
  44. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts.map +1 -0
  45. package/dist/components/tis-editor/editor/TestFieldDialog.js +1 -0
  46. package/dist/components/tis-editor/editor/ViewsEditor.d.ts +7 -0
  47. package/dist/components/tis-editor/editor/ViewsEditor.d.ts.map +1 -0
  48. package/dist/components/tis-editor/editor/ViewsEditor.js +1 -0
  49. package/dist/components/tis-editor/types.d.ts +78 -0
  50. package/dist/components/tis-editor/types.d.ts.map +1 -0
  51. package/dist/components/tis-editor/types.js +1 -0
  52. package/dist/components/tis-editor/validation.d.ts +20 -0
  53. package/dist/components/tis-editor/validation.d.ts.map +1 -0
  54. package/dist/components/tis-editor/validation.js +1 -0
  55. package/dist/hooks/useAmsAssetTypes.d.ts +23 -0
  56. package/dist/hooks/useAmsAssetTypes.d.ts.map +1 -0
  57. package/dist/hooks/useAmsAssetTypes.js +1 -0
  58. package/dist/hooks/useTisConfig.d.ts +51 -0
  59. package/dist/hooks/useTisConfig.d.ts.map +1 -0
  60. package/dist/hooks/useTisConfig.js +1 -0
  61. package/package.json +9 -3
  62. package/src/components/ValueInput.css +9 -12
  63. package/src/components/ValueInput.tsx +132 -317
  64. package/src/components/forms/FormRow.tsx +37 -0
  65. package/src/components/forms/FormSection.tsx +39 -0
  66. package/src/components/forms/forms.css +89 -0
  67. package/src/components/forms/index.ts +2 -0
  68. package/src/components/tis-editor/TisConfigEditor.css +121 -0
  69. package/src/components/tis-editor/TisConfigEditor.tsx +321 -0
  70. package/src/components/tis-editor/editor/AnalysisEditor.tsx +54 -0
  71. package/src/components/tis-editor/editor/AssetRefsEditor.tsx +187 -0
  72. package/src/components/tis-editor/editor/ChartViewDialog.tsx +170 -0
  73. package/src/components/tis-editor/editor/FieldArrayEditor.tsx +131 -0
  74. package/src/components/tis-editor/editor/IdentitySection.tsx +36 -0
  75. package/src/components/tis-editor/editor/MethodFormEditor.tsx +176 -0
  76. package/src/components/tis-editor/editor/RawDataEditor.tsx +117 -0
  77. package/src/components/tis-editor/editor/SaveDiffDialog.tsx +160 -0
  78. package/src/components/tis-editor/editor/TestFieldDialog.tsx +134 -0
  79. package/src/components/tis-editor/editor/ViewsEditor.tsx +101 -0
  80. package/src/components/tis-editor/types.ts +95 -0
  81. package/src/components/tis-editor/validation.ts +104 -0
  82. package/src/hooks/useAmsAssetTypes.ts +70 -0
  83. package/src/hooks/useTisConfig.ts +164 -0
@@ -1,29 +1,26 @@
1
1
  /*
2
2
  * ValueInput sizing.
3
3
  *
4
- * Within a .p-inputgroup, PrimeReact gives .p-inputwrapper `flex: 1 1 auto`
5
- * so the InputNumber stretches to fill all available space. Override that
6
- * for our sized variants so only the input field is constrained — label,
7
- * accept/cancel buttons keep their natural size.
4
+ * NumericFormat with customInput=InputText renders a plain <input class="p-inputtext">
5
+ * (no .p-inputwrapper span like PrimeReact's InputNumber). In a .p-inputgroup the
6
+ * input defaults to flex: 1 1 auto; we override that so the field stays at a
7
+ * fixed width while the label addon and accept/cancel buttons keep their
8
+ * natural sizes.
8
9
  */
9
10
 
10
- .value-input-field.p-inputwrapper {
11
+ .value-input-field.p-inputtext {
11
12
  flex: 0 0 auto;
12
- }
13
-
14
- .value-input-field.p-inputwrapper .p-inputtext {
15
- width: 100%;
16
13
  box-sizing: border-box;
17
14
  }
18
15
 
19
- .value-input-field.size-small.p-inputwrapper {
16
+ .value-input-field.size-small.p-inputtext {
20
17
  width: 30mm;
21
18
  }
22
19
 
23
- .value-input-field.size-normal.p-inputwrapper {
20
+ .value-input-field.size-normal.p-inputtext {
24
21
  width: 55mm;
25
22
  }
26
23
 
27
- .value-input-field.size-large.p-inputwrapper {
24
+ .value-input-field.size-large.p-inputtext {
28
25
  width: 70mm;
29
26
  }
@@ -1,167 +1,58 @@
1
1
  /** @file
2
- * `ValueInput` is a React component for number input that encapsulates various features
3
- * such as custom numeric formatting, optional currency formatting, increment and decrement
4
- * buttons, and validation. This component uses the PrimeReact `InputNumber` control
5
- * to provide a rich input experience, including handling both decimal and currency modes,
6
- * with configurable precision and optional prefix/suffix text.
2
+ * `ValueInput` is a React component for numeric entry built on top of
3
+ * `react-number-format`. It wraps a PrimeReact `InputText` so the field
4
+ * inherits the standard inputgroup styling and integrates with the
5
+ * accept/cancel button row below.
7
6
  *
8
- * Properties:
9
- * - `label`: Label text displayed on the input field.
10
- * - `value`: Current numeric value of the input field.
11
- * - `min`: Minimum allowable value.
12
- * - `max`: Maximum allowable value.
13
- * - `minPrecision`: Minimum number of decimal places to display.
14
- * - `maxPrecision`: Maximum number of decimal places allowed.
15
- * - `mode`: Determines whether the input is treated as a plain decimal or currency. Defaults to "decimal".
16
- * - `currency`: ISO 4217 currency code for formatting the value as currency.
17
- * - `prefix`: String to display before the value.
18
- * - `suffix`: String to display after the value.
19
- * - `showButtons`: Whether to display increment and decrement buttons.
20
- * - `step`: The amount by which the value should be incremented or decremented.
21
- * - `locale`: Locale code for formatting the value.
22
- * - `description`: Additional descriptive text to display below the input.
23
- * - `disabled`: Whether the input is disabled.
24
- * - `dispatchTopic`: Event topic to dispatch on value change.
25
- * - `placeholder`: Placeholder text when the input is empty.
26
- * - `onValueChanged`: Callback function that is called when the user accepts a new value.
27
- *
28
- * Example Usage:
29
- * ```tsx
30
- * <ValueInput
31
- * label="Quantity"
32
- * value={10}
33
- * min={1}
34
- * max={100}
35
- * minPrecision={0}
36
- * maxPrecision={2}
37
- * mode="decimal"
38
- * showButtons={true}
39
- * step={1}
40
- * locale="en-US"
41
- * onValueChanged={(newValue) => console.log("New Value:", newValue)}
42
- * />
43
- * ```
7
+ * Why react-number-format and not PrimeReact's `InputNumber`:
8
+ * - `InputNumber` handles the `-` key via `onKeyDown` (sign-toggle action).
9
+ * On Wayland on-screen keyboards (Ubuntu 24 virtual keyboard) keydown is
10
+ * not always delivered, so negative entry was broken on touch HMIs.
11
+ * - `NumericFormat` treats the input as text and validates it against a
12
+ * numeric format. The user can simply type `-`, `2`, `0`, `0` to get
13
+ * `-200` on every input device.
44
14
  *
45
- * This example creates a `ValueInput` component for entering quantities, with values ranging from 1 to 100,
46
- * allowing up to 2 decimal places. Increment and decrement buttons are visible, and the new value is logged
47
- * to the console when accepted.
15
+ * Properties:
16
+ * - `label`: Optional label addon shown before the field.
17
+ * - `value`: Externally controlled value.
18
+ * - `min` / `max`: Range validation, applied on accept.
19
+ * - `minPrecision` / `maxPrecision`: Decimal precision. (Aliases
20
+ * `minFractionDigits` / `maxFractionDigits` are also accepted for
21
+ * compatibility with older call sites.)
22
+ * - `prefix` / `suffix`: Inline string before/after the number.
23
+ * - `description`: Small advisory text below the field.
24
+ * - `disabled`: Disable all interaction.
25
+ * - `dispatchTopic`: Topic dispatched on accept via the EventEmitter context.
26
+ * - `placeholder`: Placeholder when empty.
27
+ * - `onValueChanged`: Called with the new numeric value when the user accepts.
28
+ * - `size`: Field width — small (30mm), normal (55mm), large (70mm).
48
29
  */
49
30
  import React from 'react';
50
- import { type InputNumberProps } from 'primereact/inputnumber';
51
- import "./ValueInput.css";
31
+ import './ValueInput.css';
52
32
  export type ValueInputSize = 'small' | 'normal' | 'large';
53
- /**
54
- * Properties of the ValueInput component.
55
- */
56
- interface ValueInputProps extends Omit<InputNumberProps, 'value' | 'size'> {
57
- /**
58
- * The label for the ValueInput field.
59
- */
60
- label: React.ReactNode | undefined | null;
61
- /**
62
- * The value for the field.
63
- */
33
+ export interface ValueInputProps {
34
+ label?: React.ReactNode | null;
64
35
  value: number | null;
65
- /**
66
- * Minimum value for the field.
67
- */
68
- min?: number | undefined;
69
- /**
70
- * Minimum value for the field.
71
- */
72
- max?: number | undefined;
73
- /**
74
- * Minimum number of decimal points. The user will not
75
- * be required to type the decimal values, but this minimum
76
- * precision will always be displayed.
77
- * Must be less than or equal to maxPrecision, or
78
- * the component will throw an error.
79
- * @default 0
80
- */
81
- minPrecision?: number | undefined;
82
- /**
83
- * Maximum number of decimal points.
84
- * Set to 0 for integer-only. Must be greater or equal to than minPrecision, or
85
- * the component will throw an error.
86
- * @default 3
87
- */
88
- maxPrecision?: number | undefined;
89
- /**
90
- * Defines the behavior of the component.
91
- * If set to "currency", then you need to specify the
92
- * currency type using the currency property.
93
- * @default "decimal"
94
- */
95
- mode?: "currency" | "decimal" | undefined;
96
- /**
97
- * The currency to use in currency formatting. Possible values are the
98
- * [ISO 4217 currency codes](https://www.six-group.com/en/products-services/financial-information/data-standards.html#scrollTo=maintenance-agency),
99
- * such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB.
100
- * If the mode is "currency", the currency property must be provided.
101
- *
102
- * @default "USD"
103
- */
104
- currency?: string;
105
- /**
106
- * An optional prefix before the value of the field.
107
- * Unlike the TextInput control, this prefix is internal to the field.
108
- */
109
- prefix?: string | undefined;
110
- /**
111
- * An optional suffix after the value of the field.
112
- * Unlike the TextInput control, this prefix is internal to the field.
113
- */
114
- suffix?: string | undefined;
115
- /**
116
- * Set true to display buttons to increment/decrement the value.
117
- * Use the step property to adjust the amount that the value will change.
118
- *
119
- * @default false
120
- */
121
- showButtons?: boolean;
122
- /**
123
- * The amount clicking an increment/decrement buttion will change the value.
124
- */
125
- step?: number | undefined;
126
- /**
127
- * Locale to be used in formatting. Changes how the numbers/separators are displayed
128
- * for international users. The typical locale codes are used.
129
- *
130
- * @default "en-US"
131
- */
132
- locale?: string | undefined;
133
- /**
134
- * A small, advisory text below the field.
135
- */
136
- description?: React.ReactNode | undefined;
137
- /**
138
- * If true, all functions of the field will be disabled.
139
- */
140
- disabled?: boolean | undefined;
141
- /** Topic on which the value will be dispatched through the user interfave on successful data entry. */
142
- dispatchTopic?: string | undefined;
143
- /**
144
- * Placeholder string to display if the value is empty.
145
- */
146
- placeholder?: string | undefined;
147
- /**
148
- * The user has accepted a new value.
149
- * @param newValue New value accepted by the user.
150
- */
36
+ min?: number;
37
+ max?: number;
38
+ /** Minimum decimal places displayed. @default 0 */
39
+ minPrecision?: number;
40
+ /** Maximum decimal places allowed. @default 3 */
41
+ maxPrecision?: number;
42
+ /** Alias for `minPrecision` (compat with older call sites). */
43
+ minFractionDigits?: number;
44
+ /** Alias for `maxPrecision` (compat with older call sites). */
45
+ maxFractionDigits?: number;
46
+ prefix?: string;
47
+ suffix?: string;
48
+ description?: React.ReactNode;
49
+ disabled?: boolean;
50
+ dispatchTopic?: string;
51
+ placeholder?: string;
151
52
  onValueChanged?(newValue: number): void;
152
- /**
153
- * Width of the InputNumber field. The label addon and accept/cancel buttons
154
- * keep their natural size; only the numeric input is constrained.
155
- * Widths: small=30mm, normal=55mm, large=70mm.
156
- * @default 'normal'
157
- */
158
53
  size?: ValueInputSize;
54
+ className?: string;
159
55
  }
160
- /**
161
- * A convenient field with all the usual features of inputing numbers.
162
- * Wraps the common features of use of a InputNumber, p-inputgroup, some icon buttons,
163
- * accepting and rejecting values and keyboard management.
164
- */
165
56
  export declare const ValueInput: React.FC<ValueInputProps>;
166
57
  export default ValueInput;
167
58
  //# sourceMappingURL=ValueInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValueInput.d.ts","sourceRoot":"","sources":["../../src/components/ValueInput.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAGH,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI5E,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC;IAEtE;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;IAG1C;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAGlC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAGlC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IAG1C;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAG1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmLhD,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,CA8HhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React,{useState,useRef,useEffect,useContext}from"react";import clsx from"clsx";import{InputNumber}from"primereact/inputnumber";import{EventEmitterContext}from"../core/EventEmitterContext";import{Button}from"primereact/button";import"./ValueInput.css";export const ValueInput=({label:e,value:t=null,min:s,max:i,minPrecision:n=0,maxPrecision:a=3,mode:o="decimal",currency:u="USD",prefix:l,suffix:r,showButtons:c=!1,step:p=1,locale:m="en-US",description:d,disabled:x=!1,dispatchTopic:f,placeholder:v,onValueChanged:b,size:h="normal",...j})=>{const[C,E]=useState(t),[_,N]=useState(t),[S,g]=useState(t),[y,k]=useState(!1),[B,I]=useState(!1),D=useRef(null),F=useContext(EventEmitterContext);useEffect(()=>{null!==S?(N(S),g(null),I(!1)):t!==_&&(N(t),E(t),k(!1),I(!1))},[t,_]);const V=()=>{var e;y&&null!==C&&(e=C,void 0!==i&&e>i||void 0!==s&&e<s?I(!0):(N(C),k(!1),b?.(C),I(!1),f&&F.dispatch({topic:f,payload:C})))},w=()=>{y&&(E(null),N(null),k(!1),I(!1))};return _jsxs("div",{children:[_jsxs("div",{className:"p-inputgroup",children:[null!=e&&""!==e&&_jsx("span",{className:"p-inputgroup-addon",children:e}),_jsx(InputNumber,{...j,ref:D,className:clsx("value-input-field",`size-${h}`,j.className),invalid:B,min:s,max:i,minFractionDigits:n,maxFractionDigits:a,mode:o,prefix:l,suffix:r,showButtons:c,step:p,placeholder:v,value:_,onChange:e=>{return t=e.value,y||(g(_),k(!0)),void E(t);var t},locale:m,currency:u,onKeyDown:e=>{"Enter"===e.key?V():"Escape"===e.key&&w()},disabled:x}),_jsx(Button,{icon:"pi pi-check",disabled:x||!y,className:"p-button-success",onClick:()=>V(),visible:!0,autoFocus:!1}),_jsx(Button,{icon:"pi pi-times",disabled:x||!y,className:"p-button-danger",onClickCapture:()=>w(),visible:!0,autoFocus:!1})]}),d&&_jsx("small",{children:d})]})};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: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;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * FormRow — grid-aligned label/input pair with optional required marker
3
+ * and inline error text. Drop inside a FormSection.
4
+ */
5
+ import * as React from 'react';
6
+ import './forms.css';
7
+ export interface FormRowProps {
8
+ label: React.ReactNode;
9
+ required?: boolean;
10
+ /** Optional descriptive hint shown beneath the label. */
11
+ hint?: React.ReactNode;
12
+ /** Inline error text shown beneath the input. */
13
+ error?: React.ReactNode;
14
+ /** Optional `htmlFor` association on the label tag. */
15
+ htmlFor?: string;
16
+ children?: React.ReactNode;
17
+ }
18
+ export declare const FormRow: React.FC<FormRowProps>;
19
+ export default FormRow;
20
+ //# sourceMappingURL=FormRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormRow.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormRow.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,iDAAiD;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAc1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import*as React from"react";import"./forms.css";export const FormRow=({label:r,required:s,hint:a,error:e,htmlFor:o,children:l})=>_jsxs("div",{className:"ac-form-row"+(e?" ac-form-row--error":""),children:[_jsxs("label",{className:"ac-form-row__label",htmlFor:o,children:[r,s&&_jsx("span",{className:"ac-form-row__required","aria-hidden":!0,children:" *"}),a&&_jsx("small",{className:"ac-form-row__hint",children:a})]}),_jsxs("div",{className:"ac-form-row__field",children:[l,e&&_jsx("small",{className:"ac-form-row__error",children:e})]})]});export default FormRow;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * FormSection — labeled bordered region containing a group of FormRow rows.
3
+ *
4
+ * Used by the TIS editor subforms and intended for app-level settings
5
+ * pages. Replaces the ad-hoc `.ac-form-grid` divs scattered across project
6
+ * settings views.
7
+ */
8
+ import * as React from 'react';
9
+ import './forms.css';
10
+ export interface FormSectionProps {
11
+ title?: React.ReactNode;
12
+ description?: React.ReactNode;
13
+ children?: React.ReactNode;
14
+ /** Right-aligned controls (buttons, dirty pill, etc.). */
15
+ actions?: React.ReactNode;
16
+ }
17
+ export declare const FormSection: React.FC<FormSectionProps>;
18
+ export default FormSection;
19
+ //# sourceMappingURL=FormSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormSection.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormSection.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiBlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import*as React from"react";import"./forms.css";export const FormSection=({title:s,description:c,actions:e,children:a})=>_jsxs("section",{className:"ac-form-section",children:[(s||e)&&_jsxs("header",{className:"ac-form-section__header",children:[_jsxs("div",{children:[s&&_jsx("h3",{className:"ac-form-section__title",children:s}),c&&_jsx("small",{className:"ac-form-section__desc",children:c})]}),e&&_jsx("div",{className:"ac-form-section__actions",children:e})]}),_jsx("div",{className:"ac-form-section__body",children:a})]});export default FormSection;
@@ -0,0 +1,89 @@
1
+ .ac-form-section {
2
+ border: 1px solid var(--surface-d, #e2e8f0);
3
+ border-radius: 6px;
4
+ background: var(--surface-card, #fff);
5
+ margin-bottom: 1rem;
6
+ }
7
+
8
+ .ac-form-section__header {
9
+ display: flex;
10
+ align-items: flex-start;
11
+ justify-content: space-between;
12
+ padding: 0.5rem 1rem;
13
+ border-bottom: 1px solid var(--surface-d, #e2e8f0);
14
+ background: var(--surface-b, #f8fafc);
15
+ border-top-left-radius: 6px;
16
+ border-top-right-radius: 6px;
17
+ }
18
+
19
+ .ac-form-section__title {
20
+ margin: 0;
21
+ font-size: 0.95rem;
22
+ font-weight: 600;
23
+ }
24
+
25
+ .ac-form-section__desc {
26
+ color: var(--text-color-secondary, #64748b);
27
+ display: block;
28
+ margin-top: 0.15rem;
29
+ }
30
+
31
+ .ac-form-section__actions {
32
+ display: flex;
33
+ gap: 0.5rem;
34
+ }
35
+
36
+ .ac-form-section__body {
37
+ padding: 0.75rem 1rem;
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: 0.5rem;
41
+ }
42
+
43
+ .ac-form-row {
44
+ display: grid;
45
+ grid-template-columns: minmax(8rem, 14rem) 1fr;
46
+ gap: 0.5rem 1rem;
47
+ align-items: start;
48
+ }
49
+
50
+ .ac-form-row--error .ac-form-row__field input,
51
+ .ac-form-row--error .ac-form-row__field .p-inputtext {
52
+ border-color: #dc2626;
53
+ }
54
+
55
+ .ac-form-row__label {
56
+ font-weight: 500;
57
+ padding-top: 0.4rem;
58
+ display: flex;
59
+ flex-direction: column;
60
+ }
61
+
62
+ .ac-form-row__required {
63
+ color: #dc2626;
64
+ }
65
+
66
+ .ac-form-row__hint {
67
+ color: var(--text-color-secondary, #64748b);
68
+ font-weight: 400;
69
+ font-size: 0.75rem;
70
+ margin-top: 0.15rem;
71
+ }
72
+
73
+ .ac-form-row__field {
74
+ display: flex;
75
+ flex-direction: column;
76
+ gap: 0.25rem;
77
+ }
78
+
79
+ .ac-form-row__field > input,
80
+ .ac-form-row__field > .p-inputtext,
81
+ .ac-form-row__field > .p-dropdown,
82
+ .ac-form-row__field > .p-inputtextarea {
83
+ width: 100%;
84
+ }
85
+
86
+ .ac-form-row__error {
87
+ color: #dc2626;
88
+ font-size: 0.75rem;
89
+ }
@@ -0,0 +1,3 @@
1
+ export { FormSection, type FormSectionProps } from './FormSection';
2
+ export { FormRow, type FormRowProps } from './FormRow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export{FormSection}from"./FormSection";export{FormRow}from"./FormRow";
@@ -0,0 +1,121 @@
1
+ .tis-editor {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ min-height: 0;
6
+ }
7
+
8
+ .tis-editor__header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ padding: 0.75rem 1rem;
13
+ border-bottom: 1px solid var(--surface-d, #e2e8f0);
14
+ }
15
+
16
+ .tis-editor__header h2 {
17
+ margin: 0;
18
+ font-size: 1.125rem;
19
+ }
20
+
21
+ .tis-editor__header-actions {
22
+ display: flex;
23
+ gap: 0.5rem;
24
+ }
25
+
26
+ .tis-editor__dirty-pill {
27
+ display: inline-block;
28
+ background: #ea580c;
29
+ color: white;
30
+ font-size: 0.7rem;
31
+ font-weight: 600;
32
+ text-transform: uppercase;
33
+ letter-spacing: 0.05em;
34
+ padding: 0.15rem 0.5rem;
35
+ border-radius: 999px;
36
+ margin-left: 0.5rem;
37
+ vertical-align: middle;
38
+ }
39
+
40
+ .tis-editor__body {
41
+ flex: 1;
42
+ display: flex;
43
+ min-height: 0;
44
+ }
45
+
46
+ .tis-editor__sidebar {
47
+ flex: 0 0 320px;
48
+ border-right: 1px solid var(--surface-d, #e2e8f0);
49
+ display: flex;
50
+ flex-direction: column;
51
+ min-height: 0;
52
+ }
53
+
54
+ .tis-editor__sidebar-actions {
55
+ display: flex;
56
+ gap: 0.25rem;
57
+ padding: 0.5rem;
58
+ border-bottom: 1px solid var(--surface-d, #e2e8f0);
59
+ flex-wrap: wrap;
60
+ }
61
+
62
+ .tis-editor__sidebar-actions .p-button {
63
+ flex: 1 1 auto;
64
+ min-width: 0;
65
+ }
66
+
67
+ .tis-editor__detail {
68
+ flex: 1;
69
+ display: flex;
70
+ flex-direction: column;
71
+ min-height: 0;
72
+ }
73
+
74
+ .tis-editor__detail-header {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: space-between;
78
+ padding: 0.5rem 1rem;
79
+ border-bottom: 1px solid var(--surface-d, #e2e8f0);
80
+ background: var(--surface-b, #f8fafc);
81
+ }
82
+
83
+ .tis-editor__editor-wrap {
84
+ flex: 1;
85
+ min-height: 0;
86
+ }
87
+
88
+ .tis-editor__editor-wrap > * {
89
+ height: 100%;
90
+ }
91
+
92
+ .tis-editor__error {
93
+ background: #fef2f2;
94
+ color: #991b1b;
95
+ border-left: 3px solid #dc2626;
96
+ padding: 0.5rem 1rem;
97
+ margin: 0.5rem 1rem;
98
+ font-size: 0.875rem;
99
+ }
100
+
101
+ .tis-editor__error pre {
102
+ white-space: pre-wrap;
103
+ margin: 0.25rem 0 0 0;
104
+ font-family: ui-monospace, monospace;
105
+ font-size: 0.8rem;
106
+ }
107
+
108
+ .tis-editor__empty {
109
+ flex: 1;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ color: var(--text-color-secondary, #64748b);
114
+ }
115
+
116
+ .tis-editor__new-method-label {
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 0.25rem;
120
+ margin-bottom: 0.25rem;
121
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * TisConfigEditor — master-detail UI for editing TIS test_methods.
3
+ *
4
+ * Left: PrimeReact DataTable listing methods (method_id + label).
5
+ * Right: tabbed editor for the selected method. Phase 1 ships a single
6
+ * JSON-via-Monaco tab; Phase 2 layers form editors on top of it.
7
+ * Action bar: New / Duplicate / Delete / Apply / Save / Revert.
8
+ *
9
+ * "Apply" pushes the local Monaco buffer to the server-side stage
10
+ * (`tis.put_method`). "Save" persists the entire stage to project.json
11
+ * (`tis.save_config`). "Revert" drops the stage (`tis.discard_config_changes`).
12
+ *
13
+ * Save is disabled (with a tooltip) when active tests are open against
14
+ * any method — the server enforces the same gate, but disabling on the
15
+ * client gives clearer UX.
16
+ */
17
+ import { type TisIpcInvoker } from '../../hooks/useTisConfig';
18
+ import './TisConfigEditor.css';
19
+ export interface TisConfigEditorProps {
20
+ /** Project ID. Today this is informational (the server hosts one
21
+ * project) but the wire contract carries it for forward compatibility. */
22
+ projectId: string;
23
+ /** Optional invoker override — primarily for the playground / tests. */
24
+ invoker?: TisIpcInvoker;
25
+ }
26
+ export declare const TisConfigEditor: React.FC<TisConfigEditorProps>;
27
+ export default TisConfigEditor;
28
+ //# sourceMappingURL=TisConfigEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TisConfigEditor.d.ts","sourceRoot":"","sources":["../../../src/components/tis-editor/TisConfigEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAWH,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM5E,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,oBAAoB;IACjC;+EAC2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,CAAC;CAC3B;AAkBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoQ1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useEffect,useMemo,useState}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{InputText}from"primereact/inputtext";import{Dialog}from"primereact/dialog";import{useContext}from"react";import{EventEmitterContext}from"../../core/EventEmitterContext";import{MessageType}from"../../hub/CommandMessage";import{useTisConfig}from"../../hooks/useTisConfig";import{useAmsAssetTypes}from"../../hooks/useAmsAssetTypes";import{MethodFormEditor}from"./editor/MethodFormEditor";import{SaveDiffDialog}from"./editor/SaveDiffDialog";import"./TisConfigEditor.css";const EMPTY_METHOD={label:"",description:"",project_fields:[],config_fields:[],cycle_fields:[],results_fields:[],views:{},asset_refs:[]};export const TisConfigEditor=({projectId:e,invoker:t})=>{const s=useContext(EventEmitterContext),i=t??(async(e,t)=>await s.invoke(e,MessageType.Request,t)),o=useTisConfig(e,{invoker:i}),a=useAmsAssetTypes({invoker:i}),[n,r]=useState(null),[l,d]=useState(null),[c,m]=useState(!1),[f,p]=useState(!1),[h,u]=useState(!1),[_,g]=useState(""),x=useMemo(()=>o.config?Object.entries(o.config.methods).map(([e,t])=>({id:e,label:t?.label??""})):[],[o.config]);useEffect(()=>{if(!n&&o.config){const e=o.config.defaultMethodId||Object.keys(o.config.methods)[0]||null;r(e)}},[o.config,n]),useEffect(()=>{d(null)},[n]);return _jsxs("div",{className:"tis-editor",children:[_jsxs("header",{className:"tis-editor__header",children:[_jsxs("h2",{children:["Test Methods"," ",o.config?.dirty&&_jsx("span",{className:"tis-editor__dirty-pill",children:"unsaved"})]}),_jsxs("div",{className:"tis-editor__header-actions",children:[_jsx(Button,{label:"Save…",icon:"pi pi-save",disabled:c||!o.config?.dirty,onClick:()=>p(!0)}),_jsx(Button,{label:"Revert",icon:"pi pi-undo",className:"p-button-secondary",disabled:c||!o.config?.dirty,onClick:async()=>{if(window.confirm("Discard all in-progress edits? This cannot be undone.")){m(!0);try{await o.revert()}catch(e){d(String(e?.message??e))}finally{m(!1)}}}})]})]}),o.error&&_jsxs("div",{className:"tis-editor__error",children:[_jsx("strong",{children:"Error:"})," ",_jsx("pre",{children:o.error})]}),_jsxs("div",{className:"tis-editor__body",children:[_jsxs("aside",{className:"tis-editor__sidebar",children:[_jsxs("div",{className:"tis-editor__sidebar-actions",children:[_jsx(Button,{label:"New",icon:"pi pi-plus",disabled:c,onClick:()=>u(!0)}),_jsx(Button,{label:"Duplicate",icon:"pi pi-clone",className:"p-button-secondary",disabled:c||!n,onClick:async()=>{if(!n||!o.config)return;const e=o.config.methods[n];if(!e)return;let t=`${n}_copy`,s=2;for(;o.config.methods[t];)t=`${n}_copy_${s++}`;m(!0);try{await o.putMethod(t,JSON.parse(JSON.stringify(e))),r(t)}catch(e){d(String(e?.message??e))}finally{m(!1)}}}),_jsx(Button,{label:"Delete",icon:"pi pi-trash",className:"p-button-danger",disabled:c||!n,onClick:async()=>{if(n&&window.confirm(`Remove method "${n}"? This is staged — Save persists it.`)){m(!0);try{await o.removeMethod(n),r(null)}catch(e){d(String(e?.message??e))}finally{m(!1)}}}})]}),_jsxs(DataTable,{value:x,selection:x.find(e=>e.id===n)??null,onSelectionChange:e=>r(e.value?.id??null),selectionMode:"single",dataKey:"id",scrollable:!0,scrollHeight:"flex",emptyMessage:o.loading?"Loading…":"No test methods defined.",children:[_jsx(Column,{field:"id",header:"Method ID"}),_jsx(Column,{field:"label",header:"Label"})]})]}),_jsx("section",{className:"tis-editor__detail",children:n&&o.config?.methods[n]?_jsxs(_Fragment,{children:[l&&_jsx("div",{className:"tis-editor__error",children:_jsx("pre",{children:l})}),_jsx(MethodFormEditor,{methodId:n,method:o.config.methods[n],onApply:async e=>{if(n){m(!0);try{await o.putMethod(n,e),d(null)}catch(e){d(String(e?.message??e))}finally{m(!1)}}},busy:c,knownAssetTypes:a.types})]}):_jsx("div",{className:"tis-editor__empty",children:"Select a test method on the left, or create a new one."})})]}),_jsxs(Dialog,{header:"New Test Method",visible:h,onHide:()=>u(!1),style:{width:"24rem"},children:[_jsxs("label",{className:"tis-editor__new-method-label",children:["Method ID",_jsx(InputText,{value:_,onChange:e=>g(e.target.value),placeholder:"e.g. translational_traction",autoFocus:!0})]}),_jsx("small",{children:"Canonical key — appears in wire payloads, on-disk paths, and generated code."}),_jsxs("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"flex-end",marginTop:"1rem"},children:[_jsx(Button,{label:"Cancel",className:"p-button-text",onClick:()=>u(!1)}),_jsx(Button,{label:"Create",disabled:!_.trim()||c,onClick:async()=>{const e=_.trim();if(e)if(o.config?.methods[e])d(`A method named "${e}" already exists.`);else{m(!0);try{await o.putMethod(e,EMPTY_METHOD),r(e),u(!1),g("")}catch(e){d(String(e?.message??e))}finally{m(!1)}}}})]})]}),_jsx(SaveDiffDialog,{visible:f,staged:o.config?.methods??{},invoker:i,onConfirm:async()=>{m(!0);try{await o.save(),p(!1)}catch(e){d(String(e?.message??e))}finally{m(!1)}},onCancel:()=>p(!1)})]})};export default TisConfigEditor;
@@ -0,0 +1,7 @@
1
+ import type { TestMethod } from '../types';
2
+ export interface AnalysisEditorProps {
3
+ method: TestMethod;
4
+ onChange: (next: TestMethod) => void;
5
+ }
6
+ export declare const AnalysisEditor: React.FC<AnalysisEditorProps>;
7
+ //# sourceMappingURL=AnalysisEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalysisEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/tis-editor/editor/AnalysisEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwCxD,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{InputText}from"primereact/inputtext";import{Checkbox}from"primereact/checkbox";import{FormSection}from"../../forms/FormSection";import{FormRow}from"../../forms/FormRow";const empty=()=>({script:"",function:""});export const AnalysisEditor=({method:e,onChange:t})=>{const o=e.analysis,n=!!o,r=o=>{t({...e,analysis:o})};return _jsxs(FormSection,{title:"Analysis Hook",description:"Optional post-cycle Python entry point. Codegen wires this into the method's TestManager.",actions:_jsx(Checkbox,{checked:n,onChange:e=>r(e.checked?empty():null)}),children:[!n&&_jsx("small",{children:"Analysis hook disabled. Tick the box to enable."}),n&&o&&_jsxs(_Fragment,{children:[_jsx(FormRow,{label:"Script",required:!0,hint:"Path under autocore-python's scripts directory.",children:_jsx(InputText,{value:o.script,onChange:e=>r({...o,script:e.target.value}),placeholder:"e.g. analysis/traction_v1.py"})}),_jsx(FormRow,{label:"Function",required:!0,hint:"Entry-point name within the script.",children:_jsx(InputText,{value:o.function,onChange:e=>r({...o,function:e.target.value}),placeholder:"e.g. analyze_cycle"})})]})]})};
@@ -0,0 +1,10 @@
1
+ import type { TestMethod } from '../types';
2
+ export interface AssetRefsEditorProps {
3
+ method: TestMethod;
4
+ onChange: (next: TestMethod) => void;
5
+ /** Asset types known to AMS, supplied by the host. Empty array = use a
6
+ * free-form text field. Phase 3 wires this up to ams.list_schemas. */
7
+ knownAssetTypes?: string[];
8
+ }
9
+ export declare const AssetRefsEditor: React.FC<AssetRefsEditorProps>;
10
+ //# sourceMappingURL=AssetRefsEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetRefsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/tis-editor/editor/AssetRefsEditor.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,UAAU,CAAC;AAarD,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC;2EACuE;IACvE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAOD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsJ1D,CAAC"}