@cloudtower/eagle 4100.0.10 → 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 (229) 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.style.js +7 -7
  63. package/dist/cjs/core/StatusCapsule/index.js +2 -2
  64. package/dist/cjs/core/StepProgress/index.js +1 -1
  65. package/dist/cjs/core/Steps/style.js +5 -5
  66. package/dist/cjs/core/Styled/index.js +40 -40
  67. package/dist/cjs/core/Switch/index.js +2 -2
  68. package/dist/cjs/core/Tab/Tab.js +1 -1
  69. package/dist/cjs/core/Tab/Tab.style.js +4 -4
  70. package/dist/cjs/core/Table/TableSkeleton.js +1 -1
  71. package/dist/cjs/core/Table/TableWidget.js +1 -1
  72. package/dist/cjs/core/Table/index.js +3 -3
  73. package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
  74. package/dist/cjs/core/TableForm/style.js +7 -7
  75. package/dist/cjs/core/Tag/SplitTag.js +1 -1
  76. package/dist/cjs/core/Tag/style.js +5 -5
  77. package/dist/cjs/core/Time/index.js +1 -1
  78. package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
  79. package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
  80. package/dist/cjs/core/Token/index.js +4 -4
  81. package/dist/cjs/core/Token/style.js +1 -1
  82. package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
  83. package/dist/cjs/core/Tooltip/index.js +1 -1
  84. package/dist/cjs/core/Truncate/index.js +1 -1
  85. package/dist/cjs/core/Typo/index.js +58 -58
  86. package/dist/cjs/core/WizardDialog/styles.js +4 -4
  87. package/dist/cjs/coreX/BarChart/index.js +1 -1
  88. package/dist/cjs/coreX/BatchOperation/index.js +2 -2
  89. package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
  90. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
  91. package/dist/cjs/coreX/CircleLoading/index.js +1 -1
  92. package/dist/cjs/coreX/CronCalendar/index.js +4 -4
  93. package/dist/cjs/coreX/CronPlan/index.js +4 -4
  94. package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  95. package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +1 -1
  96. package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  97. package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  98. package/dist/cjs/coreX/GoBackButton/index.js +1 -1
  99. package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
  100. package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
  101. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
  102. package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  103. package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
  104. package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
  105. package/dist/cjs/coreX/Sider/index.js +3 -3
  106. package/dist/cjs/coreX/SummaryTable/index.js +5 -5
  107. package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
  108. package/dist/cjs/coreX/TabMenu/index.js +2 -2
  109. package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
  110. package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
  111. package/dist/cjs/stats1.html +1 -1
  112. package/dist/components.css +4344 -4344
  113. package/dist/esm/core/AccordionCard/index.js +1 -1
  114. package/dist/esm/core/Alert/alert.style.js +2 -2
  115. package/dist/esm/core/Avatar/index.js +1 -1
  116. package/dist/esm/core/Banner/banner.style.js +4 -4
  117. package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
  118. package/dist/esm/core/BlankState/style.js +1 -1
  119. package/dist/esm/core/Breadcrumb/index.js +1 -1
  120. package/dist/esm/core/Button/index.js +1 -1
  121. package/dist/esm/core/ButtonGroup/index.js +2 -2
  122. package/dist/esm/core/Card/CardBody.js +1 -1
  123. package/dist/esm/core/Card/CardTitle.js +1 -1
  124. package/dist/esm/core/Card/CardWrapper.js +2 -2
  125. package/dist/esm/core/Cascader/cascader.style.js +11 -11
  126. package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
  127. package/dist/esm/core/DetailCard/index.js +1 -1
  128. package/dist/esm/core/DonutChart/index.js +2 -2
  129. package/dist/esm/core/DropdownMenu/index.js +1 -1
  130. package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
  131. package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
  132. package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
  133. package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
  134. package/dist/esm/core/FailedLoad/index.js +1 -1
  135. package/dist/esm/core/FormItem/index.js +1 -1
  136. package/dist/esm/core/Icon/index.js +1 -1
  137. package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
  138. package/dist/esm/core/Input/index.js +1 -1
  139. package/dist/esm/core/InputGroup/index.js +1 -1
  140. package/dist/esm/core/InputInteger/index.js +1 -1
  141. package/dist/esm/core/InputNumber/index.js +1 -1
  142. package/dist/esm/core/InputPassword/index.js +1 -1
  143. package/dist/esm/core/InputTagItem/index.js +1 -1
  144. package/dist/esm/core/LegacySelect/select.style.js +1 -1
  145. package/dist/esm/core/Legend/index.js +5 -5
  146. package/dist/esm/core/LineChart/LineChartActions.js +2 -2
  147. package/dist/esm/core/LineChart/TooltipFormatter.js +1 -1
  148. package/dist/esm/core/LineChart/styled.js +9 -9
  149. package/dist/esm/core/Link/index.js +1 -1
  150. package/dist/esm/core/Loading/style.js +4 -4
  151. package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
  152. package/dist/esm/core/LogView/LogView.eventSourceLoader.js +12 -0
  153. package/dist/esm/core/LogView/LogView.js +90 -75
  154. package/dist/esm/core/LogView/LogView.style.js +5 -5
  155. package/dist/esm/core/LogView/LogView.utils.js +18 -7
  156. package/dist/esm/core/LogView/LogView.xtermLoader.js +20 -0
  157. package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
  158. package/dist/esm/core/Metric/styled.js +8 -8
  159. package/dist/esm/core/Nav/index.js +1 -1
  160. package/dist/esm/core/Nav/style.js +2 -2
  161. package/dist/esm/core/Overflow/index.js +2 -2
  162. package/dist/esm/core/Pagination/index.js +2 -2
  163. package/dist/esm/core/Progress/components.js +2 -2
  164. package/dist/esm/core/Progress/index.js +2 -2
  165. package/dist/esm/core/Progress/progress.style.js +4 -4
  166. package/dist/esm/core/Progress/progress.widgets.js +2 -2
  167. package/dist/esm/core/Radio/index.js +3 -3
  168. package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
  169. package/dist/esm/core/SegmentControl/index.js +4 -4
  170. package/dist/esm/core/Select/select.style.js +4 -4
  171. package/dist/esm/core/Select/select.widgets.js +3 -3
  172. package/dist/esm/core/SimplePagination/index.js +2 -2
  173. package/dist/esm/core/Skeleton/Content.js +1 -1
  174. package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
  175. package/dist/esm/core/StatusCapsule/index.js +2 -2
  176. package/dist/esm/core/StepProgress/index.js +1 -1
  177. package/dist/esm/core/Steps/style.js +5 -5
  178. package/dist/esm/core/Styled/index.js +40 -40
  179. package/dist/esm/core/Switch/index.js +2 -2
  180. package/dist/esm/core/Tab/Tab.js +1 -1
  181. package/dist/esm/core/Tab/Tab.style.js +4 -4
  182. package/dist/esm/core/Table/TableSkeleton.js +1 -1
  183. package/dist/esm/core/Table/TableWidget.js +1 -1
  184. package/dist/esm/core/Table/index.js +3 -3
  185. package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
  186. package/dist/esm/core/TableForm/style.js +7 -7
  187. package/dist/esm/core/Tag/SplitTag.js +1 -1
  188. package/dist/esm/core/Tag/style.js +5 -5
  189. package/dist/esm/core/Time/index.js +1 -1
  190. package/dist/esm/core/TimeZoneSelect/index.js +7 -7
  191. package/dist/esm/core/Timeline/Timeline.style.js +5 -5
  192. package/dist/esm/core/Token/index.js +4 -4
  193. package/dist/esm/core/Token/style.js +1 -1
  194. package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
  195. package/dist/esm/core/Tooltip/index.js +1 -1
  196. package/dist/esm/core/Truncate/index.js +1 -1
  197. package/dist/esm/core/Typo/index.js +58 -58
  198. package/dist/esm/core/WizardDialog/styles.js +4 -4
  199. package/dist/esm/coreX/BarChart/index.js +1 -1
  200. package/dist/esm/coreX/BatchOperation/index.js +2 -2
  201. package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
  202. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
  203. package/dist/esm/coreX/CircleLoading/index.js +1 -1
  204. package/dist/esm/coreX/CronCalendar/index.js +4 -4
  205. package/dist/esm/coreX/CronPlan/index.js +4 -4
  206. package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  207. package/dist/esm/coreX/DateRangePicker/RelativeTime.js +1 -1
  208. package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  209. package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  210. package/dist/esm/coreX/GoBackButton/index.js +1 -1
  211. package/dist/esm/coreX/I18nNameTag/index.js +1 -1
  212. package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
  213. package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
  214. package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  215. package/dist/esm/coreX/NamesTooltip/index.js +3 -3
  216. package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
  217. package/dist/esm/coreX/Sider/index.js +3 -3
  218. package/dist/esm/coreX/SummaryTable/index.js +5 -5
  219. package/dist/esm/coreX/SwitchWithText/index.js +1 -1
  220. package/dist/esm/coreX/TabMenu/index.js +2 -2
  221. package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
  222. package/dist/esm/coreX/UnitWithChart/index.js +3 -3
  223. package/dist/esm/stats1.html +1 -1
  224. package/dist/linaria.merged.scss +4637 -4637
  225. package/dist/src/core/LogView/LogView.eventSourceLoader.d.ts +1 -0
  226. package/dist/src/core/LogView/LogView.utils.d.ts +2 -2
  227. package/dist/src/core/LogView/LogView.xtermLoader.d.ts +1 -0
  228. package/dist/style.css +4344 -4344
  229. package/package.json +3 -3
