@cloudtower/eagle 4100.0.9 → 4100.0.11

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 (246) hide show
  1. package/dist/cjs/core/AccordionCard/index.js +1 -1
  2. package/dist/cjs/core/Alert/alert.style.js +2 -2
  3. package/dist/cjs/core/Avatar/index.js +1 -1
  4. package/dist/cjs/core/Banner/banner.style.js +4 -4
  5. package/dist/cjs/core/BasicCTError/BasicCTError.style.js +1 -1
  6. package/dist/cjs/core/BlankState/style.js +1 -1
  7. package/dist/cjs/core/Breadcrumb/index.js +1 -1
  8. package/dist/cjs/core/Button/index.js +1 -1
  9. package/dist/cjs/core/ButtonGroup/index.js +2 -2
  10. package/dist/cjs/core/Card/CardBody.js +1 -1
  11. package/dist/cjs/core/Card/CardTitle.js +1 -1
  12. package/dist/cjs/core/Card/CardWrapper.js +2 -2
  13. package/dist/cjs/core/Cascader/cascader.style.js +11 -11
  14. package/dist/cjs/core/Checkbox/checkbox.style.js +1 -1
  15. package/dist/cjs/core/DetailCard/index.js +1 -1
  16. package/dist/cjs/core/DonutChart/index.js +2 -2
  17. package/dist/cjs/core/DropdownMenu/index.js +1 -1
  18. package/dist/cjs/core/ExpandableList/ExpandIcon.js +1 -1
  19. package/dist/cjs/core/ExpandableList/ExpandableContainer.js +1 -1
  20. package/dist/cjs/core/ExpandableList/ExpandableItem.js +2 -2
  21. package/dist/cjs/core/ExpandableList/RoundOrder.js +1 -1
  22. package/dist/cjs/core/FailedLoad/index.js +1 -1
  23. package/dist/cjs/core/FormItem/index.js +1 -1
  24. package/dist/cjs/core/Icon/index.js +1 -1
  25. package/dist/cjs/core/ImmersiveDialog/styles.js +14 -14
  26. package/dist/cjs/core/Input/index.js +1 -1
  27. package/dist/cjs/core/InputGroup/index.js +1 -1
  28. package/dist/cjs/core/InputInteger/index.js +1 -1
  29. package/dist/cjs/core/InputNumber/index.js +1 -1
  30. package/dist/cjs/core/InputPassword/index.js +1 -1
  31. package/dist/cjs/core/InputTagItem/index.js +1 -1
  32. package/dist/cjs/core/LegacySelect/select.style.js +1 -1
  33. package/dist/cjs/core/Legend/index.js +5 -5
  34. package/dist/cjs/core/LineChart/LineChartActions.js +2 -2
  35. package/dist/cjs/core/LineChart/TooltipFormatter.js +1 -1
  36. package/dist/cjs/core/LineChart/styled.js +9 -9
  37. package/dist/cjs/core/Link/index.js +1 -1
  38. package/dist/cjs/core/Loading/style.js +4 -4
  39. package/dist/cjs/core/LocalUpload/LocalUpload.style.js +2 -2
  40. package/dist/cjs/core/LogView/LogView.eventSourceLoader.js +14 -0
  41. package/dist/cjs/core/LogView/LogView.js +90 -75
  42. package/dist/cjs/core/LogView/LogView.style.js +5 -5
  43. package/dist/cjs/core/LogView/LogView.utils.js +18 -7
  44. package/dist/cjs/core/LogView/LogView.xtermLoader.js +22 -0
  45. package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
  46. package/dist/cjs/core/Metric/styled.js +8 -8
  47. package/dist/cjs/core/Nav/index.js +1 -1
  48. package/dist/cjs/core/Nav/style.js +2 -2
  49. package/dist/cjs/core/Overflow/index.js +2 -2
  50. package/dist/cjs/core/Pagination/index.js +2 -2
  51. package/dist/cjs/core/Progress/components.js +2 -2
  52. package/dist/cjs/core/Progress/index.js +2 -2
  53. package/dist/cjs/core/Progress/progress.style.js +4 -4
  54. package/dist/cjs/core/Progress/progress.widgets.js +2 -2
  55. package/dist/cjs/core/Radio/index.js +3 -3
  56. package/dist/cjs/core/SearchInput/SearchInput.style.js +5 -5
  57. package/dist/cjs/core/SegmentControl/index.js +4 -4
  58. package/dist/cjs/core/Select/select.style.js +4 -4
  59. package/dist/cjs/core/Select/select.widgets.js +3 -3
  60. package/dist/cjs/core/SimplePagination/index.js +2 -2
  61. package/dist/cjs/core/Skeleton/Content.js +1 -1
  62. package/dist/cjs/core/SmallDialog/SmallDialog.js +1 -3
  63. package/dist/cjs/core/SmallDialog/SmallDialog.style.js +7 -7
  64. package/dist/cjs/core/StatusCapsule/index.js +2 -2
  65. package/dist/cjs/core/StepProgress/index.js +1 -1
  66. package/dist/cjs/core/Steps/style.js +5 -5
  67. package/dist/cjs/core/Styled/index.js +40 -40
  68. package/dist/cjs/core/Switch/index.js +2 -2
  69. package/dist/cjs/core/Tab/Tab.js +1 -1
  70. package/dist/cjs/core/Tab/Tab.style.js +4 -4
  71. package/dist/cjs/core/Table/TableSkeleton.js +1 -1
  72. package/dist/cjs/core/Table/TableWidget.js +1 -1
  73. package/dist/cjs/core/Table/index.js +3 -3
  74. package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
  75. package/dist/cjs/core/TableForm/style.js +7 -7
  76. package/dist/cjs/core/Tag/SplitTag.js +1 -1
  77. package/dist/cjs/core/Tag/style.js +5 -5
  78. package/dist/cjs/core/Time/index.js +1 -1
  79. package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
  80. package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
  81. package/dist/cjs/core/Token/index.js +4 -4
  82. package/dist/cjs/core/Token/style.js +1 -1
  83. package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
  84. package/dist/cjs/core/Tooltip/index.js +1 -1
  85. package/dist/cjs/core/Truncate/index.js +1 -1
  86. package/dist/cjs/core/Typo/index.js +58 -58
  87. package/dist/cjs/core/WizardDialog/index.js +4 -3
  88. package/dist/cjs/core/WizardDialog/styles.js +4 -4
  89. package/dist/cjs/coreX/BarChart/index.js +1 -1
  90. package/dist/cjs/coreX/BatchOperation/index.js +2 -2
  91. package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
  92. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
  93. package/dist/cjs/coreX/CircleLoading/index.js +1 -1
  94. package/dist/cjs/coreX/CronCalendar/index.js +4 -4
  95. package/dist/cjs/coreX/CronPlan/index.js +4 -4
  96. package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  97. package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +1 -1
  98. package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  99. package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  100. package/dist/cjs/coreX/GoBackButton/index.js +1 -1
  101. package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
  102. package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
  103. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
  104. package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  105. package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
  106. package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
  107. package/dist/cjs/coreX/Sider/index.js +3 -3
  108. package/dist/cjs/coreX/SummaryTable/index.js +5 -5
  109. package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
  110. package/dist/cjs/coreX/TabMenu/index.js +2 -2
  111. package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
  112. package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
  113. package/dist/cjs/stats1.html +1 -1
  114. package/dist/cjs/utils/cterror.js +27 -5
  115. package/dist/components.css +3901 -3901
  116. package/dist/esm/core/AccordionCard/index.js +1 -1
  117. package/dist/esm/core/Alert/alert.style.js +2 -2
  118. package/dist/esm/core/Avatar/index.js +1 -1
  119. package/dist/esm/core/Banner/banner.style.js +4 -4
  120. package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
  121. package/dist/esm/core/BlankState/style.js +1 -1
  122. package/dist/esm/core/Breadcrumb/index.js +1 -1
  123. package/dist/esm/core/Button/index.js +1 -1
  124. package/dist/esm/core/ButtonGroup/index.js +2 -2
  125. package/dist/esm/core/Card/CardBody.js +1 -1
  126. package/dist/esm/core/Card/CardTitle.js +1 -1
  127. package/dist/esm/core/Card/CardWrapper.js +2 -2
  128. package/dist/esm/core/Cascader/cascader.style.js +11 -11
  129. package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
  130. package/dist/esm/core/DetailCard/index.js +1 -1
  131. package/dist/esm/core/DonutChart/index.js +2 -2
  132. package/dist/esm/core/DropdownMenu/index.js +1 -1
  133. package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
  134. package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
  135. package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
  136. package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
  137. package/dist/esm/core/FailedLoad/index.js +1 -1
  138. package/dist/esm/core/FormItem/index.js +1 -1
  139. package/dist/esm/core/Icon/index.js +1 -1
  140. package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
  141. package/dist/esm/core/Input/index.js +1 -1
  142. package/dist/esm/core/InputGroup/index.js +1 -1
  143. package/dist/esm/core/InputInteger/index.js +1 -1
  144. package/dist/esm/core/InputNumber/index.js +1 -1
  145. package/dist/esm/core/InputPassword/index.js +1 -1
  146. package/dist/esm/core/InputTagItem/index.js +1 -1
  147. package/dist/esm/core/LegacySelect/select.style.js +1 -1
  148. package/dist/esm/core/Legend/index.js +5 -5
  149. package/dist/esm/core/LineChart/LineChartActions.js +2 -2
  150. package/dist/esm/core/LineChart/TooltipFormatter.js +1 -1
  151. package/dist/esm/core/LineChart/styled.js +9 -9
  152. package/dist/esm/core/Link/index.js +1 -1
  153. package/dist/esm/core/Loading/style.js +4 -4
  154. package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
  155. package/dist/esm/core/LogView/LogView.eventSourceLoader.js +12 -0
  156. package/dist/esm/core/LogView/LogView.js +90 -75
  157. package/dist/esm/core/LogView/LogView.style.js +5 -5
  158. package/dist/esm/core/LogView/LogView.utils.js +18 -7
  159. package/dist/esm/core/LogView/LogView.xtermLoader.js +20 -0
  160. package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
  161. package/dist/esm/core/Metric/styled.js +8 -8
  162. package/dist/esm/core/Nav/index.js +1 -1
  163. package/dist/esm/core/Nav/style.js +2 -2
  164. package/dist/esm/core/Overflow/index.js +2 -2
  165. package/dist/esm/core/Pagination/index.js +2 -2
  166. package/dist/esm/core/Progress/components.js +2 -2
  167. package/dist/esm/core/Progress/index.js +2 -2
  168. package/dist/esm/core/Progress/progress.style.js +4 -4
  169. package/dist/esm/core/Progress/progress.widgets.js +2 -2
  170. package/dist/esm/core/Radio/index.js +3 -3
  171. package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
  172. package/dist/esm/core/SegmentControl/index.js +4 -4
  173. package/dist/esm/core/Select/select.style.js +4 -4
  174. package/dist/esm/core/Select/select.widgets.js +3 -3
  175. package/dist/esm/core/SimplePagination/index.js +2 -2
  176. package/dist/esm/core/Skeleton/Content.js +1 -1
  177. package/dist/esm/core/SmallDialog/SmallDialog.js +1 -3
  178. package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
  179. package/dist/esm/core/StatusCapsule/index.js +2 -2
  180. package/dist/esm/core/StepProgress/index.js +1 -1
  181. package/dist/esm/core/Steps/style.js +5 -5
  182. package/dist/esm/core/Styled/index.js +40 -40
  183. package/dist/esm/core/Switch/index.js +2 -2
  184. package/dist/esm/core/Tab/Tab.js +1 -1
  185. package/dist/esm/core/Tab/Tab.style.js +4 -4
  186. package/dist/esm/core/Table/TableSkeleton.js +1 -1
  187. package/dist/esm/core/Table/TableWidget.js +1 -1
  188. package/dist/esm/core/Table/index.js +3 -3
  189. package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
  190. package/dist/esm/core/TableForm/style.js +7 -7
  191. package/dist/esm/core/Tag/SplitTag.js +1 -1
  192. package/dist/esm/core/Tag/style.js +5 -5
  193. package/dist/esm/core/Time/index.js +1 -1
  194. package/dist/esm/core/TimeZoneSelect/index.js +7 -7
  195. package/dist/esm/core/Timeline/Timeline.style.js +5 -5
  196. package/dist/esm/core/Token/index.js +4 -4
  197. package/dist/esm/core/Token/style.js +1 -1
  198. package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
  199. package/dist/esm/core/Tooltip/index.js +1 -1
  200. package/dist/esm/core/Truncate/index.js +1 -1
  201. package/dist/esm/core/Typo/index.js +58 -58
  202. package/dist/esm/core/WizardDialog/index.js +2 -1
  203. package/dist/esm/core/WizardDialog/styles.js +4 -4
  204. package/dist/esm/coreX/BarChart/index.js +1 -1
  205. package/dist/esm/coreX/BatchOperation/index.js +2 -2
  206. package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
  207. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
  208. package/dist/esm/coreX/CircleLoading/index.js +1 -1
  209. package/dist/esm/coreX/CronCalendar/index.js +4 -4
  210. package/dist/esm/coreX/CronPlan/index.js +4 -4
  211. package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  212. package/dist/esm/coreX/DateRangePicker/RelativeTime.js +1 -1
  213. package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  214. package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  215. package/dist/esm/coreX/GoBackButton/index.js +1 -1
  216. package/dist/esm/coreX/I18nNameTag/index.js +1 -1
  217. package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
  218. package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
  219. package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  220. package/dist/esm/coreX/NamesTooltip/index.js +3 -3
  221. package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
  222. package/dist/esm/coreX/Sider/index.js +3 -3
  223. package/dist/esm/coreX/SummaryTable/index.js +5 -5
  224. package/dist/esm/coreX/SwitchWithText/index.js +1 -1
  225. package/dist/esm/coreX/TabMenu/index.js +2 -2
  226. package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
  227. package/dist/esm/coreX/UnitWithChart/index.js +3 -3
  228. package/dist/esm/stats1.html +1 -1
  229. package/dist/esm/utils/cterror.js +27 -5
  230. package/dist/linaria.merged.scss +4046 -4044
  231. package/dist/src/core/ImmersiveDialog/type.d.ts +2 -1
  232. package/dist/src/core/LogView/LogView.eventSourceLoader.d.ts +1 -0
  233. package/dist/src/core/LogView/LogView.utils.d.ts +2 -2
  234. package/dist/src/core/LogView/LogView.xtermLoader.d.ts +1 -0
  235. package/dist/src/core/SmallDialog/SmallDialog.type.d.ts +6 -5
  236. package/dist/src/core/SmallDialog/SmallDialog.widget.d.ts +2 -1
  237. package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +5 -5
  238. package/dist/src/coreX/Dialogs/RejectDialog/RejectDialog.type.d.ts +12 -12
  239. package/dist/src/spec/base.d.ts +10 -1
  240. package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +1 -1
  241. package/dist/stories/docs/core/SmallDialog.stories.d.ts +15 -0
  242. package/dist/stories/docs/core/WizardDialog.stories.d.ts +1 -1
  243. package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +4 -4
  244. package/dist/stories/docs/coreX/Dialogs/RejectDialog.stories.d.ts +20 -20
  245. package/dist/style.css +3901 -3901
  246. package/package.json +3 -3
