@flamingo-stack/openframe-frontend-core 0.0.740 → 0.0.742

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 (206) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-BV5WZVOP.cjs → chunk-32Q7K5OP.cjs} +254 -254
  3. package/dist/{chunk-ZLTCQKTD.cjs → chunk-3LW43GIJ.cjs} +6 -6
  4. package/dist/{chunk-VA7OMDZO.cjs → chunk-4FWURR3W.cjs} +50 -50
  5. package/dist/{chunk-EKGL5K5K.cjs → chunk-4LDU32OB.cjs} +17 -17
  6. package/dist/{chunk-VC4IV3AY.cjs → chunk-4PKORVOX.cjs} +2804 -954
  7. package/dist/{chunk-3ZIQOYNX.cjs → chunk-54EA4RLX.cjs} +8 -8
  8. package/dist/{chunk-YXKB5WRE.cjs → chunk-5MH6BRPY.cjs} +36 -36
  9. package/dist/{chunk-PQ2M7P2U.cjs → chunk-5TCIRWHL.cjs} +9 -9
  10. package/dist/{chunk-WFPCCBOM.cjs → chunk-7AM3AFM4.cjs} +10 -10
  11. package/dist/{chunk-7ZFCR7UY.cjs → chunk-ABLUMGCI.cjs} +3 -3
  12. package/dist/{chunk-PX7FY655.cjs → chunk-ASMNNSUQ.cjs} +3 -3
  13. package/dist/{chunk-HF7Z2E4W.cjs → chunk-BI3XBCQX.cjs} +2 -2
  14. package/dist/{chunk-SA7LDEVJ.cjs → chunk-CSJO7ZGN.cjs} +3 -3
  15. package/dist/{chunk-VOX4E6AX.cjs → chunk-DGFDBPO7.cjs} +7 -5
  16. package/dist/{chunk-KHXZFLIN.cjs → chunk-DKOLQPE7.cjs} +8 -2
  17. package/dist/{chunk-BDA5F6RM.cjs → chunk-DNFSMVXJ.cjs} +16 -16
  18. package/dist/{chunk-B3XBJCOD.cjs → chunk-H3UA7UY5.cjs} +7 -7
  19. package/dist/{chunk-2Y5Y4FLM.cjs → chunk-HDBY2URA.cjs} +64 -64
  20. package/dist/{chunk-UW3YXDC4.cjs → chunk-HIRVNBX5.cjs} +20 -20
  21. package/dist/{chunk-LLAC2UZ3.cjs → chunk-ISJXKKYW.cjs} +28 -28
  22. package/dist/{chunk-FICJS5OA.cjs → chunk-KTPR66EE.cjs} +4 -4
  23. package/dist/{chunk-7UIQPMBJ.cjs → chunk-L34TKFTS.cjs} +21 -164
  24. package/dist/{chunk-AAFW4STC.cjs → chunk-LU7TD6QS.cjs} +5 -5
  25. package/dist/{chunk-3HPB4H4C.cjs → chunk-NTGIQP7O.cjs} +7 -7
  26. package/dist/{chunk-WBANGORJ.cjs → chunk-OBODY7F3.cjs} +3 -3
  27. package/dist/{chunk-GABDE3FM.cjs → chunk-OWGLRE74.cjs} +19 -19
  28. package/dist/{chunk-CWRVTQUO.cjs → chunk-PS6T65KA.cjs} +101 -101
  29. package/dist/{chunk-IFS4AH77.cjs → chunk-QYLIHZKZ.cjs} +10 -10
  30. package/dist/{chunk-GVTDVS5U.cjs → chunk-R34JD6NP.cjs} +3 -3
  31. package/dist/{chunk-VU4CKUJW.cjs → chunk-R6SCSV2I.cjs} +103 -103
  32. package/dist/{chunk-II4QMH26.cjs → chunk-STEJZPIO.cjs} +3 -3
  33. package/dist/{chunk-4RLGLB45.cjs → chunk-T433HSL6.cjs} +47 -47
  34. package/dist/{chunk-DSVNFRY5.cjs → chunk-U2O5YQRP.cjs} +38 -38
  35. package/dist/{chunk-O67V3HJR.cjs → chunk-URVIPSAJ.cjs} +24 -24
  36. package/dist/{chunk-HYBMADYO.cjs → chunk-UWHCRIQQ.cjs} +22 -22
  37. package/dist/{chunk-GSWQZX23.cjs → chunk-UY6A6TEY.cjs} +2 -2
  38. package/dist/{chunk-D5KEWWLW.cjs → chunk-UZLRSFGG.cjs} +32 -32
  39. package/dist/{chunk-DUVOQHQI.cjs → chunk-W2RM764D.cjs} +7 -7
  40. package/dist/{chunk-NTJE6SM6.cjs → chunk-WI2OTGKC.cjs} +2 -2
  41. package/dist/{chunk-SFY4UYPY.cjs → chunk-WIHHA54J.cjs} +44 -44
  42. package/dist/{chunk-YRE3O65E.cjs → chunk-XAA5EZ5T.cjs} +12 -12
  43. package/dist/{chunk-KLI4OSRA.cjs → chunk-YQGDXH3M.cjs} +2 -2
  44. package/dist/{chunk-SWR22DOZ.cjs → chunk-Z2DQYKZA.cjs} +89 -89
  45. package/dist/{chunk-5SVOGLNK.cjs → chunk-ZIFYSLIM.cjs} +6 -6
  46. package/dist/{cloud-tenants-PVXDI5MU.cjs → cloud-tenants-6ICAL3HO.cjs} +34 -34
  47. package/dist/components/case-studies/index.cjs +37 -37
  48. package/dist/components/chat/index.cjs +17 -17
  49. package/dist/components/contact/index.cjs +25 -25
  50. package/dist/components/docs/index.cjs +28 -28
  51. package/dist/components/embeds/index.cjs +25 -25
  52. package/dist/components/faq/index.cjs +26 -26
  53. package/dist/components/features/capability-explorer.d.ts +9 -2
  54. package/dist/components/features/capability-explorer.d.ts.map +1 -1
  55. package/dist/components/features/capability-explorer.js +113 -6
  56. package/dist/components/features/index.cjs +162 -24
  57. package/dist/components/features/index.d.ts +1 -0
  58. package/dist/components/features/index.d.ts.map +1 -1
  59. package/dist/components/features/index.js +1 -0
  60. package/dist/components/features/scripts/execution-cells.d.ts +65 -0
  61. package/dist/components/features/scripts/execution-cells.d.ts.map +1 -0
  62. package/dist/components/features/scripts/execution-cells.js +75 -0
  63. package/dist/components/features/scripts/execution-status.d.ts +48 -0
  64. package/dist/components/features/scripts/execution-status.d.ts.map +1 -0
  65. package/dist/components/features/scripts/execution-status.js +15 -0
  66. package/dist/components/features/scripts/index.d.ts +20 -0
  67. package/dist/components/features/scripts/index.d.ts.map +1 -0
  68. package/dist/components/features/scripts/index.js +59 -0
  69. package/dist/components/features/scripts/schedule-form/index.d.ts +18 -0
  70. package/dist/components/features/scripts/schedule-form/index.d.ts.map +1 -0
  71. package/dist/components/features/scripts/schedule-form/index.js +84 -0
  72. package/dist/components/features/scripts/schedule-form/schedule-enums.d.ts +24 -0
  73. package/dist/components/features/scripts/schedule-form/schedule-enums.d.ts.map +1 -0
  74. package/dist/components/features/scripts/schedule-form/schedule-enums.js +18 -0
  75. package/dist/components/features/scripts/schedule-form/schedule-form-fields.d.ts +57 -0
  76. package/dist/components/features/scripts/schedule-form/schedule-form-fields.d.ts.map +1 -0
  77. package/dist/components/features/scripts/schedule-form/schedule-form-fields.js +169 -0
  78. package/dist/components/features/scripts/schedule-form/schedule-form-types.d.ts +138 -0
  79. package/dist/components/features/scripts/schedule-form/schedule-form-types.d.ts.map +1 -0
  80. package/dist/components/features/scripts/schedule-form/schedule-form-types.js +72 -0
  81. package/dist/components/features/scripts/schedule-form/schedule-interval-input.d.ts +54 -0
  82. package/dist/components/features/scripts/schedule-form/schedule-interval-input.d.ts.map +1 -0
  83. package/dist/components/features/scripts/schedule-form/schedule-interval-input.js +60 -0
  84. package/dist/components/features/scripts/schedule-form/schedule-offline-fields.d.ts +29 -0
  85. package/dist/components/features/scripts/schedule-form/schedule-offline-fields.d.ts.map +1 -0
  86. package/dist/components/features/scripts/schedule-form/schedule-offline-fields.js +124 -0
  87. package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.d.ts +52 -0
  88. package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.d.ts.map +1 -0
  89. package/dist/components/features/scripts/schedule-form/schedule-script-picker-card.js +244 -0
  90. package/dist/components/features/scripts/schedule-form/schedule-script-search-field.d.ts +35 -0
  91. package/dist/components/features/scripts/schedule-form/schedule-script-search-field.d.ts.map +1 -0
  92. package/dist/components/features/scripts/schedule-form/schedule-script-search-field.js +58 -0
  93. package/dist/components/features/scripts/schedule-form/schedule-scripts-field.d.ts +25 -0
  94. package/dist/components/features/scripts/schedule-form/schedule-scripts-field.d.ts.map +1 -0
  95. package/dist/components/features/scripts/schedule-form/schedule-scripts-field.js +66 -0
  96. package/dist/components/features/scripts/schedule-form/schedule-timing-fields.d.ts +77 -0
  97. package/dist/components/features/scripts/schedule-form/schedule-timing-fields.d.ts.map +1 -0
  98. package/dist/components/features/scripts/schedule-form/schedule-timing-fields.js +262 -0
  99. package/dist/components/features/scripts/schedule-form/schedule-timing.d.ts +288 -0
  100. package/dist/components/features/scripts/schedule-form/schedule-timing.d.ts.map +1 -0
  101. package/dist/components/features/scripts/schedule-form/schedule-timing.js +165 -0
  102. package/dist/components/features/scripts/script-cells.d.ts +11 -0
  103. package/dist/components/features/scripts/script-cells.d.ts.map +1 -0
  104. package/dist/components/features/scripts/script-cells.js +19 -0
  105. package/dist/components/features/scripts/script-executions-table.d.ts +58 -0
  106. package/dist/components/features/scripts/script-executions-table.d.ts.map +1 -0
  107. package/dist/components/features/scripts/script-executions-table.js +88 -0
  108. package/dist/components/features/scripts/script-schedules-table.d.ts +38 -0
  109. package/dist/components/features/scripts/script-schedules-table.d.ts.map +1 -0
  110. package/dist/components/features/scripts/script-schedules-table.js +71 -0
  111. package/dist/components/features/scripts/script-shell-badge.d.ts +9 -0
  112. package/dist/components/features/scripts/script-shell-badge.d.ts.map +1 -0
  113. package/dist/components/features/scripts/script-shell-badge.js +15 -0
  114. package/dist/components/features/scripts/scripts-table-columns.d.ts +162 -0
  115. package/dist/components/features/scripts/scripts-table-columns.d.ts.map +1 -0
  116. package/dist/components/features/scripts/scripts-table-columns.js +69 -0
  117. package/dist/components/features/scripts/scripts-table-shared.d.ts +19 -0
  118. package/dist/components/features/scripts/scripts-table-shared.d.ts.map +1 -0
  119. package/dist/components/features/scripts/scripts-table-shared.js +35 -0
  120. package/dist/components/features/scripts/scripts-table.d.ts +40 -0
  121. package/dist/components/features/scripts/scripts-table.d.ts.map +1 -0
  122. package/dist/components/features/scripts/scripts-table.js +84 -0
  123. package/dist/components/features/scripts/scripts-tabs.d.ts +5 -0
  124. package/dist/components/features/scripts/scripts-tabs.d.ts.map +1 -0
  125. package/dist/components/features/scripts/scripts-tabs.js +10 -0
  126. package/dist/components/features/scripts/shell-types.d.ts +13 -0
  127. package/dist/components/features/scripts/shell-types.d.ts.map +1 -0
  128. package/dist/components/features/scripts/shell-types.js +21 -0
  129. package/dist/components/help-center-pages/index.cjs +144 -144
  130. package/dist/components/index.cjs +224 -86
  131. package/dist/components/meeting-scheduler/index.cjs +74 -74
  132. package/dist/components/navigation/index.cjs +27 -27
  133. package/dist/components/onboarding-guides/index.cjs +27 -27
  134. package/dist/components/product-demo/fixtures/scripts.d.ts +34 -0
  135. package/dist/components/product-demo/fixtures/scripts.d.ts.map +1 -0
  136. package/dist/components/product-demo/fixtures/scripts.js +123 -0
  137. package/dist/components/product-demo/fixtures/shared.d.ts +8 -0
  138. package/dist/components/product-demo/fixtures/shared.d.ts.map +1 -1
  139. package/dist/components/product-demo/fixtures/shared.js +7 -1
  140. package/dist/components/product-demo/fixtures/software-update.d.ts.map +1 -1
  141. package/dist/components/product-demo/fixtures/software-update.js +1 -5
  142. package/dist/components/product-demo/index.cjs +16 -13
  143. package/dist/components/product-demo/product-screen.d.ts.map +1 -1
  144. package/dist/components/product-demo/product-screen.js +2 -1
  145. package/dist/components/product-demo/registry.d.ts.map +1 -1
  146. package/dist/components/product-demo/registry.js +2 -1
  147. package/dist/components/product-demo/screen-keys.cjs +2 -1
  148. package/dist/components/product-demo/screen-keys.d.ts +1 -0
  149. package/dist/components/product-demo/screen-keys.d.ts.map +1 -1
  150. package/dist/components/product-demo/screen-keys.js +2 -1
  151. package/dist/components/product-demo/screens/scripts.d.ts +11 -0
  152. package/dist/components/product-demo/screens/scripts.d.ts.map +1 -0
  153. package/dist/components/product-demo/screens/scripts.js +130 -0
  154. package/dist/components/related-content/index.cjs +12 -12
  155. package/dist/components/tickets/index.cjs +30 -30
  156. package/dist/components/ui/index.cjs +24 -24
  157. package/dist/{devices-TWEA7XOR.cjs → devices-OFP2IBKN.cjs} +30 -30
  158. package/dist/{embeddable-chat-6JKKFQEB.cjs → embeddable-chat-4C22MGNC.cjs} +92 -92
  159. package/dist/hooks/index.cjs +10 -10
  160. package/dist/index.cjs +169 -31
  161. package/dist/{knowledge-4GQDBNQB.cjs → knowledge-KKBCSNUA.cjs} +29 -29
  162. package/dist/{logs-EVU6GJHZ.cjs → logs-X2GRNO57.cjs} +46 -46
  163. package/dist/{policies-OZUEA5YS.cjs → policies-35BXKB6P.cjs} +31 -31
  164. package/dist/{remote-session-DNFZ5OLY.cjs → remote-session-N4PJB5FW.cjs} +15 -15
  165. package/dist/scripts-KQYVQOLU.cjs +2112 -0
  166. package/dist/{software-update-BLIVYOY2.cjs → software-update-ED33WSKT.cjs} +36 -40
  167. package/dist/{tickets-board-CKZRB6YV.cjs → tickets-board-O753S4ZB.cjs} +31 -31
  168. package/dist/utils/embed-authed-fetch.d.ts +33 -0
  169. package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
  170. package/dist/utils/embed-authed-fetch.js +3 -1
  171. package/dist/utils/index.cjs +3 -1
  172. package/dist/{video-file-player-ZH2ILAPO.cjs → video-file-player-QZ3YOLHO.cjs} +2 -2
  173. package/package.json +1 -1
  174. package/src/components/features/capability-explorer.tsx +134 -7
  175. package/src/components/features/index.ts +1 -0
  176. package/src/components/features/scripts/execution-cells.tsx +149 -0
  177. package/src/components/features/scripts/execution-status.ts +42 -0
  178. package/src/components/features/scripts/index.ts +42 -0
  179. package/src/components/features/scripts/schedule-form/index.ts +59 -0
  180. package/src/components/features/scripts/schedule-form/schedule-enums.ts +26 -0
  181. package/src/components/features/scripts/schedule-form/schedule-form-fields.tsx +249 -0
  182. package/src/components/features/scripts/schedule-form/schedule-form-types.ts +189 -0
  183. package/src/components/features/scripts/schedule-form/schedule-interval-input.tsx +121 -0
  184. package/src/components/features/scripts/schedule-form/schedule-offline-fields.tsx +218 -0
  185. package/src/components/features/scripts/schedule-form/schedule-script-picker-card.tsx +321 -0
  186. package/src/components/features/scripts/schedule-form/schedule-script-search-field.tsx +115 -0
  187. package/src/components/features/scripts/schedule-form/schedule-scripts-field.tsx +97 -0
  188. package/src/components/features/scripts/schedule-form/schedule-timing-fields.tsx +482 -0
  189. package/src/components/features/scripts/schedule-form/schedule-timing.ts +484 -0
  190. package/src/components/features/scripts/script-cells.tsx +29 -0
  191. package/src/components/features/scripts/script-executions-table.tsx +145 -0
  192. package/src/components/features/scripts/script-schedules-table.tsx +113 -0
  193. package/src/components/features/scripts/script-shell-badge.tsx +25 -0
  194. package/src/components/features/scripts/scripts-table-columns.ts +95 -0
  195. package/src/components/features/scripts/scripts-table-shared.tsx +43 -0
  196. package/src/components/features/scripts/scripts-table.tsx +124 -0
  197. package/src/components/features/scripts/scripts-tabs.ts +11 -0
  198. package/src/components/features/scripts/shell-types.ts +26 -0
  199. package/src/components/product-demo/fixtures/scripts.ts +186 -0
  200. package/src/components/product-demo/fixtures/shared.ts +7 -0
  201. package/src/components/product-demo/fixtures/software-update.ts +1 -7
  202. package/src/components/product-demo/product-screen.tsx +3 -1
  203. package/src/components/product-demo/registry.ts +1 -0
  204. package/src/components/product-demo/screen-keys.ts +1 -0
  205. package/src/components/product-demo/screens/scripts.tsx +192 -0
  206. package/src/utils/embed-authed-fetch.ts +42 -1
