react-terminal-viewer-cicd 3.0.0-beta.17 → 3.0.0-beta.19
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.
- package/dist/esm/Addon/WorkerLog/LogWorker.js +1 -1
- package/dist/esm/TerminalViewer/index.d.ts +1 -1
- package/dist/esm/TerminalViewerBody/index.d.ts +1 -1
- package/dist/esm/TerminalViewerHeader/index.d.ts +1 -1
- package/dist/esm/TerminalViewerHeader/index.js +5 -5
- package/dist/esm/TerminalViewerVirtualDom/index.d.ts +1 -1
- package/dist/esm/TerminalViewerVirtualDom/useStreamStepWorkerLogs.js +5 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function LogWorker() {
|
|
2
2
|
var workerPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/worker';
|
|
3
3
|
var worker = null;
|
|
4
|
-
var version = "3.0.0-beta.
|
|
4
|
+
var version = "3.0.0-beta.19" || '0.0.0';
|
|
5
5
|
var path = workerPath.includes('http') ? "".concat(workerPath, "/log.worker.js") : "".concat(window.location.origin).concat(workerPath, "/log.worker.js");
|
|
6
6
|
var blob = new Blob(["importScripts(\"".concat(path, "?v=").concat(version, "\")")], {
|
|
7
7
|
type: 'application/javascript'
|
|
@@ -194,5 +194,5 @@ export interface TerminalViewerProps {
|
|
|
194
194
|
*/
|
|
195
195
|
defaultGroupCollapsed?: boolean;
|
|
196
196
|
}
|
|
197
|
-
declare const TerminalViewer: React.ForwardRefExoticComponent<Omit<TerminalViewerProps, "ref"> & React.RefAttributes<TerminalRef<
|
|
197
|
+
declare const TerminalViewer: React.ForwardRefExoticComponent<Omit<TerminalViewerProps, "ref"> & React.RefAttributes<TerminalRef<Terminal | VirtualDomTerminal> | undefined>>;
|
|
198
198
|
export default TerminalViewer;
|
|
@@ -83,5 +83,5 @@ export interface TerminalViewerBodyProps {
|
|
|
83
83
|
*/
|
|
84
84
|
onLoading?: (loading: boolean) => void;
|
|
85
85
|
}
|
|
86
|
-
declare const TerminalViewerBody: React.ForwardRefExoticComponent<TerminalViewerBodyProps & React.RefAttributes<TerminalRef<import("../types").VirtualDomTerminal
|
|
86
|
+
declare const TerminalViewerBody: React.ForwardRefExoticComponent<TerminalViewerBodyProps & React.RefAttributes<TerminalRef<Terminal | import("../types").VirtualDomTerminal> | undefined>>;
|
|
87
87
|
export default TerminalViewerBody;
|
|
@@ -98,5 +98,5 @@ export interface TerminalViewerHeaderProps<T extends Terminal | VirtualDomTermin
|
|
|
98
98
|
*/
|
|
99
99
|
collapseAction?: (terminal: T, allCollapsed: boolean) => React.ReactNode;
|
|
100
100
|
}
|
|
101
|
-
declare const TerminalViewerHeader: <T extends
|
|
101
|
+
declare const TerminalViewerHeader: <T extends Terminal | VirtualDomTerminal = Terminal | VirtualDomTerminal>({ placeholder, defaultValue, clearable, refreshable, loading, activeTitleIndex, titles, searchResult, inputAddonBefore, inputAddonAfter, icons, onTitleChange, onSearchPrev, onSearchNext, onSearchChange, onSearchClear, onRefresh, terminalRef, allCollapsed, collapseAction, }: TerminalViewerHeaderProps<T>) => React.JSX.Element;
|
|
102
102
|
export default TerminalViewerHeader;
|
|
@@ -99,10 +99,7 @@ var TerminalViewerHeader = function TerminalViewerHeader(_ref) {
|
|
|
99
99
|
);
|
|
100
100
|
})), /*#__PURE__*/React.createElement("div", {
|
|
101
101
|
className: "terminal-viewer-header-action"
|
|
102
|
-
}, inputAddonBefore,
|
|
103
|
-
className: "terminal-viewer-header-refresh",
|
|
104
|
-
onClick: loading ? undefined : onRefresh
|
|
105
|
-
}, loading ? (icons === null || icons === void 0 ? void 0 : icons.loading) || /*#__PURE__*/React.createElement(LoadingOutlined, null) : (icons === null || icons === void 0 ? void 0 : icons.refresh) || /*#__PURE__*/React.createElement(ReloadOutlined, null)), /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
}, inputAddonBefore, /*#__PURE__*/React.createElement("div", {
|
|
106
103
|
className: "terminal-viewer-input-wrapper"
|
|
107
104
|
}, (icons === null || icons === void 0 ? void 0 : icons.search) || /*#__PURE__*/React.createElement(SearchOutlined, null), /*#__PURE__*/React.createElement("input", {
|
|
108
105
|
ref: inputRef,
|
|
@@ -129,6 +126,9 @@ var TerminalViewerHeader = function TerminalViewerHeader(_ref) {
|
|
|
129
126
|
}, (icons === null || icons === void 0 ? void 0 : icons.up) || /*#__PURE__*/React.createElement(UpOutlined, null)), /*#__PURE__*/React.createElement("span", {
|
|
130
127
|
className: "input-suffix-search-tool",
|
|
131
128
|
onClick: handleSearchNext
|
|
132
|
-
}, (icons === null || icons === void 0 ? void 0 : icons.down) || /*#__PURE__*/React.createElement(DownOutlined, null)))),
|
|
129
|
+
}, (icons === null || icons === void 0 ? void 0 : icons.down) || /*#__PURE__*/React.createElement(DownOutlined, null)))), termInstance && (collapseAction === null || collapseAction === void 0 ? void 0 : collapseAction(termInstance, !!allCollapsed)), inputAddonAfter, refreshable && /*#__PURE__*/React.createElement("span", {
|
|
130
|
+
className: "terminal-viewer-header-refresh",
|
|
131
|
+
onClick: loading ? undefined : onRefresh
|
|
132
|
+
}, loading ? (icons === null || icons === void 0 ? void 0 : icons.loading) || /*#__PURE__*/React.createElement(LoadingOutlined, null) : (icons === null || icons === void 0 ? void 0 : icons.refresh) || /*#__PURE__*/React.createElement(ReloadOutlined, null))));
|
|
133
133
|
};
|
|
134
134
|
export default TerminalViewerHeader;
|
|
@@ -79,5 +79,5 @@ export interface TerminalViewerVirtualDomProps {
|
|
|
79
79
|
* 最后一个分组折叠时,在折叠之前,添加底部空间
|
|
80
80
|
* 最后一个分组展开时,在展开之前,删除底部空间
|
|
81
81
|
*/
|
|
82
|
-
declare const ReactVirtuoso: React.ForwardRefExoticComponent<TerminalViewerVirtualDomProps & React.RefAttributes<TerminalRef<
|
|
82
|
+
declare const ReactVirtuoso: React.ForwardRefExoticComponent<TerminalViewerVirtualDomProps & React.RefAttributes<TerminalRef<import("src").Terminal | VirtualDomTerminal> | undefined>>;
|
|
83
83
|
export default ReactVirtuoso;
|
|
@@ -79,12 +79,11 @@ export var useStreamStepWorkerLogs = function useStreamStepWorkerLogs(string, ch
|
|
|
79
79
|
}, []);
|
|
80
80
|
// 收起全部分组
|
|
81
81
|
var collapseAll = useCallback(function () {
|
|
82
|
-
var _stageStatsRef$curren2, _parserRef$current2;
|
|
83
82
|
hasUserCollapseRef.current = true;
|
|
84
83
|
stageStatsRef.current.forEach(function (stat) {
|
|
85
84
|
stat.collapse = true;
|
|
86
85
|
});
|
|
87
|
-
lastCollapseRef.current =
|
|
86
|
+
lastCollapseRef.current = true;
|
|
88
87
|
setGroupCounts(function (pre) {
|
|
89
88
|
return pre.map(function () {
|
|
90
89
|
return 0;
|
|
@@ -100,8 +99,8 @@ export var useStreamStepWorkerLogs = function useStreamStepWorkerLogs(string, ch
|
|
|
100
99
|
lastCollapseRef.current = false;
|
|
101
100
|
setGroupCounts(function () {
|
|
102
101
|
return parserRef.current.stages.map(function (_, i) {
|
|
103
|
-
var _stageStatsRef$
|
|
104
|
-
return (_stageStatsRef$
|
|
102
|
+
var _stageStatsRef$curren2, _stageStatsRef$curren3;
|
|
103
|
+
return (_stageStatsRef$curren2 = (_stageStatsRef$curren3 = stageStatsRef.current[i]) === null || _stageStatsRef$curren3 === void 0 ? void 0 : _stageStatsRef$curren3.totalCount) !== null && _stageStatsRef$curren2 !== void 0 ? _stageStatsRef$curren2 : 0;
|
|
105
104
|
});
|
|
106
105
|
});
|
|
107
106
|
}, []);
|
|
@@ -210,8 +209,8 @@ export var useStreamStepWorkerLogs = function useStreamStepWorkerLogs(string, ch
|
|
|
210
209
|
lastCollapseRef.current = false;
|
|
211
210
|
}
|
|
212
211
|
return stages.map(function (s, i) {
|
|
213
|
-
var _stageStatsRef$
|
|
214
|
-
var currentCollapseStatus = (_stageStatsRef$
|
|
212
|
+
var _stageStatsRef$curren4;
|
|
213
|
+
var currentCollapseStatus = (_stageStatsRef$curren4 = stageStatsRef.current) === null || _stageStatsRef$curren4 === void 0 || (_stageStatsRef$curren4 = _stageStatsRef$curren4[i]) === null || _stageStatsRef$curren4 === void 0 ? void 0 : _stageStatsRef$curren4.collapse;
|
|
215
214
|
// 计算实际在 flatLines 中的行数(不包含 START/END 行)
|
|
216
215
|
// 使用 startIndex 和 endIndex 来计算
|
|
217
216
|
var actualCount = 0;
|