Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/superset into fix-…
Browse files Browse the repository at this point in the history
…dataset-modal-ssh-tunnel
  • Loading branch information
hughhhh committed Jan 4, 2023
2 parents 66f68af + 82b0c23 commit c13d781
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 104 deletions.
264 changes: 170 additions & 94 deletions superset-frontend/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"global-box": "^1.2.0",
"html-webpack-plugin": "^5.3.2",
"immer": "^9.0.6",
"interweave": "^11.2.0",
"interweave": "^13.0.0",
"jquery": "^3.5.1",
"js-levenshtein": "^1.1.6",
"js-yaml-loader": "^1.2.2",
Expand All @@ -160,7 +160,7 @@
"query-string": "^6.13.7",
"re-resizable": "^6.6.1",
"react": "^16.13.1",
"react-ace": "^9.4.4",
"react-ace": "^10.1.0",
"react-checkbox-tree": "^1.5.1",
"react-color": "^2.13.8",
"react-datetime": "^3.0.4",
Expand All @@ -173,7 +173,7 @@
"react-hot-loader": "^4.12.20",
"react-intersection-observer": "^8.26.2",
"react-js-cron": "^1.2.0",
"react-json-tree": "^0.11.2",
"react-json-tree": "^0.17.0",
"react-jsonschema-form": "^1.2.0",
"react-lines-ellipsis": "^0.15.0",
"react-loadable": "^5.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/chart-controls",
"version": "0.18.25",
"version": "0.18.26",
"description": "Superset UI control-utils",
"keywords": [
"superset"
Expand Down Expand Up @@ -43,7 +43,7 @@
"brace": "^0.11.1",
"memoize-one": "^5.1.1",
"react": "^16.13.1",
"react-ace": "^9.4.4",
"react-ace": "^10.1.0",
"react-dom": "^16.13.1"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/plugin-chart-handlebars",
"version": "0.18.25",
"version": "0.18.26",
"description": "Superset Chart - Write a handlebars template to render the data",
"sideEffects": false,
"main": "lib/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"lodash": "^4.17.11",
"moment": "^2.26.0",
"react": "^16.13.1",
"react-ace": "^9.4.4",
"react-ace": "^10.1.0",
"react-dom": "^16.13.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/FilterableTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import JSONbig from 'json-bigint';
import React, { useEffect, useRef, useState } from 'react';
import JSONTree from 'react-json-tree';
import { JSONTree } from 'react-json-tree';
import {
AutoSizer,
Column,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe('LabeledErrorBoundInput', () => {
expect(textboxInput).toBeVisible();
expect(errorText).toBeVisible();
});

it('renders a LabeledErrorBoundInput with a InfoTooltip', async () => {
defaultProps.hasTooltip = true;
render(<LabeledErrorBoundInput {...defaultProps} />);
Expand All @@ -75,4 +76,18 @@ describe('LabeledErrorBoundInput', () => {
expect(textboxInput).toBeVisible();
expect(await screen.findByText('This is a tooltip')).toBeInTheDocument();
});

it('becomes a password input if visibilityToggle prop is passed in', async () => {
defaultProps.visibilityToggle = true;
render(<LabeledErrorBoundInput {...defaultProps} />);

expect(await screen.findByRole('img', { name: /eye/i })).toBeVisible();
});

it('becomes a password input if props.name === password (backwards compatibility)', async () => {
defaultProps.name = 'password';
render(<LabeledErrorBoundInput {...defaultProps} />);

expect(await screen.findByRole('img', { name: /eye/i })).toBeVisible();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface LabeledErrorBoundInputProps {
tooltipText?: string | null;
id?: string;
classname?: string;
visibilityToggle?: boolean;
[x: string]: any;
}

Expand Down Expand Up @@ -101,6 +102,7 @@ const LabeledErrorBoundInput = ({
tooltipText,
id,
className,
visibilityToggle,
...props
}: LabeledErrorBoundInputProps) => (
<StyledFormGroup className={className}>
Expand All @@ -119,7 +121,7 @@ const LabeledErrorBoundInput = ({
help={errorMessage || helpText}
hasFeedback={!!errorMessage}
>
{props.name === 'password' ? (
{visibilityToggle || props.name === 'password' ? (
<StyledInputPassword
{...props}
{...validationMethods}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/MessageToasts/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import { styled, css, SupersetTheme } from '@superset-ui/core';
import cx from 'classnames';
import Interweave from 'interweave';
import { Interweave } from 'interweave';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import Icons from 'src/components/Icons';
import { ToastType, ToastMeta } from './types';
Expand Down

0 comments on commit c13d781

Please sign in to comment.