@@ -0,0 +1,54 @@
1
+ interface ScheduleIntervalInputProps {
2
+ /** The form's value. `null` = the box is empty. */
3
+ value: number | null;
4
+ onChange: (next: number | null) => void;
5
+ /**
6
+ * The form's own blur handler. Load-bearing, not optional plumbing: react-hook-form
7
+ * learns a field was left ONLY through this, and `reValidateMode: 'onBlur'` is
8
+ * what re-runs the schema. Without it an error the user has already fixed sits
9
+ * on screen until the next Save.
10
+ */
11
+ onBlur?: () => void;
12
+ disabled?: boolean;
13
+ invalid?: boolean;
14
+ error?: string;
15
+ min?: number;
16
+ className?: string;
17
+ 'aria-label'?: string;
18
+ /**
19
+ * Marks this box as where `scrollToFirstInvalidField` should put focus when
20
+ * the error is carried by an ancestor rather than by the input itself.
21
+ */
22
+ 'data-invalid-focus'?: boolean;
23
+ }
24
+ /**
25
+ * The `[interval]` half of the form's two duration pairs (Repeat in, Stop Retry
26
+ * after).
27
+ *
28
+ * **What the user types owns the display; the form value never writes back into
29
+ * it while the field has focus.** That inversion is the whole component. Binding
30
+ * a number input straight to validated state reads as a bug rather than a rule:
31
+ * the previous version coerced an emptied box back to a floor on every
32
+ * keystroke, so the digit reappeared as fast as it was deleted and "1" could not
33
+ * be typed over. Any round trip through `Number()` has the same shape in
34
+ * smaller ways — a leading zero vanishes mid-word, "10" briefly becomes "1"
35
+ * while a character is being removed.
36
+ *
37
+ * So the raw string is local state, and the form is told the PARSED value as it
38
+ * changes. Keeping the form current (rather than committing on blur alone)
39
+ * matters for one case: submitting with Enter never fires a blur, and a form
40
+ * reading a stale interval would save a number the user cannot see.
41
+ *
42
+ * The reverse direction — form → box — is deliberately narrow. It runs only
43
+ * when the field is NOT focused, which is exactly the set of changes that come
44
+ * from somewhere else: the record arriving (`useSeedForm`), or the unit
45
+ * dropdown raising the interval to its floor. While the box has focus those
46
+ * cannot happen, and nothing else may repaint what is being typed.
47
+ *
48
+ * Validation timing is the form's business, not this component's: errors are
49
+ * held until the first Save (`showErrors`) and re-checked on blur
50
+ * (`reValidateMode`), so nothing here is judged mid-word.
51
+ */
52
+ export declare function ScheduleIntervalInput({ value, onChange, onBlur, disabled, invalid, error, min, className, 'aria-label': ariaLabel, 'data-invalid-focus': invalidFocus, }: ScheduleIntervalInputProps): import("react").JSX.Element;
53
+ export {};
54
+ //# sourceMappingURL=schedule-interval-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-interval-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/scripts/schedule-form/schedule-interval-input.tsx"],"names":[],"mappings":"AAKA,UAAU,0BAA0B;IAClC,mDAAmD;IACnD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,EACH,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,oBAAoB,EAAE,YAAY,GACnC,EAAE,0BAA0B,+BAoD5B"}
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { Input } from "../../../ui/input.js";
5
+ function ScheduleIntervalInput({
6
+ value,
7
+ onChange,
8
+ onBlur,
9
+ disabled,
10
+ invalid,
11
+ error,
12
+ min,
13
+ className,
14
+ "aria-label": ariaLabel,
15
+ "data-invalid-focus": invalidFocus
16
+ }) {
17
+ const [text, setText] = useState(() => value === null ? "" : String(value));
18
+ const focused = useRef(false);
19
+ useEffect(() => {
20
+ if (focused.current) return;
21
+ const next = value === null ? "" : String(value);
22
+ setText((current) => current === next ? current : next);
23
+ }, [value]);
24
+ return /* @__PURE__ */ jsx(
25
+ Input,
26
+ {
27
+ type: "number",
28
+ min,
29
+ inputMode: "numeric",
30
+ "aria-label": ariaLabel,
31
+ "data-invalid-focus": invalidFocus || void 0,
32
+ className,
33
+ value: text,
34
+ onFocus: () => {
35
+ focused.current = true;
36
+ },
37
+ onBlur: () => {
38
+ focused.current = false;
39
+ setText(value === null ? "" : String(value));
40
+ onBlur?.();
41
+ },
42
+ onChange: (e) => {
43
+ const raw = e.target.value;
44
+ setText(raw);
45
+ if (raw.trim() === "") {
46
+ onChange(null);
47
+ return;
48
+ }
49
+ const parsed = Number(raw);
50
+ onChange(Number.isFinite(parsed) ? parsed : null);
51
+ },
52
+ disabled,
53
+ invalid,
54
+ error
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ ScheduleIntervalInput
60
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * "If device is offline at scheduled time" — Skip this Run vs Run when device
3
+ * comes back online, plus the reconnect window the second one needs
4
+ * (design node 460:63425).
5
+ *
6
+ * Maps to `offlineBehavior` (`SKIP` | `RETRY_ON_RECONNECT`) and
7
+ * `reconnectWindowSeconds`. The window is submitted ONLY alongside
8
+ * RETRY_ON_RECONNECT — the schema documents it as "set only when offlineBehavior
9
+ * is RETRY_ON_RECONNECT" — which is also why it is required rather than
10
+ * optional-meaning-forever: nothing in the contract says a null window queues a
11
+ * run indefinitely, so the form never offers a reading it cannot back up.
12
+ *
13
+ * The block presupposes a scheduled time the device can be absent FOR, so it
14
+ * collapses for DEVICE_ONLINE — which fires on the reconnect already — and
15
+ * submits the SKIP default instead of what the collapsed controls hold.
16
+ * DEVICE_LOCAL keeps it: its scheduled moment is the device's own wall clock.
17
+ *
18
+ * It collapses with the `0fr → 1fr` grid-rows technique, staying MOUNTED so
19
+ * toggling the trigger back restores what was picked, `inert` to drop the
20
+ * collapsed controls out of the tab order, and a padding/negative-margin pair:
21
+ * the bottom padding is the room the absolutely-positioned error renders into,
22
+ * and the constant negative margin cancels it so a collapsed block leaves no
23
+ * hole.
24
+ */
25
+ export declare function ScheduleOfflineFields({ showErrors, disabled }: {
26
+ showErrors: boolean;
27
+ disabled?: boolean;
28
+ }): import("react").JSX.Element;
29
+ //# sourceMappingURL=schedule-offline-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-offline-fields.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/scripts/schedule-form/schedule-offline-fields.tsx"],"names":[],"mappings":"AA+FA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAgB,EAAE,EAAE;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAkGlH"}
@@ -0,0 +1,124 @@
1
+ "use client";
2
+ "use no memo";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useController, useFormContext, useWatch } from "react-hook-form";
5
+ import { cn } from "../../../../utils/cn.js";
6
+ import { Label } from "../../../ui/label.js";
7
+ import { RadioGroupBlock } from "../../../ui/radio-group.js";
8
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select.js";
9
+ import { TruncateText } from "../../../ui/truncate-text.js";
10
+ import { SCHEDULE_OFFLINE_BEHAVIOR_OPTIONS } from "./schedule-form-types.js";
11
+ import { ScheduleIntervalInput } from "./schedule-interval-input.js";
12
+ import {
13
+ DURATION_UNIT_OPTIONS,
14
+ isEventTrigger,
15
+ isRetryOnReconnect,
16
+ MIN_RECONNECT_MINUTES,
17
+ snapReconnectInterval
18
+ } from "./schedule-timing.js";
19
+ function ReconnectWindowFields({
20
+ interval,
21
+ unit,
22
+ onIntervalChange,
23
+ onIntervalBlur,
24
+ onUnitChange,
25
+ disabled,
26
+ invalid,
27
+ fluid = false,
28
+ className
29
+ }) {
30
+ const controlWidth = fluid ? "flex-1 min-w-0" : "w-[120px]";
31
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-[var(--spacing-system-xsf)]", className), children: [
32
+ /* @__PURE__ */ jsx("span", { className: cn("shrink-0 text-h4", disabled ? "text-ods-text-disabled" : "text-ods-text-secondary"), children: "Stop Retry after" }),
33
+ /* @__PURE__ */ jsx(
34
+ ScheduleIntervalInput,
35
+ {
36
+ min: unit === "minute" ? MIN_RECONNECT_MINUTES : 1,
37
+ "aria-label": "Stop retry after",
38
+ className: controlWidth,
39
+ value: interval,
40
+ onChange: onIntervalChange,
41
+ onBlur: onIntervalBlur,
42
+ "data-invalid-focus": true,
43
+ disabled,
44
+ invalid
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsxs(Select, { value: unit, onValueChange: (next) => onUnitChange(next), disabled, children: [
48
+ /* @__PURE__ */ jsx(SelectTrigger, { className: controlWidth, "aria-label": "Stop retry after unit", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
49
+ /* @__PURE__ */ jsx(SelectContent, { children: DURATION_UNIT_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
50
+ ] })
51
+ ] });
52
+ }
53
+ function ScheduleOfflineFields({ showErrors, disabled = false }) {
54
+ const { control } = useFormContext();
55
+ const trigger = useWatch({ control, name: "trigger" });
56
+ const collapsed = isEventTrigger(trigger);
57
+ const { field: behaviorField } = useController({ control, name: "offlineBehavior" });
58
+ const { field: intervalField, fieldState: intervalState } = useController({ control, name: "reconnectInterval" });
59
+ const { field: unitField } = useController({ control, name: "reconnectUnit" });
60
+ const windowDisabled = disabled || !isRetryOnReconnect(behaviorField.value);
61
+ const intervalError = showErrors ? intervalState.error?.message : void 0;
62
+ const handleUnitChange = (next) => {
63
+ unitField.onChange(next);
64
+ const snapped = snapReconnectInterval(intervalField.value, next);
65
+ if (snapped !== intervalField.value) intervalField.onChange(snapped);
66
+ };
67
+ const windowFieldsFor = (fluid) => /* @__PURE__ */ jsx(
68
+ ReconnectWindowFields,
69
+ {
70
+ interval: intervalField.value,
71
+ unit: unitField.value,
72
+ onIntervalChange: intervalField.onChange,
73
+ onIntervalBlur: intervalField.onBlur,
74
+ onUnitChange: handleUnitChange,
75
+ disabled: windowDisabled,
76
+ invalid: !!intervalError,
77
+ fluid
78
+ }
79
+ );
80
+ const options = SCHEDULE_OFFLINE_BEHAVIOR_OPTIONS.map(
81
+ (option) => isRetryOnReconnect(option.value) ? (
82
+ // Desktop only. Below `md` the caption plus two controls cannot share a
83
+ // row with the option's own label without squeezing it to nothing, so
84
+ // the same fields render full-width under the group instead.
85
+ { ...option, trailing: /* @__PURE__ */ jsx("div", { className: "hidden content-md:flex", children: windowFieldsFor(false) }) }
86
+ ) : option
87
+ );
88
+ return /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ inert: collapsed,
92
+ style: {
93
+ gridTemplateRows: collapsed ? "0fr" : "1fr",
94
+ opacity: collapsed ? 0 : 1
95
+ },
96
+ className: "mb-[calc(-1*var(--spacing-system-lf))] grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",
97
+ children: /* @__PURE__ */ jsx("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "pb-[var(--spacing-system-lf)]", children: /* @__PURE__ */ jsxs(
98
+ "div",
99
+ {
100
+ className: "relative flex flex-col gap-[var(--spacing-system-xxs)]",
101
+ "data-invalid": intervalError ? true : void 0,
102
+ children: [
103
+ /* @__PURE__ */ jsx(Label, { className: "text-h4", children: "If device is offline at scheduled time" }),
104
+ /* @__PURE__ */ jsx(
105
+ RadioGroupBlock,
106
+ {
107
+ variant: "grouped",
108
+ value: behaviorField.value,
109
+ onValueChange: behaviorField.onChange,
110
+ disabled,
111
+ options
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx("div", { className: "pt-[var(--spacing-system-xs)] content-md:hidden", children: windowFieldsFor(true) }),
115
+ intervalError && /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 translate-y-full", children: /* @__PURE__ */ jsx(TruncateText, { variant: "h6", className: "text-ods-error", children: intervalError }) })
116
+ ]
117
+ }
118
+ ) }) })
119
+ }
120
+ );
121
+ }
122
+ export {
123
+ ScheduleOfflineFields
124
+ };
@@ -0,0 +1,52 @@
1
+ import { type RenderScheduleScriptSearch } from './schedule-form-types';
2
+ interface ScheduleScriptPickerCardProps {
3
+ index: number;
4
+ /** How many cards the list has — disables the move buttons at the ends. */
5
+ count: number;
6
+ /** UI platform ids the schedule targets — what the host narrows its script search by. */
7
+ supportedPlatforms: string[];
8
+ /** The card's "Select Script" field: the host's search over its script library. */
9
+ renderScriptSearch: RenderScheduleScriptSearch;
10
+ onRemove: () => void;
11
+ canRemove: boolean;
12
+ disabled?: boolean;
13
+ /**
14
+ * Controls inline error visibility — the parent flips this true once the
15
+ * user attempts Save, so errors stay hidden on a pristine form (mirrors
16
+ * `ScriptFormFields.showErrors`).
17
+ */
18
+ showErrors?: boolean;
19
+ /**
20
+ * The script's arguments and environment variables under the first row.
21
+ * Default true; false is the card as one row (the script and its timeout).
22
+ */
23
+ showParams?: boolean;
24
+ }
25
+ /**
26
+ * One card of the schedule's ordered script list: drag handle, script
27
+ * autocomplete, timeout and the script's arguments / environment variables.
28
+ *
29
+ * **Order is the payload.** The card index IS the run order — the backend
30
+ * stores `scriptIds: [ID!]` in run order, so reordering rewrites that array.
31
+ *
32
+ * Sorting runs on the core library's `SortableList` (`useSortableItem`), the
33
+ * same Pragmatic stack the ticket board uses. Only the handle starts a drag,
34
+ * so text selection inside the fields keeps working, and the handle carries
35
+ * the keyboard path (Arrow Up / Arrow Down, one press one move) with
36
+ * live-region announcements wired up by the list. On touch/narrow viewports
37
+ * no drag exists at all — an up/down button pair renders beside the delete
38
+ * button instead.
39
+ *
40
+ * Arguments and env vars ARE persisted, as this schedule's per-script override
41
+ * (`scriptCustomParams`): they seed from the picked script's defaults, and only
42
+ * a half the user moves off those defaults is written back — so leaving a card
43
+ * untouched keeps the schedule following later edits to the script itself.
44
+ *
45
+ * ⚠ **Timeout is still editable but not persisted**: the override input carries
46
+ * args and env vars only. It is
47
+ * seeded from the script's own default, which is what the run actually uses, so
48
+ * the card shows the truth — it just cannot be changed per schedule yet.
49
+ */
50
+ export declare function ScheduleScriptPickerCard({ index, count, supportedPlatforms, renderScriptSearch, onRemove, canRemove, disabled, showErrors, showParams, }: ScheduleScriptPickerCardProps): import("react").JSX.Element;
51
+ export {};
52
+ //# sourceMappingURL=schedule-script-picker-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-script-picker-card.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/scripts/schedule-form/schedule-script-picker-card.tsx"],"names":[],"mappings":"AAcA,OAAO,EAEL,KAAK,0BAA0B,EAGhC,MAAM,uBAAuB,CAAC;AAK/B,UAAU,6BAA6B;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,mFAAmF;IACnF,kBAAkB,EAAE,0BAA0B,CAAC;IAC/C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,QAAgB,EAChB,UAAiB,EACjB,UAAiB,GAClB,EAAE,6BAA6B,+BA6O/B"}
@@ -0,0 +1,244 @@
1
+ "use client";
2
+ "use no memo";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Controller, useFormContext } from "react-hook-form";
5
+ import { useContentMdUp } from "../../../../hooks/ui/use-content-breakpoint.js";
6
+ import { DraggerIcon } from "../../../icons-v2-generated/interface/dragger-icon.js";
7
+ import { TrashIcon } from "../../../icons-v2-generated/interface/trash-icon.js";
8
+ import { ScriptArguments } from "../../../platform/ScriptArguments.js";
9
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../ui/accordion.js";
10
+ import { Button } from "../../../ui/button/index.js";
11
+ import { Input } from "../../../ui/input.js";
12
+ import { Label } from "../../../ui/label.js";
13
+ import { SortableMoveButtons } from "../../sortable-list/sortable-move-buttons.js";
14
+ import { useSortableItem } from "../../sortable-list/use-sortable-item.js";
15
+ import {
16
+ EMPTY_SCHEDULE_SCRIPT_ROW
17
+ } from "./schedule-form-types.js";
18
+ const UNSET_TIMEOUT = 0;
19
+ function ScheduleScriptPickerCard({
20
+ index,
21
+ count,
22
+ supportedPlatforms,
23
+ renderScriptSearch,
24
+ onRemove,
25
+ canRemove,
26
+ disabled = false,
27
+ showErrors = true,
28
+ showParams = true
29
+ }) {
30
+ const { control, setValue, watch } = useFormContext();
31
+ const selected = watch(`scripts.${index}`);
32
+ const runParamsLocked = disabled || !selected?.scriptId;
33
+ const { itemRef, dragHandleProps, isDragging, dragAndDropEnabled } = useSortableItem();
34
+ const isMdUp = useContentMdUp();
35
+ const handleScriptPick = (row) => {
36
+ if (!row) {
37
+ setValue(`scripts.${index}`, EMPTY_SCHEDULE_SCRIPT_ROW, { shouldValidate: true });
38
+ return;
39
+ }
40
+ setValue(`scripts.${index}`, row, { shouldValidate: true, shouldDirty: true });
41
+ };
42
+ return /* @__PURE__ */ jsxs(
43
+ "div",
44
+ {
45
+ ref: itemRef,
46
+ className: `flex flex-col gap-[var(--spacing-system-sf)] rounded-[6px] border bg-ods-bg p-[var(--spacing-system-l)] content-md:gap-[var(--spacing-system-lf)] ${isDragging ? "relative z-10 border-ods-accent shadow-lg" : "border-ods-border"}`,
47
+ children: [
48
+ /* @__PURE__ */ jsxs(
49
+ "div",
50
+ {
51
+ className: `flex flex-col gap-[var(--spacing-system-sf)] content-md:gap-[var(--spacing-system-lf)] ${dragAndDropEnabled ? "content-md:flex-row content-md:items-end" : ""}`,
52
+ children: [
53
+ /* @__PURE__ */ jsxs(
54
+ "div",
55
+ {
56
+ className: `flex min-w-0 flex-1 items-end ${dragAndDropEnabled ? "gap-[var(--spacing-system-xs)]" : "gap-[var(--spacing-system-xsf)]"}`,
57
+ children: [
58
+ dragAndDropEnabled && /* @__PURE__ */ jsx(
59
+ "button",
60
+ {
61
+ type: "button",
62
+ ...dragHandleProps,
63
+ disabled,
64
+ "aria-label": `Reorder ${selected?.name || `script ${index + 1}`}`,
65
+ className: `flex size-12 shrink-0 items-center justify-center rounded-[6px] text-ods-text-secondary hover:text-ods-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-ods-border-focus disabled:cursor-not-allowed disabled:opacity-30 ${isDragging ? "cursor-grabbing text-ods-text-primary" : "cursor-grab"}`,
66
+ children: /* @__PURE__ */ jsx(DraggerIcon, { size: 24 })
67
+ }
68
+ ),
69
+ /* @__PURE__ */ jsx(
70
+ Controller,
71
+ {
72
+ name: `scripts.${index}.scriptId`,
73
+ control,
74
+ render: ({ fieldState }) => /* @__PURE__ */ jsx(Fragment, { children: renderScriptSearch({
75
+ scriptId: selected?.scriptId ?? "",
76
+ name: selected?.name ?? "",
77
+ supportedPlatforms,
78
+ onPick: handleScriptPick,
79
+ disabled,
80
+ error: showErrors ? fieldState.error?.message : void 0,
81
+ invalid: showErrors && !!fieldState.error
82
+ }) })
83
+ }
84
+ ),
85
+ !dragAndDropEnabled && /* @__PURE__ */ jsxs(Fragment, { children: [
86
+ /* @__PURE__ */ jsx(SortableMoveButtons, { index, count, label: selected?.name || `script ${index + 1}` }),
87
+ /* @__PURE__ */ jsx(
88
+ Button,
89
+ {
90
+ variant: "outline",
91
+ size: "icon",
92
+ onClick: onRemove,
93
+ disabled: !canRemove || disabled,
94
+ "aria-label": "Remove script from schedule",
95
+ className: "text-ods-error disabled:opacity-30",
96
+ children: /* @__PURE__ */ jsx(TrashIcon, { size: 20 })
97
+ }
98
+ )
99
+ ] })
100
+ ]
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-end gap-[var(--spacing-system-xs)]", children: [
104
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-xxs)]", children: [
105
+ /* @__PURE__ */ jsx(Label, { className: "text-h4", children: "Timeout" }),
106
+ /* @__PURE__ */ jsx(
107
+ Controller,
108
+ {
109
+ name: `scripts.${index}.timeoutSeconds`,
110
+ control,
111
+ render: ({ field, fieldState }) => (
112
+ // Locked until a script is picked: the timeout belongs to the
113
+ // script, so the field stays EMPTY until there is one — the
114
+ // sentinel is a "nothing here yet" marker, and rendering it as
115
+ // a literal 0 would read as a real (and invalid) timeout.
116
+ // Picking a script writes its own timeout in.
117
+ /* @__PURE__ */ jsx(
118
+ Input,
119
+ {
120
+ type: "number",
121
+ min: 1,
122
+ className: "w-full",
123
+ value: field.value ? String(field.value) : "",
124
+ onChange: (e) => field.onChange(e.target.value ? Number(e.target.value) : UNSET_TIMEOUT),
125
+ disabled: runParamsLocked,
126
+ endAdornment: /* @__PURE__ */ jsx("span", { className: "text-ods-text-secondary text-h6", children: "Seconds" }),
127
+ error: showErrors ? fieldState.error?.message : void 0,
128
+ invalid: showErrors && !!fieldState.error
129
+ }
130
+ )
131
+ )
132
+ }
133
+ )
134
+ ] }),
135
+ dragAndDropEnabled && /* @__PURE__ */ jsx(
136
+ Button,
137
+ {
138
+ variant: "outline",
139
+ size: "icon",
140
+ onClick: onRemove,
141
+ disabled: !canRemove || disabled,
142
+ "aria-label": "Remove script from schedule",
143
+ className: "text-ods-error disabled:opacity-30",
144
+ children: /* @__PURE__ */ jsx(TrashIcon, { size: 20 })
145
+ }
146
+ )
147
+ ] })
148
+ ]
149
+ }
150
+ ),
151
+ !showParams ? null : isMdUp === false ? /* @__PURE__ */ jsxs(Accordion, { type: "multiple", className: "overflow-hidden rounded-[6px] border border-ods-border", children: [
152
+ /* @__PURE__ */ jsxs(AccordionItem, { value: "args", className: "border-ods-border data-[state=closed]:bg-ods-card", children: [
153
+ /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-14 px-[var(--spacing-system-sf)] py-0 text-ods-text-primary text-h6 hover:no-underline [&>svg]:text-ods-text-secondary", children: "Edit Default Script Arguments" }),
154
+ /* @__PURE__ */ jsx(AccordionContent, { className: "px-[var(--spacing-system-sf)] [&_label:empty]:hidden", children: /* @__PURE__ */ jsx(
155
+ Controller,
156
+ {
157
+ name: `scripts.${index}.args`,
158
+ control,
159
+ render: ({ field }) => /* @__PURE__ */ jsx(
160
+ ScriptArguments,
161
+ {
162
+ arguments: field.value,
163
+ onArgumentsChange: field.onChange,
164
+ keyPlaceholder: "Key",
165
+ valuePlaceholder: "Enter Value (empty=flag)",
166
+ addButtonLabel: "Add Script Argument",
167
+ titleLabel: "",
168
+ disabled: runParamsLocked
169
+ }
170
+ )
171
+ }
172
+ ) })
173
+ ] }),
174
+ /* @__PURE__ */ jsxs(AccordionItem, { value: "env", className: "border-b-0 border-ods-border data-[state=closed]:bg-ods-card", children: [
175
+ /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-14 px-[var(--spacing-system-sf)] py-0 text-ods-text-primary text-h6 hover:no-underline [&>svg]:text-ods-text-secondary", children: "Edit Default Environment Vars" }),
176
+ /* @__PURE__ */ jsx(AccordionContent, { className: "px-[var(--spacing-system-sf)] [&_label:empty]:hidden", children: /* @__PURE__ */ jsx(
177
+ Controller,
178
+ {
179
+ name: `scripts.${index}.envVars`,
180
+ control,
181
+ render: ({ field }) => /* @__PURE__ */ jsx(
182
+ ScriptArguments,
183
+ {
184
+ arguments: field.value,
185
+ onArgumentsChange: field.onChange,
186
+ keyPlaceholder: "Key",
187
+ valuePlaceholder: "Enter Value",
188
+ addButtonLabel: "Add Environment Var",
189
+ addSecretButtonLabel: "Add Secret",
190
+ titleLabel: "",
191
+ disabled: runParamsLocked
192
+ }
193
+ )
194
+ }
195
+ ) })
196
+ ] })
197
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-[var(--spacing-system-lf)] content-md:flex-row", children: [
198
+ /* @__PURE__ */ jsx("div", { className: "w-full min-w-0 flex-1 [&_label]:text-h4", children: /* @__PURE__ */ jsx(
199
+ Controller,
200
+ {
201
+ name: `scripts.${index}.args`,
202
+ control,
203
+ render: ({ field }) => /* @__PURE__ */ jsx(
204
+ ScriptArguments,
205
+ {
206
+ arguments: field.value,
207
+ onArgumentsChange: field.onChange,
208
+ keyPlaceholder: "Key",
209
+ valuePlaceholder: "Enter Value (empty=flag)",
210
+ addButtonLabel: "Add Script Argument",
211
+ titleLabel: "Script Arguments",
212
+ disabled: runParamsLocked
213
+ }
214
+ )
215
+ }
216
+ ) }),
217
+ /* @__PURE__ */ jsx("div", { className: "w-full min-w-0 flex-1 [&_label]:text-h4", children: /* @__PURE__ */ jsx(
218
+ Controller,
219
+ {
220
+ name: `scripts.${index}.envVars`,
221
+ control,
222
+ render: ({ field }) => /* @__PURE__ */ jsx(
223
+ ScriptArguments,
224
+ {
225
+ arguments: field.value,
226
+ onArgumentsChange: field.onChange,
227
+ keyPlaceholder: "Key",
228
+ valuePlaceholder: "Enter Value",
229
+ addButtonLabel: "Add Environment Var",
230
+ addSecretButtonLabel: "Add Secret",
231
+ titleLabel: "Environment Vars",
232
+ disabled: runParamsLocked
233
+ }
234
+ )
235
+ }
236
+ ) })
237
+ ] })
238
+ ]
239
+ }
240
+ );
241
+ }
242
+ export {
243
+ ScheduleScriptPickerCard
244
+ };
@@ -0,0 +1,35 @@
1
+ /** One script a search offers. */
2
+ export interface ScheduleScriptSearchResult {
3
+ id: string;
4
+ name: string;
5
+ /** UI platform ids the script runs on — the icons beside its name. */
6
+ supportedPlatforms: string[];
7
+ }
8
+ export interface ScheduleScriptSearchFieldProps {
9
+ /** The card's script: `''` while nothing is picked. */
10
+ scriptId: string;
11
+ /** Its name — the label shown when the script is not on the current search page. */
12
+ name: string;
13
+ /** The current page of the host's search. */
14
+ scripts: ScheduleScriptSearchResult[];
15
+ isLoading?: boolean;
16
+ /** What is typed in the field; decides which "nothing found" reading shows. */
17
+ inputValue?: string;
18
+ onInputChange?: (value: string) => void;
19
+ /** Focus entered the field: a lazy search starts here. */
20
+ onOpen?: () => void;
21
+ /** Focus left the whole field. */
22
+ onClose?: () => void;
23
+ /** A script of `scripts` was picked (its id), or the field was cleared (null). */
24
+ onChange: (scriptId: string | null) => void;
25
+ disabled?: boolean;
26
+ error?: string;
27
+ invalid?: boolean;
28
+ }
29
+ /**
30
+ * "Select Script": the autocomplete of a schedule's script card. The search is
31
+ * the host's (server-side, so the field does no filtering of its own); this is
32
+ * the field every host draws around it.
33
+ */
34
+ export declare function ScheduleScriptSearchField({ scriptId, name, scripts, isLoading, inputValue, onInputChange, onOpen, onClose, onChange, disabled, error, invalid, }: ScheduleScriptSearchFieldProps): import("react").JSX.Element;
35
+ //# sourceMappingURL=schedule-script-search-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-script-search-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/scripts/schedule-form/schedule-script-search-field.tsx"],"names":[],"mappings":"AAQA,kCAAkC;AAClC,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,8BAA8B;IAC7C,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kFAAkF;IAClF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAYD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAiB,EACjB,UAAe,EACf,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,KAAK,EACL,OAAe,GAChB,EAAE,8BAA8B,+BAgDhC"}