@@ -1,11 +1,9 @@
1
1
  import React__default, { useRef, useState, useEffect, useMemo, useCallback } from 'react';
2
2
  import { cx } from '@linaria/core';
3
- import { Terminal } from '@xterm/xterm';
4
- import { SearchAddon } from '@xterm/addon-search';
5
- import { FitAddon } from '@xterm/addon-fit';
6
3
  import { Search16OntintIcon, ArrowChevronUp16OntintIcon, ArrowChevronUp16BlueIcon, ArrowChevronDown16OntintIcon, ArrowChevronDown16BlueIcon, XmarkCloseCircleFill16OntintIcon, XmarkCloseCircleFill16OntintLightIcon } from '@cloudtower/icons-react';
7
4
  import useParrotTranslation from '../../hooks/useParrotTranslation.js';
8
5
  import { LogViewContainer, LogViewInnerContaier, SearchInputStyle, LogTerminal, CustomContentOverlay } from './LogView.style.js';
6
+ import { loadXtermModules as loadXtermModules$1 } from './LogView.xtermLoader.js';
9
7
  import { isMacOS, customShortcutsForMac, customShortcutsForWin, isCustomKeyboardAction, scrollLines, scrollPages, copySelectLines, selectAll, eventsource } from './LogView.utils.js';