@@ -2,12 +2,10 @@
2
2
 
3
3
  var React = require('react');
4
4
  var core = require('@linaria/core');
5
- var xterm = require('@xterm/xterm');
6
- var addonSearch = require('@xterm/addon-search');
7
- var addonFit = require('@xterm/addon-fit');
8
5
  var iconsReact = require('@cloudtower/icons-react');
9
6
  var useParrotTranslation = require('../../hooks/useParrotTranslation.js');
10
7
  var LogView_style = require('./LogView.style.js');
8
+ var LogView_xtermLoader = require('./LogView.xtermLoader.js');
11
9
  var LogView_utils = require('./LogView.utils.js');
12
10
  var color = require('../../styles/token/color.js');
13
11
  var index = require('../../coreX/Show/index.js');
@@ -36,6 +34,7 @@ var __spreadValues = (a, b) => {
36
34
  return a;
37
35
  };
38
36
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
37
+ const loadXtermModules = LogView_xtermLoader.loadXtermModules;
39
38
  const useLogViewEventSource = ({
40
39
  enabled,
41
40
  terminal,
@@ -153,84 +152,100 @@ const LogView = ({
153
152
  const [current, setCurrent] = React.useState(1);
154
153
  const [eventSourceError, setEventSourceError] = React.useState(null);
155
154
  React.useEffect(() => {
156
- var _a;
157
155
  if (!terminalContainerRef.current)
158
156
  return;
159
- const terminal = new xterm.Terminal({
160
- fontFamily: "Roboto Mono, monospace",
161
- fontSize: 12,
162
- scrollOnUserInput: false,
163
- lineHeight: 1.5,
164
- theme: {
165
- background: "#00122E",
166
- foreground: "#FFFFFF",
167
- cursor: "#FFFFFF"
168
- },
169
- rows,
170
- convertEol: true,
171
- cursorBlink: false,
172
- disableStdin: true,
173
- allowProposedApi: true,
174
- scrollback
175
- });
176
- terminal.attachCustomKeyEventHandler((event) => {
177
- if (!terminalRef.current.enableKeyboardShortcuts)
178
- return true;
179
- const target = event.target;
180
- const isXtermEvent = target instanceof HTMLElement && target.closest(".xterm");
181
- if (!isXtermEvent)
182
- return true;
183
- const shortcuts = LogView_utils.isMacOS() ? LogView_utils.customShortcutsForMac : LogView_utils.customShortcutsForWin;
184
- if (event.type === "keydown" && LogView_utils.isCustomKeyboardAction(event, shortcuts)) {
185
- event.stopPropagation();
186
- event.preventDefault();
187
- const keyActions = {
188
- arrowup: () => LogView_utils.scrollLines("up", terminal),
189
- arrowdown: () => LogView_utils.scrollLines("down", terminal),
190
- pageup: () => LogView_utils.scrollPages("up", terminal),
191
- pagedown: () => LogView_utils.scrollPages("down", terminal),
192
- c: () => LogView_utils.copySelectLines(terminal),
193
- a: () => LogView_utils.selectAll(terminal)
157
+ let disposed = false;
158
+ let terminal = null;
159
+ setReadyTerminal(null);
160
+ const initializeTerminal = async () => {
161
+ var _a;
162
+ try {
163
+ const { Terminal, SearchAddon, FitAddon } = await loadXtermModules();
164
+ if (disposed || !terminalContainerRef.current)
165
+ return;
166
+ terminal = new Terminal({
167
+ fontFamily: "Roboto Mono, monospace",
168
+ fontSize: 12,
169
+ scrollOnUserInput: false,
170
+ lineHeight: 1.5,
171
+ theme: {
172
+ background: "#00122E",
173
+ foreground: "#FFFFFF",
174
+ cursor: "#FFFFFF"
175
+ },
176
+ rows,
177
+ convertEol: true,
178
+ cursorBlink: false,
179
+ disableStdin: true,
180
+ allowProposedApi: true,
181
+ scrollback
182
+ });
183
+ terminal.attachCustomKeyEventHandler((event) => {
184
+ if (!terminalRef.current.enableKeyboardShortcuts)
185
+ return true;
186
+ const target = event.target;
187
+ const isXtermEvent = target instanceof HTMLElement && target.closest(".xterm");
188
+ if (!isXtermEvent)
189
+ return true;
190
+ const shortcuts = LogView_utils.isMacOS() ? LogView_utils.customShortcutsForMac : LogView_utils.customShortcutsForWin;
191
+ if (event.type === "keydown" && LogView_utils.isCustomKeyboardAction(event, shortcuts)) {
192
+ event.stopPropagation();
193
+ event.preventDefault();
194
+ const keyActions = {
195
+ arrowup: () => LogView_utils.scrollLines("up", terminal),
196
+ arrowdown: () => LogView_utils.scrollLines("down", terminal),
197
+ pageup: () => LogView_utils.scrollPages("up", terminal),
198
+ pagedown: () => LogView_utils.scrollPages("down", terminal),
199
+ c: () => LogView_utils.copySelectLines(terminal),
200
+ a: () => LogView_utils.selectAll(terminal)
201
+ };
202
+ const action = keyActions[event.key.toLowerCase()];
203
+ if (action)
204
+ action();
205
+ return false;
206
+ }
207
+ return true;
208
+ });
209
+ const search = new SearchAddon({
210
+ highlightLimit: searchHighlightLimit
211
+ });
212
+ terminal.loadAddon(search);
213
+ const fit = new FitAddon();
214
+ terminal.loadAddon(fit);
215
+ terminalRef.current = {
216
+ searchAddon: search,
217
+ fitAddon: fit,
218
+ enableKeyboardShortcuts: terminalRef.current.enableKeyboardShortcuts
194
219
  };
195
- const action = keyActions[event.key.toLowerCase()];
196
- if (action)
197
- action();
198
- return false;
220
+ terminal.open(terminalContainerRef.current);
221
+ try {
222
+ fit.fit();
223
+ } catch (e) {
224
+ console.error("Error fitting terminal:", e);
225
+ }
226
+ if (content) {
227
+ terminal.write(content);
228
+ terminalRef.current.previousContent = content;
229
+ setHasData(true);
230
+ } else {
231
+ setHasData(false);
232
+ }
233
+ (_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
234
+ ({ resultCount, resultIndex }) => {
235
+ setSearchCount(resultCount);
236
+ setCurrent(resultIndex + 1);
237
+ }
238
+ );
239
+ setReadyTerminal(terminal);
240
+ } catch (e) {
241
+ if (!disposed)
242
+ console.error("Error initializing terminal:", e);
199
243
  }
200
- return true;
201
- });
202
- const search = new addonSearch.SearchAddon({
203
- highlightLimit: searchHighlightLimit
204
- });
205
- terminal.loadAddon(search);
206
- const fit = new addonFit.FitAddon();
207
- terminal.loadAddon(fit);
208
- terminalRef.current = {
209
- searchAddon: search,
210
- fitAddon: fit
211
244
  };
212
- terminal.open(terminalContainerRef.current);
213
- setReadyTerminal(terminal);
214
- try {
215
- fit.fit();
216
- } catch (e) {
217
- console.error("Error fitting terminal:", e);
218
- }
219
- if (content) {
220
- terminal.write(content);
221
- terminalRef.current.previousContent = content;
222
- setHasData(true);
223
- } else {
224
- setHasData(false);
225
- }
226
- (_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
227
- ({ resultCount, resultIndex }) => {
228
- setSearchCount(resultCount);
229
- setCurrent(resultIndex + 1);
230
- }
231
- );
245
+ initializeTerminal();
232
246
  return () => {
233
- terminal.dispose();
247
+ disposed = true;
248
+ terminal == null ? void 0 : terminal.dispose();
234
249
  };
235
250
  }, [rows, scrollback, searchHighlightLimit]);
236
251
  React.useEffect(() => {
@@ -4,25 +4,25 @@ var react = require('@linaria/react');
4
4
 
5
5
  const LogViewContainer = /*#__PURE__*/react.styled('div')({
6
6
  name: "LogViewContainer",
7
- class: "E_4100_0_10_l1v1luhz",
7
+ class: "E_4100_0_11_l1v1luhz",
8
8
  propsAsIs: false
9
9
  });
10
10
  const LogViewInnerContaier = /*#__PURE__*/react.styled('div')({
11
11
  name: "LogViewInnerContaier",
12
- class: "E_4100_0_10_lranxiw",
12
+ class: "E_4100_0_11_lranxiw",
13
13
  propsAsIs: false
14
14
  });
15
15
  const LogTerminal = /*#__PURE__*/react.styled('div')({
16
16
  name: "LogTerminal",
17
- class: "E_4100_0_10_l1y3zqy5",
17
+ class: "E_4100_0_11_l1y3zqy5",
18
18
  propsAsIs: false
19
19
  });
20
20
  const CustomContentOverlay = /*#__PURE__*/react.styled('div')({
21
21
  name: "CustomContentOverlay",
22
- class: "E_4100_0_10_c1x4mn5u",
22
+ class: "E_4100_0_11_c1x4mn5u",
23
23
  propsAsIs: false
24
24
  });
25
- const SearchInputStyle = "E_4100_0_10_s4pilip";
25
+ const SearchInputStyle = "E_4100_0_11_s4pilip";
26
26
 
27
27
  exports.CustomContentOverlay = CustomContentOverlay;
28
28
  exports.LogTerminal = LogTerminal;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var eventsource$1 = require('eventsource');
3
+ var LogView_eventSourceLoader = require('./LogView.eventSourceLoader.js');
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __defProps = Object.defineProperties;
@@ -21,6 +21,7 @@ var __spreadValues = (a, b) => {
21
21
  return a;
22
22
  };
23
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ const loadEventSourceModule = LogView_eventSourceLoader.loadEventSourceModule;
24
25
  const eventsource = (url, options, terminal) => {
25
26
  const {
26
27
  initOptions,
@@ -35,6 +36,7 @@ const eventsource = (url, options, terminal) => {
35
36
  onMessage
36
37
  } = options;
37
38
  let aborted = false;
39
+ let EventSourceConstructor = null;
38
40
  let eventSource = null;
39
41
  const close = () => {
40
42
  aborted = true;
@@ -43,19 +45,28 @@ const eventsource = (url, options, terminal) => {
43
45
  eventSource = null;
44
46
  }
45
47
  };
46
- const start = () => {
48
+ const start = async () => {
47
49
  var _a;
48
50
  try {
49
- eventSource = new eventsource$1.EventSource(url, initOptions);
51
+ if (!EventSourceConstructor) {
52
+ EventSourceConstructor = (await loadEventSourceModule()).EventSource;
53
+ }
54
+ if (aborted)
55
+ return;
56
+ eventSource = new EventSourceConstructor(url, initOptions);
50
57
  eventSource.addEventListener(openEventName, (e) => {
51
- onOpen && onOpen(e, eventSource, {
52
- terminal
53
- });
58
+ onOpen && onOpen(
59
+ e,
60
+ eventSource,
61
+ {
62
+ terminal
63
+ }
64
+ );
54
65
  });
55
66
  eventSource.addEventListener(errorEventName, (err) => {
56
67
  var _a2;
57
68
  onError && onError(err);
58
- if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) === eventsource$1.EventSource.CLOSED) {
69
+ if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) === (EventSourceConstructor == null ? void 0 : EventSourceConstructor.CLOSED)) {
59
70
  const timeout = (_a2 = options.reconnectWait) != null ? _a2 : 1;
60
71
  setTimeout(start, timeout * 1e3);
61
72
  }
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ let xtermModulesPromise = null;
4
+ const loadXtermModules = () => {
5
+ if (!xtermModulesPromise) {
6
+ xtermModulesPromise = Promise.all([
7
+ import('@xterm/xterm'),
8
+ import('@xterm/addon-search'),
9
+ import('@xterm/addon-fit')
10
+ ]).then(([xterm, addonSearch, addonFit]) => ({
11
+ Terminal: xterm.Terminal,
12
+ SearchAddon: addonSearch.SearchAddon,
13
+ FitAddon: addonFit.FitAddon
14
+ })).catch((error) => {
15
+ xtermModulesPromise = null;
16
+ throw error;
17
+ });
18
+ }
19
+ return xtermModulesPromise;
20
+ };
21
+
22
+ exports.loadXtermModules = loadXtermModules;
@@ -34,7 +34,7 @@ var __objRest = (source, exclude) => {
34
34
  }
35
35
  return target;
36
36
  };
37
- const MediumDialogStyle = "E_4100_0_10_m5foqp8";
37
+ const MediumDialogStyle = "E_4100_0_11_m5foqp8";
38
38
  const MediumDialog = _a => {
39
39
  var _b = _a,
40
40
  {
@@ -2,24 +2,24 @@
2
2
 
3
3
  var react = require('@linaria/react');
4
4
 
5
- const MetricLegendTabStyle = "E_4100_0_10_mp64wfi";
6
- const LegendStyle = "E_4100_0_10_l1oyigan";
7
- const LegendItemStyle = "E_4100_0_10_l1noi4n1";
8
- const ColorBlockStyle = "E_4100_0_10_cz19rz6";
9
- const ExtraResource = "E_4100_0_10_e17r5r9c";
5
+ const MetricLegendTabStyle = "E_4100_0_11_mp64wfi";
6
+ const LegendStyle = "E_4100_0_11_l1oyigan";
7
+ const LegendItemStyle = "E_4100_0_11_l1noi4n1";
8
+ const ColorBlockStyle = "E_4100_0_11_cz19rz6";
9
+ const ExtraResource = "E_4100_0_11_e17r5r9c";
10
10
  const MetricWrapper = /*#__PURE__*/react.styled('div')({
11
11
  name: "MetricWrapper",
12
- class: "E_4100_0_10_m1y1hhnr",
12
+ class: "E_4100_0_11_m1y1hhnr",
13
13
  propsAsIs: false
14
14
  });
15
15
  const TooltipWrapper = /*#__PURE__*/react.styled('div')({
16
16
  name: "TooltipWrapper",
17
- class: "E_4100_0_10_tnvijvs",
17
+ class: "E_4100_0_11_tnvijvs",
18
18
  propsAsIs: false
19
19
  });
20
20
  const TooltipColumn = /*#__PURE__*/react.styled('div')({
21
21
  name: "TooltipColumn",
22
- class: "E_4100_0_10_t1ub2aex",
22
+ class: "E_4100_0_11_t1ub2aex",
23
23
  propsAsIs: false
24
24
  });
25
25
 
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var cs__default = /*#__PURE__*/_interopDefault(cs);
11
11
  var React__default = /*#__PURE__*/_interopDefault(React);
12
12
 
13
- const MinWidth = "E_4100_0_10_m196gn1d";
13
+ const MinWidth = "E_4100_0_11_m196gn1d";
14
14
  const Nav = ({
15
15
  left,
16
16
  right,
@@ -4,10 +4,10 @@ var react = require('@linaria/react');
4
4
 
5
5
  const Header = /*#__PURE__*/react.styled('header')({
6
6
  name: "Header",
7
- class: "E_4100_0_10_h12yihis",
7
+ class: "E_4100_0_11_h12yihis",
8
8
  propsAsIs: false
9
9
  });
10
- const NavCenterStyle = "E_4100_0_10_ncaepor";
10
+ const NavCenterStyle = "E_4100_0_11_ncaepor";
11
11
 
12
12
  exports.Header = Header;
13
13
  exports.NavCenterStyle = NavCenterStyle;
@@ -11,8 +11,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
  var cs__default = /*#__PURE__*/_interopDefault(cs);
12
12
  var React__default = /*#__PURE__*/_interopDefault(React);
13
13
 
14
- const OverflowWrapper = "E_4100_0_10_owd0kml";
15
- const HiddenStyle = "E_4100_0_10_h1jsgezc";
14
+ const OverflowWrapper = "E_4100_0_11_owd0kml";
15
+ const HiddenStyle = "E_4100_0_11_h1jsgezc";
16
16
  const Overflow = props => {
17
17
  const {
18
18
  children,
@@ -15,8 +15,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
15
  var cs__default = /*#__PURE__*/_interopDefault(cs);
16
16
  var React__default = /*#__PURE__*/_interopDefault(React);
17
17
 
18
- const PaginationStyle = "E_4100_0_10_phljevk";
19
- const DropdownOverlayStyle = "E_4100_0_10_d12rtyeg";
18
+ const PaginationStyle = "E_4100_0_11_phljevk";
19
+ const DropdownOverlayStyle = "E_4100_0_11_d12rtyeg";
20
20
  const Pagination = props => {
21
21
  const {
22
22
  current,
@@ -49,7 +49,7 @@ const _exp = /*#__PURE__*/() => ({
49
49
  }) => color || "";
50
50
  const IconFieldText = /*#__PURE__*/react.styled('div')({
51
51
  name: "IconFieldText",
52
- class: "E_4100_0_10_i14c7jc8",
52
+ class: "E_4100_0_11_i14c7jc8",
53
53
  propsAsIs: false,
54
54
  vars: {
55
55
  "i14c7jc8-0": [_exp()]
@@ -66,7 +66,7 @@ const StatusIconMap = {
66
66
  };
67
67
  const IconFieldWrapper = /*#__PURE__*/react.styled('div')({
68
68
  name: "IconFieldWrapper",
69
- class: "E_4100_0_10_i1ibuolf",
69
+ class: "E_4100_0_11_i1ibuolf",
70
70
  propsAsIs: false
71
71
  });
72
72
  const IconField = _a => {
@@ -44,7 +44,7 @@ var __objRest = (source, exclude) => {
44
44
  };
45
45
  const Row = /*#__PURE__*/react.styled('div')({
46
46
  name: "Row",
47
- class: "E_4100_0_10_r77hffu",
47
+ class: "E_4100_0_11_r77hffu",
48
48
  propsAsIs: false
49
49
  });
50
50
  const _exp = /*#__PURE__*/() => ({
@@ -52,7 +52,7 @@ const _exp = /*#__PURE__*/() => ({
52
52
  }) => type === "rich" ? "6px" : "4px";
53
53
  const ProgressContainer = /*#__PURE__*/react.styled('div')({
54
54
  name: "ProgressContainer",
55
- class: "E_4100_0_10_p1cmxsf7",
55
+ class: "E_4100_0_11_p1cmxsf7",
56
56
  propsAsIs: false,
57
57
  vars: {
58
58
  "p1cmxsf7-0": [_exp()]
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const DescriptionStyle = "E_4100_0_10_d1u4ndxc";
4
- const FlexFullContentStyle = "E_4100_0_10_f6xb0iv";
5
- const BaseProgressStyle = "E_4100_0_10_b1dhu7ov";
6
- const ProgressStyle = "E_4100_0_10_p1as1j2z";
3
+ const DescriptionStyle = "E_4100_0_11_d1u4ndxc";
4
+ const FlexFullContentStyle = "E_4100_0_11_f6xb0iv";
5
+ const BaseProgressStyle = "E_4100_0_11_b1dhu7ov";
6
+ const ProgressStyle = "E_4100_0_11_p1as1j2z";
7
7
 
8
8
  exports.BaseProgressStyle = BaseProgressStyle;
9
9
  exports.DescriptionStyle = DescriptionStyle;
@@ -39,11 +39,11 @@ var __objRest = (source, exclude) => {
39
39
  }
40
40
  return target;
41
41
  };
42
- const titleAreaStyle = "E_4100_0_10_t1gvlxt5";
42
+ const titleAreaStyle = "E_4100_0_11_t1gvlxt5";
43
43
  const _exp2 = /*#__PURE__*/() => props => props.gap;
44
44
  const AreaWrapper = /*#__PURE__*/react.styled('div')({
45
45
  name: "AreaWrapper",
46
- class: "E_4100_0_10_a1ji6r68",
46
+ class: "E_4100_0_11_a1ji6r68",
47
47
  propsAsIs: false,
48
48
  vars: {
49
49
  "a1ji6r68-0": [_exp2(), "px"]
@@ -39,9 +39,9 @@ var __objRest = (source, exclude) => {
39
39
  }
40
40
  return target;
41
41
  };
42
- const RadioStyle = "E_4100_0_10_rapgekc";
43
- const RadioGroupStyle = "E_4100_0_10_rp906go";
44
- const RadioButtonStyle = "E_4100_0_10_rcc63c8";
42
+ const RadioStyle = "E_4100_0_11_rapgekc";
43
+ const RadioGroupStyle = "E_4100_0_11_rp906go";
44
+ const RadioButtonStyle = "E_4100_0_11_rcc63c8";
45
45
  const KitRadioGroupContext = React__default.default.createContext({});
46
46
  const Radio = _a => {
47
47
  var _b = _a,
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const SearchInputStyles = "E_4100_0_10_s1n7hav7";
4
- const CountTextStyles = "E_4100_0_10_c1tgpyn0";
5
- const IconContainerStyles = "E_4100_0_10_i1cmbu8m";
6
- const DisabledIconStyles = "E_4100_0_10_dxmfsc9";
7
- const SearchInputDropdownStyles = "E_4100_0_10_slbf45q";
3
+ const SearchInputStyles = "E_4100_0_11_s1n7hav7";
4
+ const CountTextStyles = "E_4100_0_11_c1tgpyn0";
5
+ const IconContainerStyles = "E_4100_0_11_i1cmbu8m";
6
+ const DisabledIconStyles = "E_4100_0_11_dxmfsc9";
7
+ const SearchInputDropdownStyles = "E_4100_0_11_slbf45q";
8
8
 
9
9
  exports.CountTextStyles = CountTextStyles;
10
10
  exports.DisabledIconStyles = DisabledIconStyles;
@@ -27,10 +27,10 @@ var __spreadValues = (a, b) => {
27
27
  }
28
28
  return a;
29
29
  };
30
- const Segment = "E_4100_0_10_s11wux3h";
31
- const SmallSegment = "E_4100_0_10_s1t2an3z";
32
- const MediumSegment = "E_4100_0_10_ma64lna";
33
- const ColorSegment = "E_4100_0_10_ckld275";
30
+ const Segment = "E_4100_0_11_s11wux3h";
31
+ const SmallSegment = "E_4100_0_11_s1t2an3z";
32
+ const MediumSegment = "E_4100_0_11_ma64lna";
33
+ const ColorSegment = "E_4100_0_11_ckld275";
34
34
  const SegmentControl = props => {
35
35
  const {
36
36
  size = "middle",
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const SelectStyle = "E_4100_0_10_s4ivdfu";
4
- const SelectIconStyle = "E_4100_0_10_sks9xr8";
5
- const SelectSizeStyle = "E_4100_0_10_swwhohx";
6
- const PlaceholderTextStyle = "E_4100_0_10_p2sxmsl";
3
+ const SelectStyle = "E_4100_0_11_s4ivdfu";
4
+ const SelectIconStyle = "E_4100_0_11_sks9xr8";
5
+ const SelectSizeStyle = "E_4100_0_11_swwhohx";
6
+ const PlaceholderTextStyle = "E_4100_0_11_p2sxmsl";
7
7
 
8
8
  exports.PlaceholderTextStyle = PlaceholderTextStyle;
9
9
  exports.SelectIconStyle = SelectIconStyle;
@@ -33,9 +33,9 @@ var __objRest = (source, exclude) => {
33
33
  }
34
34
  return target;
35
35
  };
36
- const OptionStyle = "E_4100_0_10_oa99sl3";
37
- const LeftStyle = "E_4100_0_10_lvp5pj7";
38
- const SlotStyle = "E_4100_0_10_s1io1lws";
36
+ const OptionStyle = "E_4100_0_11_oa99sl3";
37
+ const LeftStyle = "E_4100_0_11_lvp5pj7";
38
+ const SlotStyle = "E_4100_0_11_s1io1lws";
39
39
  const AntdOption = antd.Select.Option;
40
40
  function getOptions(options) {
41
41
  return options.map(option => {
@@ -15,7 +15,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
15
  var cs__default = /*#__PURE__*/_interopDefault(cs);
16
16
  var React__default = /*#__PURE__*/_interopDefault(React);
17
17
 
18
- const inputStyle = "E_4100_0_10_ivqqkzv";
18
+ const inputStyle = "E_4100_0_11_ivqqkzv";
19
19
  const SimplePagination = props => {
20
20
  const {
21
21
  className,
@@ -78,7 +78,7 @@ const SimplePagination = props => {
78
78
  changeValue(event.target.value);
79
79
  }
80
80
  }), /* @__PURE__ */React__default.default.createElement("span", {
81
- className: cs__default.default("E_4100_0_10_c1wk4q29", index$1.Typo.Label.l3_regular_upper)
81
+ className: cs__default.default("E_4100_0_11_c1wk4q29", index$1.Typo.Label.l3_regular_upper)
82
82
  }, `/ ${pageLength}`), showNext && /* @__PURE__ */React__default.default.createElement(index$2, {
83
83
  className: "next-btn",
84
84
  type: "quiet",
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
  var cs__default = /*#__PURE__*/_interopDefault(cs);
9
9
  var React__default = /*#__PURE__*/_interopDefault(React);
10
10
 
11
- const SkeletonContentStyle = "E_4100_0_10_s20iney";
11
+ const SkeletonContentStyle = "E_4100_0_11_s20iney";
12
12
  const SkeletonContent = props => {
13
13
  const {
14
14
  width = "100%",
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- const DialogStyle = "E_4100_0_10_dxyv8bv";
4
- const FooterStyle = "E_4100_0_10_fbgo4wr";
5
- const ErrorTextStyle = "E_4100_0_10_ekxnz54";
6
- const CloseIconStyle = "E_4100_0_10_ct1041x";
7
- const ModelTitleSkeletonStyle = "E_4100_0_10_m1k84ymw";
8
- const ModelContentSkeletonStyle = "E_4100_0_10_m15ds5xe";
9
- const ModelInitializingErrorStyle = "E_4100_0_10_ma56n19";
3
+ const DialogStyle = "E_4100_0_11_dxyv8bv";
4
+ const FooterStyle = "E_4100_0_11_fbgo4wr";
5
+ const ErrorTextStyle = "E_4100_0_11_ekxnz54";
6
+ const CloseIconStyle = "E_4100_0_11_ct1041x";
7
+ const ModelTitleSkeletonStyle = "E_4100_0_11_m1k84ymw";
8
+ const ModelContentSkeletonStyle = "E_4100_0_11_m15ds5xe";
9
+ const ModelInitializingErrorStyle = "E_4100_0_11_ma56n19";
10
10
 
11
11
  exports.CloseIconStyle = CloseIconStyle;
12
12
  exports.DialogStyle = DialogStyle;
@@ -44,10 +44,10 @@ var __objRest = (source, exclude) => {
44
44
  return target;
45
45
  };
46
46
  const StatusPresetColors = ["blue", "red", "yellow", "green", "gray"];
47
- const StatusCapsuleStyle = "E_4100_0_10_sddwhm6";
47
+ const StatusCapsuleStyle = "E_4100_0_11_sddwhm6";
48
48
  const StatusCode = /*#__PURE__*/react.styled('i')({
49
49
  name: "StatusCode",
50
- class: "E_4100_0_10_satwmqm",
50
+ class: "E_4100_0_11_satwmqm",
51
51
  propsAsIs: false
52
52
  });
53
53
  const StatusIcon = ({
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
  var cs__default = /*#__PURE__*/_interopDefault(cs);
9
9
  var React__default = /*#__PURE__*/_interopDefault(React);
10
10
 
11
- const CircleProgressStyle = "E_4100_0_10_c1bus5hc";
11
+ const CircleProgressStyle = "E_4100_0_11_c1bus5hc";
12
12
  const CircleProgress = props => {
13
13
  const {
14
14
  percent,
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const StepsStyle = "E_4100_0_10_sjob3jg";
4
- const HorizontalStyle = "E_4100_0_10_hjvj6s6";
5
- const VerticalStyle = "E_4100_0_10_v4tv3mf";
6
- const HorizontalStepContentStyle = "E_4100_0_10_h6l1tj4";
7
- const VerticalStepContentStyle = "E_4100_0_10_v18frne8";
3
+ const StepsStyle = "E_4100_0_11_sjob3jg";
4
+ const HorizontalStyle = "E_4100_0_11_hjvj6s6";
5
+ const VerticalStyle = "E_4100_0_11_v4tv3mf";
6
+ const HorizontalStepContentStyle = "E_4100_0_11_h6l1tj4";
7
+ const VerticalStepContentStyle = "E_4100_0_11_v18frne8";
8
8
 
9
9
  exports.HorizontalStepContentStyle = HorizontalStepContentStyle;
10
10
  exports.HorizontalStyle = HorizontalStyle;