Skip to content

Commit 92b4461

Browse files
authored
feat: Copy and export data frames. (#70)
1 parent 45867aa commit 92b4461

File tree

8 files changed

+1270
-96
lines changed

8 files changed

+1270
-96
lines changed

package-lock.json

Lines changed: 40 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,7 @@
21252125
"ansi-to-html": "^0.6.7",
21262126
"bootstrap": "^5.0.0",
21272127
"bootstrap-less": "^3.3.8",
2128+
"clsx": "^2.1.1",
21282129
"cross-fetch": "^3.1.5",
21292130
"encoding": "^0.1.13",
21302131
"fast-deep-equal": "^2.0.1",
@@ -2163,6 +2164,7 @@
21632164
"strip-comments": "^2.0.1",
21642165
"styled-components": "^5.2.1",
21652166
"svg-to-pdfkit": "^0.1.8",
2167+
"tailwind-merge": "^3.3.1",
21662168
"tcp-port-used": "^1.0.1",
21672169
"tmp": "^0.2.4",
21682170
"url-parse": "^1.5.10",

src/messageTypes.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ export type LocalizedMessages = {
158158
selectedImageListLabel: string;
159159
selectedImageLabel: string;
160160
dvDeprecationWarning: string;
161+
dataframeRowsColumns: string;
162+
dataframePerPage: string;
163+
dataframePreviousPage: string;
164+
dataframeNextPage: string;
165+
dataframePageOf: string;
166+
dataframeCopyTable: string;
167+
dataframeExportTable: string;
161168
};
162169
// Map all messages to specific payloads
163170
export class IInteractiveWindowMapping {

src/platform/common/utils/localize.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,13 @@ export namespace WebViews {
805805
export const dvDeprecationWarning = l10n.t(
806806
'The built-in data viewer will be deprecated and no longer usable starting with Visual Studio Code 1.92. Please <a href="command:workbench.extensions.search?%22@tag:jupyterVariableViewers%22">install other data viewing extensions</a> to continue inspecting data'
807807
);
808+
export const dataframeRowsColumns = l10n.t('{0} rows, {1} columns');
809+
export const dataframePerPage = l10n.t('/ page');
810+
export const dataframePreviousPage = l10n.t('Previous page');
811+
export const dataframeNextPage = l10n.t('Next page');
812+
export const dataframePageOf = l10n.t('Page {0} of {1}');
813+
export const dataframeCopyTable = l10n.t('Copy table');
814+
export const dataframeExportTable = l10n.t('Export table');
808815
}
809816

810817
export namespace Deprecated {

src/platform/webviews/webviewHost.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,14 @@ export abstract class WebviewHost<IMapping> implements IDisposable {
258258
deletePlot: localize.WebViews.deletePlot,
259259
selectedImageListLabel: localize.WebViews.selectedImageListLabel,
260260
selectedImageLabel: localize.WebViews.selectedImageLabel,
261-
dvDeprecationWarning: localize.WebViews.dvDeprecationWarning
261+
dvDeprecationWarning: localize.WebViews.dvDeprecationWarning,
262+
dataframeRowsColumns: localize.WebViews.dataframeRowsColumns,
263+
dataframePerPage: localize.WebViews.dataframePerPage,
264+
dataframePreviousPage: localize.WebViews.dataframePreviousPage,
265+
dataframeNextPage: localize.WebViews.dataframeNextPage,
266+
dataframePageOf: localize.WebViews.dataframePageOf,
267+
dataframeCopyTable: localize.WebViews.dataframeCopyTable,
268+
dataframeExportTable: localize.WebViews.dataframeExportTable
262269
};
263270
this.postMessageInternal(SharedMessages.LocInit, JSON.stringify(locStrings)).catch(noop);
264271
}

0 commit comments

Comments
 (0)