10
8
  import { Color } from '../../styles/token/color.js';
11
9
  import { Show } from '../../coreX/Show/index.js';
@@ -30,6 +28,7 @@ var __spreadValues = (a, b) => {
30
28
  return a;
31
29
  };
32
30
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
31
+ const loadXtermModules = loadXtermModules$1;
33
32
  const useLogViewEventSource = ({
34
33
  enabled,
35
34
  terminal,
@@ -147,84 +146,100 @@ const LogView = ({
147
146
  const [current, setCurrent] = useState(1);
148
147
  const [eventSourceError, setEventSourceError] = useState(null);
149
148
  useEffect(() => {
150
- var _a;
151
149
  if (!terminalContainerRef.current)
152
150
  return;
153
- const terminal = new Terminal({
154
- fontFamily: "Roboto Mono, monospace",
155
- fontSize: 12,
156
- scrollOnUserInput: false,
157
- lineHeight: 1.5,
158
- theme: {
159
- background: "#00122E",
160
- foreground: "#FFFFFF",
161
- cursor: "#FFFFFF"
162
- },
163
- rows,
164
- convertEol: true,
165
- cursorBlink: false,
166
- disableStdin: true,
167
- allowProposedApi: true,
168
- scrollback
169
- });
170
- terminal.attachCustomKeyEventHandler((event) => {
171
- if (!terminalRef.current.enableKeyboardShortcuts)
172
- return true;
173
- const target = event.target;
174
- const isXtermEvent = target instanceof HTMLElement && target.closest(".xterm");
175
- if (!isXtermEvent)
176
- return true;
177
- const shortcuts = isMacOS() ? customShortcutsForMac : customShortcutsForWin;
178
- if (event.type === "keydown" && isCustomKeyboardAction(event, shortcuts)) {
179
- event.stopPropagation();
180
- event.preventDefault();
181
- const keyActions = {
182
- arrowup: () => scrollLines("up", terminal),
183
- arrowdown: () => scrollLines("down", terminal),
184
- pageup: () => scrollPages("up", terminal),
185
- pagedown: () => scrollPages("down", terminal),
186
- c: () => copySelectLines(terminal),
187
- a: () => selectAll(terminal)
151
+ let disposed = false;
152
+ let terminal = null;
153
+ setReadyTerminal(null);
154
+ const initializeTerminal = async () => {
155
+ var _a;
156
+ try {
157
+ const { Terminal, SearchAddon, FitAddon } = await loadXtermModules();
158
+ if (disposed || !terminalContainerRef.current)
159
+ return;
160
+ terminal = new Terminal({
161
+ fontFamily: "Roboto Mono, monospace",
162
+ fontSize: 12,
163
+ scrollOnUserInput: false,
164
+ lineHeight: 1.5,
165
+ theme: {
166
+ background: "#00122E",
167
+ foreground: "#FFFFFF",
168
+ cursor: "#FFFFFF"
169
+ },
170
+ rows,
171
+ convertEol: true,
172
+ cursorBlink: false,
173
+ disableStdin: true,
174
+ allowProposedApi: true,
175
+ scrollback
176
+ });
177
+ terminal.attachCustomKeyEventHandler((event) => {
178
+ if (!terminalRef.current.enableKeyboardShortcuts)
179
+ return true;
180
+ const target = event.target;
181
+ const isXtermEvent = target instanceof HTMLElement && target.closest(".xterm");
182
+ if (!isXtermEvent)
183
+ return true;
184
+ const shortcuts = isMacOS() ? customShortcutsForMac : customShortcutsForWin;
185
+ if (event.type === "keydown" && isCustomKeyboardAction(event, shortcuts)) {
186
+ event.stopPropagation();
187
+ event.preventDefault();
188
+ const keyActions = {
189
+ arrowup: () => scrollLines("up", terminal),
190
+ arrowdown: () => scrollLines("down", terminal),
191
+ pageup: () => scrollPages("up", terminal),
192
+ pagedown: () => scrollPages("down", terminal),
193
+ c: () => copySelectLines(terminal),
194
+ a: () => selectAll(terminal)
195
+ };
196
+ const action = keyActions[event.key.toLowerCase()];
197
+ if (action)
198
+ action();
199
+ return false;
200
+ }
201
+ return true;
202
+ });
203
+ const search = new SearchAddon({
204
+ highlightLimit: searchHighlightLimit
205
+ });
206
+ terminal.loadAddon(search);
207
+ const fit = new FitAddon();
208
+ terminal.loadAddon(fit);
209
+ terminalRef.current = {
210
+ searchAddon: search,
211
+ fitAddon: fit,
212
+ enableKeyboardShortcuts: terminalRef.current.enableKeyboardShortcuts
188
213
  };
189
- const action = keyActions[event.key.toLowerCase()];
190
- if (action)
191
- action();
192
- return false;
214
+ terminal.open(terminalContainerRef.current);
215
+ try {
216
+ fit.fit();
217
+ } catch (e) {
218
+ console.error("Error fitting terminal:", e);
219
+ }
220
+ if (content) {
221
+ terminal.write(content);
222
+ terminalRef.current.previousContent = content;
223
+ setHasData(true);
224
+ } else {
225
+ setHasData(false);
226
+ }
227
+ (_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
228
+ ({ resultCount, resultIndex }) => {
229
+ setSearchCount(resultCount);
230
+ setCurrent(resultIndex + 1);
231
+ }
232
+ );
233
+ setReadyTerminal(terminal);
234
+ } catch (e) {
235
+ if (!disposed)
236
+ console.error("Error initializing terminal:", e);
193
237
  }
194
- return true;
195
- });
196
- const search = new SearchAddon({
197
- highlightLimit: searchHighlightLimit
198
- });
199
- terminal.loadAddon(search);
200
- const fit = new FitAddon();
201
- terminal.loadAddon(fit);
202
- terminalRef.current = {
203
- searchAddon: search,
204
- fitAddon: fit
205
238
  };
206
- terminal.open(terminalContainerRef.current);
207
- setReadyTerminal(terminal);
208
- try {
209
- fit.fit();
210
- } catch (e) {
211
- console.error("Error fitting terminal:", e);
212
- }
213
- if (content) {
214
- terminal.write(content);
215
- terminalRef.current.previousContent = content;
216
- setHasData(true);
217
- } else {
218
- setHasData(false);
219
- }
220
- (_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
221
- ({ resultCount, resultIndex }) => {
222
- setSearchCount(resultCount);
223
- setCurrent(resultIndex + 1);
224
- }
225
- );
239
+ initializeTerminal();
226
240
  return () => {
227
- terminal.dispose();
241
+ disposed = true;
242
+ terminal == null ? void 0 : terminal.dispose();
228
243
  };
229
244
  }, [rows, scrollback, searchHighlightLimit]);
230
245
  useEffect(() => {
@@ -2,24 +2,24 @@ import { styled } from '@linaria/react';
2
2
 
3
3
  const LogViewContainer = /*#__PURE__*/styled('div')({
4
4
  name: "LogViewContainer",
5
- class: "E_4100_0_9_l1v1luhz",
5
+ class: "E_4100_0_11_l1v1luhz",
6
6
  propsAsIs: false
7
7
  });
8
8
  const LogViewInnerContaier = /*#__PURE__*/styled('div')({
9
9
  name: "LogViewInnerContaier",
10
- class: "E_4100_0_9_lranxiw",
10
+ class: "E_4100_0_11_lranxiw",
11
11
  propsAsIs: false
12
12
  });
13
13
  const LogTerminal = /*#__PURE__*/styled('div')({
14
14
  name: "LogTerminal",
15
- class: "E_4100_0_9_l1y3zqy5",
15
+ class: "E_4100_0_11_l1y3zqy5",
16
16
  propsAsIs: false
17
17
  });
18
18
  const CustomContentOverlay = /*#__PURE__*/styled('div')({
19
19
  name: "CustomContentOverlay",
20
- class: "E_4100_0_9_c1x4mn5u",
20
+ class: "E_4100_0_11_c1x4mn5u",
21
21
  propsAsIs: false
22
22
  });
23
- const SearchInputStyle = "E_4100_0_9_s4pilip";
23
+ const SearchInputStyle = "E_4100_0_11_s4pilip";
24
24
 
25
25
  export { CustomContentOverlay, LogTerminal, LogViewContainer, LogViewInnerContaier, SearchInputStyle };
@@ -1,4 +1,4 @@
1
- import { EventSource } from 'eventsource';
1
+ import { loadEventSourceModule as loadEventSourceModule$1 } from './LogView.eventSourceLoader.js';
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __defProps = Object.defineProperties;
@@ -19,6 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  return a;
20
20
  };
21
21
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
+ const loadEventSourceModule = loadEventSourceModule$1;
22
23
  const eventsource = (url, options, terminal) => {
23
24
  const {
24
25
  initOptions,
@@ -33,6 +34,7 @@ const eventsource = (url, options, terminal) => {
33
34
  onMessage
34
35
  } = options;
35
36
  let aborted = false;
37
+ let EventSourceConstructor = null;
36
38
  let eventSource = null;
37
39
  const close = () => {
38
40
  aborted = true;
@@ -41,19 +43,28 @@ const eventsource = (url, options, terminal) => {
41
43
  eventSource = null;
42
44
  }
43
45
  };
44
- const start = () => {
46
+ const start = async () => {
45
47
  var _a;
46
48
  try {
47
- eventSource = new EventSource(url, initOptions);
49
+ if (!EventSourceConstructor) {
50
+ EventSourceConstructor = (await loadEventSourceModule()).EventSource;
51
+ }
52
+ if (aborted)
53
+ return;
54
+ eventSource = new EventSourceConstructor(url, initOptions);
48
55
  eventSource.addEventListener(openEventName, (e) => {
49
- onOpen && onOpen(e, eventSource, {
50
- terminal
51
- });
56
+ onOpen && onOpen(
57
+ e,
58
+ eventSource,
59
+ {
60
+ terminal
61
+ }
62
+ );
52
63
  });
53
64
  eventSource.addEventListener(errorEventName, (err) => {
54
65
  var _a2;
55
66
  onError && onError(err);
56
- if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) === EventSource.CLOSED) {
67
+ if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) === (EventSourceConstructor == null ? void 0 : EventSourceConstructor.CLOSED)) {
57
68
  const timeout = (_a2 = options.reconnectWait) != null ? _a2 : 1;
58
69
  setTimeout(start, timeout * 1e3);
59
70
  }
@@ -0,0 +1,20 @@
1
+ let xtermModulesPromise = null;
2
+ const loadXtermModules = () => {
3
+ if (!xtermModulesPromise) {
4
+ xtermModulesPromise = Promise.all([
5
+ import('@xterm/xterm'),
6
+ import('@xterm/addon-search'),
7
+ import('@xterm/addon-fit')
8
+ ]).then(([xterm, addonSearch, addonFit]) => ({
9
+ Terminal: xterm.Terminal,
10
+ SearchAddon: addonSearch.SearchAddon,
11
+ FitAddon: addonFit.FitAddon
12
+ })).catch((error) => {
13
+ xtermModulesPromise = null;
14
+ throw error;
15
+ });
16
+ }
17
+ return xtermModulesPromise;
18
+ };
19
+
20
+ export { loadXtermModules };
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
28
28
  }
29
29
  return target;
30
30
  };
31
- const MediumDialogStyle = "E_4100_0_9_m5foqp8";
31
+ const MediumDialogStyle = "E_4100_0_11_m5foqp8";
32
32
  const MediumDialog = _a => {
33
33
  var _b = _a,
34
34
  {
@@ -1,23 +1,23 @@
1
1
  import { styled } from '@linaria/react';
2
2
 
3
- const MetricLegendTabStyle = "E_4100_0_9_mp64wfi";
4
- const LegendStyle = "E_4100_0_9_l1oyigan";
5
- const LegendItemStyle = "E_4100_0_9_l1noi4n1";
6
- const ColorBlockStyle = "E_4100_0_9_cz19rz6";
7
- const ExtraResource = "E_4100_0_9_e17r5r9c";
3
+ const MetricLegendTabStyle = "E_4100_0_11_mp64wfi";
4
+ const LegendStyle = "E_4100_0_11_l1oyigan";
5
+ const LegendItemStyle = "E_4100_0_11_l1noi4n1";
6
+ const ColorBlockStyle = "E_4100_0_11_cz19rz6";
7
+ const ExtraResource = "E_4100_0_11_e17r5r9c";
8
8
  const MetricWrapper = /*#__PURE__*/styled('div')({
9
9
  name: "MetricWrapper",
10
- class: "E_4100_0_9_m1y1hhnr",
10
+ class: "E_4100_0_11_m1y1hhnr",
11
11
  propsAsIs: false
12
12
  });
13
13
  const TooltipWrapper = /*#__PURE__*/styled('div')({
14
14
  name: "TooltipWrapper",
15
- class: "E_4100_0_9_tnvijvs",
15
+ class: "E_4100_0_11_tnvijvs",
16
16
  propsAsIs: false
17
17
  });
18
18
  const TooltipColumn = /*#__PURE__*/styled('div')({
19
19
  name: "TooltipColumn",
20
- class: "E_4100_0_9_t1ub2aex",
20
+ class: "E_4100_0_11_t1ub2aex",
21
21
  propsAsIs: false
22
22
  });
23
23
 
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import { Typo } from '../Typo/index.js';
4
4
  import { Header, NavCenterStyle } from './style.js';
5
5
 
6
- const MinWidth = "E_4100_0_9_m196gn1d";
6
+ const MinWidth = "E_4100_0_11_m196gn1d";
7
7
  const Nav = ({
8
8
  left,
9
9
  right,
@@ -2,9 +2,9 @@ import { styled } from '@linaria/react';
2
2
 
3
3
  const Header = /*#__PURE__*/styled('header')({
4
4
  name: "Header",
5
- class: "E_4100_0_9_h12yihis",
5
+ class: "E_4100_0_11_h12yihis",
6
6
  propsAsIs: false
7
7
  });
8
- const NavCenterStyle = "E_4100_0_9_ncaepor";
8
+ const NavCenterStyle = "E_4100_0_11_ncaepor";
9
9
 
10
10
  export { Header, NavCenterStyle };
@@ -2,8 +2,8 @@ import cs from 'classnames';
2
2
  import React__default, { useRef, useState, useCallback, useLayoutEffect } from 'react';
3
3
  import useElementResize from '../../hooks/useElementResize.js';
4
4
 
5
- const OverflowWrapper = "E_4100_0_9_owd0kml";
6
- const HiddenStyle = "E_4100_0_9_h1jsgezc";
5
+ const OverflowWrapper = "E_4100_0_11_owd0kml";
6
+ const HiddenStyle = "E_4100_0_11_h1jsgezc";
7
7
  const Overflow = props => {
8
8
  const {
9
9
  children,
@@ -6,8 +6,8 @@ import { Dropdown, Menu } from 'antd';
6
6
  import cs from 'classnames';
7
7
  import React__default, { useRef, useEffect, useMemo } from 'react';
8
8
 
9
- const PaginationStyle = "E_4100_0_9_phljevk";
10
- const DropdownOverlayStyle = "E_4100_0_9_d12rtyeg";
9
+ const PaginationStyle = "E_4100_0_11_phljevk";
10
+ const DropdownOverlayStyle = "E_4100_0_11_d12rtyeg";
11
11
  const Pagination = props => {
12
12
  const {
13
13
  current,
@@ -42,7 +42,7 @@ const _exp = /*#__PURE__*/() => ({
42
42
  }) => color || "";
43
43
  const IconFieldText = /*#__PURE__*/styled('div')({
44
44
  name: "IconFieldText",
45
- class: "E_4100_0_9_i14c7jc8",
45
+ class: "E_4100_0_11_i14c7jc8",
46
46
  propsAsIs: false,
47
47
  vars: {
48
48
  "i14c7jc8-0": [_exp()]
@@ -59,7 +59,7 @@ const StatusIconMap = {
59
59
  };
60
60
  const IconFieldWrapper = /*#__PURE__*/styled('div')({
61
61
  name: "IconFieldWrapper",
62
- class: "E_4100_0_9_i1ibuolf",
62
+ class: "E_4100_0_11_i1ibuolf",
63
63
  propsAsIs: false
64
64
  });
65
65
  const IconField = _a => {
@@ -39,7 +39,7 @@ var __objRest = (source, exclude) => {
39
39
  };
40
40
  const Row = /*#__PURE__*/styled('div')({
41
41
  name: "Row",
42
- class: "E_4100_0_9_r77hffu",
42
+ class: "E_4100_0_11_r77hffu",
43
43
  propsAsIs: false
44
44
  });
45
45
  const _exp = /*#__PURE__*/() => ({
@@ -47,7 +47,7 @@ const _exp = /*#__PURE__*/() => ({
47
47
  }) => type === "rich" ? "6px" : "4px";
48
48
  const ProgressContainer = /*#__PURE__*/styled('div')({
49
49
  name: "ProgressContainer",
50
- class: "E_4100_0_9_p1cmxsf7",
50
+ class: "E_4100_0_11_p1cmxsf7",
51
51
  propsAsIs: false,
52
52
  vars: {
53
53
  "p1cmxsf7-0": [_exp()]
@@ -1,6 +1,6 @@
1
- const DescriptionStyle = "E_4100_0_9_d1u4ndxc";
2
- const FlexFullContentStyle = "E_4100_0_9_f6xb0iv";
3
- const BaseProgressStyle = "E_4100_0_9_b1dhu7ov";
4
- const ProgressStyle = "E_4100_0_9_p1as1j2z";
1
+ const DescriptionStyle = "E_4100_0_11_d1u4ndxc";
2
+ const FlexFullContentStyle = "E_4100_0_11_f6xb0iv";
3
+ const BaseProgressStyle = "E_4100_0_11_b1dhu7ov";
4
+ const ProgressStyle = "E_4100_0_11_p1as1j2z";
5
5
 
6
6
  export { BaseProgressStyle, DescriptionStyle, FlexFullContentStyle, ProgressStyle };
@@ -33,11 +33,11 @@ var __objRest = (source, exclude) => {
33
33
  }
34
34
  return target;
35
35
  };
36
- const titleAreaStyle = "E_4100_0_9_t1gvlxt5";
36
+ const titleAreaStyle = "E_4100_0_11_t1gvlxt5";
37
37
  const _exp2 = /*#__PURE__*/() => props => props.gap;
38
38
  const AreaWrapper = /*#__PURE__*/styled('div')({
39
39
  name: "AreaWrapper",
40
- class: "E_4100_0_9_a1ji6r68",
40
+ class: "E_4100_0_11_a1ji6r68",
41
41
  propsAsIs: false,
42
42
  vars: {
43
43
  "a1ji6r68-0": [_exp2(), "px"]
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
30
30
  }
31
31
  return target;
32
32
  };
33
- const RadioStyle = "E_4100_0_9_rapgekc";
34
- const RadioGroupStyle = "E_4100_0_9_rp906go";
35
- const RadioButtonStyle = "E_4100_0_9_rcc63c8";
33
+ const RadioStyle = "E_4100_0_11_rapgekc";
34
+ const RadioGroupStyle = "E_4100_0_11_rp906go";
35
+ const RadioButtonStyle = "E_4100_0_11_rcc63c8";
36
36
  const KitRadioGroupContext = React__default.createContext({});
37
37
  const Radio = _a => {
38
38
  var _b = _a,
@@ -1,7 +1,7 @@
1
- const SearchInputStyles = "E_4100_0_9_s1n7hav7";
2
- const CountTextStyles = "E_4100_0_9_c1tgpyn0";
3
- const IconContainerStyles = "E_4100_0_9_i1cmbu8m";
4
- const DisabledIconStyles = "E_4100_0_9_dxmfsc9";
5
- const SearchInputDropdownStyles = "E_4100_0_9_slbf45q";
1
+ const SearchInputStyles = "E_4100_0_11_s1n7hav7";
2
+ const CountTextStyles = "E_4100_0_11_c1tgpyn0";
3
+ const IconContainerStyles = "E_4100_0_11_i1cmbu8m";
4
+ const DisabledIconStyles = "E_4100_0_11_dxmfsc9";
5
+ const SearchInputDropdownStyles = "E_4100_0_11_slbf45q";
6
6
 
7
7
  export { CountTextStyles, DisabledIconStyles, IconContainerStyles, SearchInputDropdownStyles, SearchInputStyles };
@@ -20,10 +20,10 @@ var __spreadValues = (a, b) => {
20
20
  }
21
21
  return a;
22
22
  };
23
- const Segment = "E_4100_0_9_s11wux3h";
24
- const SmallSegment = "E_4100_0_9_s1t2an3z";
25
- const MediumSegment = "E_4100_0_9_ma64lna";
26
- const ColorSegment = "E_4100_0_9_ckld275";
23
+ const Segment = "E_4100_0_11_s11wux3h";
24
+ const SmallSegment = "E_4100_0_11_s1t2an3z";
25
+ const MediumSegment = "E_4100_0_11_ma64lna";
26
+ const ColorSegment = "E_4100_0_11_ckld275";
27
27
  const SegmentControl = props => {
28
28
  const {
29
29
  size = "middle",
@@ -1,6 +1,6 @@
1
- const SelectStyle = "E_4100_0_9_s4ivdfu";
2
- const SelectIconStyle = "E_4100_0_9_sks9xr8";
3
- const SelectSizeStyle = "E_4100_0_9_swwhohx";
4
- const PlaceholderTextStyle = "E_4100_0_9_p2sxmsl";
1
+ const SelectStyle = "E_4100_0_11_s4ivdfu";
2
+ const SelectIconStyle = "E_4100_0_11_sks9xr8";
3
+ const SelectSizeStyle = "E_4100_0_11_swwhohx";
4
+ const PlaceholderTextStyle = "E_4100_0_11_p2sxmsl";
5
5
 
6
6
  export { PlaceholderTextStyle, SelectIconStyle, SelectSizeStyle, SelectStyle };
@@ -27,9 +27,9 @@ var __objRest = (source, exclude) => {
27
27
  }
28
28
  return target;
29
29
  };
30
- const OptionStyle = "E_4100_0_9_oa99sl3";
31
- const LeftStyle = "E_4100_0_9_lvp5pj7";
32
- const SlotStyle = "E_4100_0_9_s1io1lws";
30
+ const OptionStyle = "E_4100_0_11_oa99sl3";
31
+ const LeftStyle = "E_4100_0_11_lvp5pj7";
32
+ const SlotStyle = "E_4100_0_11_s1io1lws";
33
33
  const AntdOption = Select.Option;
34
34
  function getOptions(options) {
35
35
  return options.map(option => {
@@ -8,7 +8,7 @@ import useParrotTranslation from '../../hooks/useParrotTranslation.js';
8
8
  import cs from 'classnames';
9
9
  import React__default, { useCallback } from 'react';
10
10
 
11
- const inputStyle = "E_4100_0_9_ivqqkzv";
11
+ const inputStyle = "E_4100_0_11_ivqqkzv";
12
12
  const SimplePagination = props => {
13
13
  const {
14
14
  className,
@@ -71,7 +71,7 @@ const SimplePagination = props => {
71
71
  changeValue(event.target.value);
72
72
  }
73
73
  }), /* @__PURE__ */React__default.createElement("span", {
74
- className: cs("E_4100_0_9_c1wk4q29", Typo.Label.l3_regular_upper)
74
+ className: cs("E_4100_0_11_c1wk4q29", Typo.Label.l3_regular_upper)
75
75
  }, `/ ${pageLength}`), showNext && /* @__PURE__ */React__default.createElement(Button, {
76
76
  className: "next-btn",
77
77
  type: "quiet",
@@ -1,7 +1,7 @@
1
1
  import cs from 'classnames';
2
2
  import React__default from 'react';
3
3
 
4
- const SkeletonContentStyle = "E_4100_0_9_s20iney";
4
+ const SkeletonContentStyle = "E_4100_0_11_s20iney";
5
5
  const SkeletonContent = props => {
6
6
  const {
7
7
  width = "100%",
@@ -30,9 +30,7 @@ var __spreadValues = (a, b) => {
30
30
  }
31
31
  return a;
32
32
  };
33
- const DefaultTitleRender = ({
34
- title
35
- }) => {
33
+ const DefaultTitleRender = ({ title }) => {
36
34
  return /* @__PURE__ */ React__default.createElement("span", { className: cs(Typo.Display.d2_bold_title) }, title);
37
35
  };
38
36
  const SmallDialog = ({
@@ -1,9 +1,9 @@
1
- const DialogStyle = "E_4100_0_9_dxyv8bv";
2
- const FooterStyle = "E_4100_0_9_fbgo4wr";
3
- const ErrorTextStyle = "E_4100_0_9_ekxnz54";
4
- const CloseIconStyle = "E_4100_0_9_ct1041x";
5
- const ModelTitleSkeletonStyle = "E_4100_0_9_m1k84ymw";
6
- const ModelContentSkeletonStyle = "E_4100_0_9_m15ds5xe";
7
- const ModelInitializingErrorStyle = "E_4100_0_9_ma56n19";
1
+ const DialogStyle = "E_4100_0_11_dxyv8bv";
2
+ const FooterStyle = "E_4100_0_11_fbgo4wr";
3
+ const ErrorTextStyle = "E_4100_0_11_ekxnz54";
4
+ const CloseIconStyle = "E_4100_0_11_ct1041x";
5
+ const ModelTitleSkeletonStyle = "E_4100_0_11_m1k84ymw";
6
+ const ModelContentSkeletonStyle = "E_4100_0_11_m15ds5xe";
7
+ const ModelInitializingErrorStyle = "E_4100_0_11_ma56n19";
8
8
 
9
9
  export { CloseIconStyle, DialogStyle, ErrorTextStyle, FooterStyle, ModelContentSkeletonStyle, ModelInitializingErrorStyle, ModelTitleSkeletonStyle };
@@ -35,10 +35,10 @@ var __objRest = (source, exclude) => {
35
35
  return target;
36
36
  };
37
37
  const StatusPresetColors = ["blue", "red", "yellow", "green", "gray"];
38
- const StatusCapsuleStyle = "E_4100_0_9_sddwhm6";
38
+ const StatusCapsuleStyle = "E_4100_0_11_sddwhm6";
39
39
  const StatusCode = /*#__PURE__*/styled('i')({
40
40
  name: "StatusCode",
41
- class: "E_4100_0_9_satwmqm",
41
+ class: "E_4100_0_11_satwmqm",
42
42
  propsAsIs: false
43
43
  });
44
44
  const StatusIcon = ({
@@ -1,7 +1,7 @@
1
1
  import cs from 'classnames';
2
2
  import React__default, { useRef, useLayoutEffect } from 'react';
3
3
 
4
- const CircleProgressStyle = "E_4100_0_9_c1bus5hc";
4
+ const CircleProgressStyle = "E_4100_0_11_c1bus5hc";
5
5
  const CircleProgress = props => {
6
6
  const {
7
7
  percent,
@@ -1,7 +1,7 @@
1
- const StepsStyle = "E_4100_0_9_sjob3jg";
2
- const HorizontalStyle = "E_4100_0_9_hjvj6s6";
3
- const VerticalStyle = "E_4100_0_9_v4tv3mf";
4
- const HorizontalStepContentStyle = "E_4100_0_9_h6l1tj4";
5
- const VerticalStepContentStyle = "E_4100_0_9_v18frne8";
1
+ const StepsStyle = "E_4100_0_11_sjob3jg";
2
+ const HorizontalStyle = "E_4100_0_11_hjvj6s6";
3
+ const VerticalStyle = "E_4100_0_11_v4tv3mf";
4
+ const HorizontalStepContentStyle = "E_4100_0_11_h6l1tj4";
5
+ const VerticalStepContentStyle = "E_4100_0_11_v18frne8";
6
6
 
7
7
  export { HorizontalStepContentStyle, HorizontalStyle, StepsStyle, VerticalStepContentStyle, VerticalStyle };